PocketFrog as a subwindow
Posted: Nov 15, 2002 @ 9:28am
Any tips on how I can set up PF to run in a subwindow.
I'm working on a GUI for the H/PC with an 800x600 display and what I want is a regular windows program (NOT MFC) to act as the mainframe for the GUI, and then when selected from the menu, display and run a PF visualisation in a subwindow.
I've managed to arrange this behaviour, but it only works ONCE. After I've closed the PF window (by calling PostQuitMessage(0) in StylusDown()) I can't start it again. All it draws is the frame with nothing in it (and no callbacks, så I can't close it again neither).
Any hints on what I'm doing wrong here? The code is at if that would help. It's based on the "Hello World" WCE Application skeleton. I'm kinda new to windows programming so I'm hoping it's just something I've missed. The main window is not ATL based, could this be it. Changing it (from regular windows style) to ATL ain't that hard (I hope) but it would be nice if I didn't have to change any code since the rest of the stuff is working just fine and it's easy to expand.
I register the PF/ATL window with "_Module.Init( 0, hInstance );" after I've registered the main window. And I start PF by invoking PFClass.Run() in the WndProc Callback function (when selecting the proper menu item)
It seems like PF is not completely and correctly exited/destroyed and that's why it refuses to start up a second time (just as if you try to run two PF windows at the same time).
Also, how do you get the PF to display a "Close this window" icon in the upper right corner (as one gets with all the other windows and dialogs you create).
I'm working on a GUI for the H/PC with an 800x600 display and what I want is a regular windows program (NOT MFC) to act as the mainframe for the GUI, and then when selected from the menu, display and run a PF visualisation in a subwindow.
I've managed to arrange this behaviour, but it only works ONCE. After I've closed the PF window (by calling PostQuitMessage(0) in StylusDown()) I can't start it again. All it draws is the frame with nothing in it (and no callbacks, så I can't close it again neither).
Any hints on what I'm doing wrong here? The code is at if that would help. It's based on the "Hello World" WCE Application skeleton. I'm kinda new to windows programming so I'm hoping it's just something I've missed. The main window is not ATL based, could this be it. Changing it (from regular windows style) to ATL ain't that hard (I hope) but it would be nice if I didn't have to change any code since the rest of the stuff is working just fine and it's easy to expand.
I register the PF/ATL window with "_Module.Init( 0, hInstance );" after I've registered the main window. And I start PF by invoking PFClass.Run() in the WndProc Callback function (when selecting the proper menu item)
It seems like PF is not completely and correctly exited/destroyed and that's why it refuses to start up a second time (just as if you try to run two PF windows at the same time).
Also, how do you get the PF to display a "Close this window" icon in the upper right corner (as one gets with all the other windows and dialogs you create).