PocketMatrix forums

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

problem with display

hi!

if i turn off my ipaq and turn it on again while running my "gapi-programm" i get a problem.
my display is not cleaned right. i can see a rest
of my gapi on my display.
what can i do?
Are you running a "GapiDraw" program? Does this happen with the sample applications as well?
I have the same problem. Here is what happens:

I open my game which opens a fullscreen display. Everything works nicely (I'm not using CGapiApplication).

I turn off my iPaq. When I turn it back on, the game screen is still displayed, but the window behind the game (ActiveSync for example) is trying to redraw all of its controls, and the input focus is not on the game.

Adding this code to your WndProc function will/should/may/can fix the problem:

Code:
case WM_ACTIVATE:
{
#ifdef _WIN32_WCE
if (WA_INACTIVE == LOWORD(wParam))
{
SetForegroundWindow(hWnd);
}
#endif
}


I hope this helps.

--Eric
Just a small note: For those of you using CGapiApplication, this issue (among a dozen others) is already solved:

Code:

case WM_ACTIVATE:
{
if (WA_INACTIVE == LOWORD(wParam))
{
#ifdef _WIN32_WCE
// Reclaim window focus if we are being deactivated
if (!m_bThreadShouldExit && m_bActiveWindow)
{
::SetForegroundWindow(hWnd);
}
#endif
}
... lots of code removed
return 0;
Slightly related, but why when using CEZoom can I not get the actual screen image? I always get whats behind the GapiDraw game.