PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Finishing my Port

Birdiestyle · 09 Feb 2004, 19:58 UTC
Ok, I have two things left I can't quite figure out....

One is orientation switching.... The FAQ says to call Display:Close()
which doesnt seem to exist... What do I have to do to switch it during
the game... I have create/delete surface functions much like in GD,
so doing that part of th FAQ instructions is handled...

The other is, is there anyway to Minimize the applicaiton??

Cool,

Brian
Birdsoft
Birdiestyle · 10 Feb 2004, 15:25 UTC
No one?? Really....??

Frank, Thierry??

I can live without the minimize but what is the equivalent of the missing
Display:Close() for orientation swapping??
Sorry. I don't know the answer. I spent about five minutes trying a couple of things, none of them worked. I guess that FAQ was written by Thierry some time ago, and the close() method was subsequently removed without the FAQ being updated. Maybe Thierry can be more helpful.
Yeah, it seems the Close() method doesn't exist anymore and that the docs need updating.

If you are using the framework with the current PF, you would need to destroy the display object and recreate it. This is not really a trivial thing with the current state of affairs.

PF 0.8 will be based on PHAL and it will be easy to change the screen orientation with it. If you can wait just a little while longer... I already cleaned up 40% of PF 0.7 and PHAL seems ready to go.
To minimize your app, use


ShowWindow( SW_MINIMIZE );

The problem is, that if you run the program again (at least with my projects), it doesn't switch to the one you minimized... It will run another instance of the app.


The default projects you build from the eVC wizards do switch correctly, but I'm not sure why that is...
Dave Johnston · 10 Feb 2004, 19:43 UTC
Thierry wrote:PF 0.8 will be based on PHAL and it will be easy to change the screen orientation with it. If you can wait just a little while longer... I already cleaned up 40% of PF 0.7 and PHAL seems ready to go.


Sorry, hadn't read that anywhere else and thought I'd draw attention to it :) PocketFrog 0.8. Good lord, how time flies...

I can't wait!
To check if an instance of your app is already running, use this in your InitInstance method:

Code:

HWND hWnd = FindWindow( g_szAppName, g_szAppName );
if( hWnd )
{
SetForegroundWindow( (HWND) (((DWORD)hWnd) | 0x01) );
return 0;
}


of course this doesn't quite apply to PF since it uses the ATL class CComModule and I wouldn't really know where to place this code.
The same general principal applies though, find the window, bring it to the front, exit the new instance.
I will add this to the next PF release.
Birdiestyle · 11 Feb 2004, 20:03 UTC
Oh well.. I decided to skip both for now.. and possibly plug in the new version when its out and tested.... I released the game today...


Image
Just a complete re-vamp of an existing title, but it looks good with "The Frog"!! Thanks guys!!

Brian
Birdsoft.net