Sorry that I did not respond to your last post. I think that is normal behavior when you drop into the system tray like that. You could probably use Windows to get around that.
Yes, it is undocumented in DBPro, as well and requires a little chicanery to use it. It is however, a very useful function. The members of the GlobStruct structure are in the include file globstruct.h I think that it is undocumented because it exposes the core, but you cannot take advantage of all of it. For example, you cannot use it to make wholesale changes to how the engine works. The window handle and instance handle are a different matter, although there are certainly limitations there, too.
One other thing that is underdocumented is the DBO code in the folder DBO Format. There is also a function to get the pointer for a DBO object. That is also
very useful.
dbGetObject
EDIT: You might just as well add a menu for right click in the system tray WndProc. The menu resource is pretty easy to add, like the icon was. The main task, you've already done...define a WndProc. Now, you can add a menu in the place where you added the icon, and subclass in the same place. Also, you've almost got everything you need to create your own window class to use alongside the GDK, instead of inline with it. It is an optional way that I use to create my own window class with the EX style. That allows more powerful window styles to be used. You can use modeless dialogs, too which are visually more appealing over a 3D screen.
Here are a couple of snippets to show how to define a menu, and also an about box dialog.
In the .rc file:
connect4Menu MENU
BEGIN
POPUP "&Play"
BEGIN
MENUITEM "&One Player", IDM_ONEPLAYER, GRAYED
MENUITEM "&Two Player", IDM_TWOPLAYER
END
POPUP "&Help"
BEGIN
MENUITEM "&About Connect4...", IDM_ABOUT
END
END
AboutBox DIALOG 22, 17, 144, 75
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About Connect4"
BEGIN
CTEXT "Connect4" -1, 0, 5, 144, 8
CTEXT " jinzai " -1, 0, 14, 144, 8
CTEXT "mtb61275@yahoo.com" -1, 0, 24, 144, 8
DEFPUSHBUTTON "OK" IDOK, 53, 59, 32, 14, WS_GROUP
END
In the resource.h file:
#define IDM_ABOUT 100
#define IDM_ONEPLAYER 110
#define IDM_TWOPLAYER 120
You load and add the resouce where your load the icon. You will need an HMENU to store the handle you load from the resource file. In that sample, the menu uses the default hot keys. That is what the ampersand indicates. ALT + the letter is the standard hot key comination in that case.
If you want to make your own window class(es), that is also the best place to do it.