by efortier » Apr 21, 2002 @ 9:30pm
Hello, and thanks for your reply!
I tried what you mentionned and it still doesn't work. So I created a new PocketPC 2002 project, and added only these lines to a menu message handler:
case ID_mnuGapiDraw:
{
HRESULT cRes = GD_OK;
CGapiDisplay gd_Display;
cRes = gd_Display.OpenDisplay(hWnd, GDOPENDISPLAY_FULLSCREEN );
if(cRes != GD_OK)
{
ShowErr(1,cRes,hWnd);
break;
}
cRes = gd_Display.SetDisplayMode(GDDISPMODE_NORMAL);
if(cRes != GD_OK)
{
ShowErr(2,cRes,hWnd);
break;
}
break;
}
On the first try, all works correctly. The second time I click on the menu, the SetDisplayMode return the PRIMARYSURFACEALREADYEXISTS error message.
Are there any restrictions to when and where GapiDraw should be used?
There's so little code that I don't know what I'm doing wrong. My PC runs Windows 2000 with the eVC distribution, and my portable is an iPAQ 3850 with no add-ons.
Thanks for any other infos. Sorry for the lack of tabs or spaces. The forums removed them...