Sign in to follow this  

Win32 API Pop Up Menu and OpenGL

Recommended Posts

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.

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this