Win32 API Pop Up Menu and OpenGL
HELP!
My draw function:
int DrawGLScene(GLvoid) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
DrawObjects();
glFlush ();
return TRUE;
}
When I click mouse rigth button I get pop up menu.
If I select some item everything goes OK.
But if I DONT select anything and click left button outside the menu
My scene disappear and I get NOT BLACK WINDOW like I said befor
but clean screen of glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT) function.
This is PopUpMenu handle function:
case WM_CONTEXTMENU:
if( (hPopMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_POPUP))) == NULL )
return 0;
hMenuTrackPopup = GetSubMenu(hPopMenu, 0);
TrackPopupMenuEx(hMenuTrackPopup,
TPM_LEFTALIGN | TPM_RIGHTBUTTON,
LOWORD(lParam),
HIWORD(lParam),
hWnd,
NULL);
DestroyMenu(hPopMenu);
break;
So do you know what is going on???
Thanks.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement