Win32: Change the title of the application window

BlitzMax Forums/BlitzMax Beginners Area/Win32: Change the title of the application window

xacto(Posted 2004) [#1]
WARNING: If you don't know C and aren't prepared to diagnose C compiler errors/warnings then DO NOT attempt these changes.

NOTE: You WILL need MinGW installed to complete the steps listed below.

To change the title of the window BMX creates follow the steps below. I only cover the Win32 world here:

1. Go to /[your BMX root]/mod/blitzgl.mod and look blitzgl.win32.c.
2. Open the file with your favorite C source editor.
3. There are three places within this file you need to look at:

static const char *CLASS_NAME="BlitzGL Window Class";


This is the class name assigned to the window created in Win32. Change the "BlitzGL" portion to the name of your application.

Next, look for:

static void createWindowedContext( int width,int height,int flags )


In this function replace the plain text "BlitzGL Application" with whatever text you'd like to see in the window.

Finally, look for this:

static void createFullscreenContext( int width,int height,int depth,int hertz,int flags )


And change the plain text "BlitzGL Application" to whatever you'd like to appear in the window title.

4. Rebuild your modules.
5. Rebuild your application (remove the .bmx folder and .exe file to ensure a full rebuild).

The window title should now reflect what you put in blitzgl.win32.c.


Perturbatio(Posted 2004) [#2]
moved here: http://www.blitzbasic.com/Community/posts.php?topic=41751