PocketMatrix forums

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

mfc sample

if i use gapidraw "mfc"-sample and build my own surface(include a new bitmap) my pocket-pc don´t
go anymore after starting program. i even can´t shut down my pocket pc - only with hardware reset.
please help
thanks
peter
I'm afraid you have to describe the issue in more detail. What Pocket PC device do you use? When does it stall? At startup? If you simply recompile the MFC sample, does that work?
the mfc sample works fine.(also if i turn off an on my ipaq).but if i use my own created surface in the ThreadCallback() everything works until i turn off and on my ipaq, because then the "gapi" display is not in the front.
here my code:
Code:
void CGapiThread::ThreadCallback()
{
if (m_bFirstGfxUpdate)
{
DWORD dwDispCaps;
bDirectDisplay = FALSE;
if (m_display.GetDisplayCaps(&dwDispCaps;) == GD_OK)
{
bDirectDisplay = ((dwDispCaps & GDDISPCAPS_DIRECT) == GDDISPCAPS_DIRECT);
}

dwScreenWidth = m_display.GetWidth();
dwScreenHeight = m_display.GetHeight();
m_display.SetDisplayMode(m_dwScreenOrientation);

m_display.GetBackBuffer(&m;_backbuffer);

SurfaceInit(); // Menu and titlebar blit in backbuffer

// background init
m_background.CreateSurface(0, 240,320);
m_background.FillRect(NULL, RGB(255, 255, 255), 0, NULL);

// background blit
m_backbuffer.BltFast(0, m_titlebar.GetHeight(), &m;_background, CRect(0, 0, dwScreenWidth, dwScreenHeight-m_titlebar.GetHeight()-m_menubar.GetHeight()), 0, NULL);
m_display.Flip();

m_bFirstGfxUpdate = FALSE;
}


}