This site is no longer active and is available for archival purposes only. Registration and login is disabled.

How to switch to Window mode?


How to switch to Window mode?

Postby jul' » May 17, 2002 @ 12:29pm

Hello,

I tried to modify the HelloGapi samples to switch it to windowed mode, ad it doesn't seems to work.
(I switched GAMEPARAM_FULLSCREEN to 0 and removed the DestroyMenu() calling)

The Pocket PC's menus and bar doesn't appear...

Please Help !!!
jul'
 


Re: How to switch to Window mode?

Postby rmg2768 » May 17, 2002 @ 5:10pm

I'm not sure if the specific code you're referring to is for GapiDraw or Gapitools, but I've been able to switch between FullScreen and windowed mode in my GapiTools application using the ::SHFullScreen operator with its various flags. You can selectively display the task bar, command/menu bar, start menu, etc...

A good library/reference for how to do this is:
http://www.spbteam.com/pocketpc/article ... creen.html

You can just extract the key calls to SHFullScreen from this code.

One tricky aspect of fullscreen mode, at least with GapiDraw, is to keep your app at the top of the Z-order. Apparently Windows CE has a bug wherein it doesn't put the taskbar/SIP/startmenu at the bottom of the Z-order when your app is reactivated (after going to another app, or after a system dialog such as ActiveSync has been popped up or confirmed. The solution to this is to call the fullscreen functions again whenever your app's MainFrm is reactivated (override OnActivate). I reassert the fullscreen options on each OnDraw() of my view class, although this is probably ineffiecient.

One big problem I haven't yet overcome, though, is that when I power off and power back on while my GapiTools-based app is running, OnActivate isn't called so my app doesn't redraw (call OnDraw()) to draw all the static elements of my screen. As far as I can tell, what I have to do is use system notification to have the system try to rerun my app at power-on, and if its already running, to just do the redraw. I tried this but it got ugly (you have to make sure it registers the notification only once). There must be a better way...
rmg2768
 


Postby Hosed » May 17, 2002 @ 7:01pm

User avatar
Hosed
pm Member
 
Posts: 249
Joined: Jan 3, 2002 @ 2:51am
Location: Montana, USA


WM_PAINT on power-on

Postby rmg2768 » May 17, 2002 @ 10:11pm

rmg2768
 


Postby Hosed » May 18, 2002 @ 6:26pm

User avatar
Hosed
pm Member
 
Posts: 249
Joined: Jan 3, 2002 @ 2:51am
Location: Montana, USA


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron