Win32 API Pop Up Menu and OpenGL

Started by
0 comments, last by _the_phantom_ 18 years, 10 months ago
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.
Advertisement
Please dont cross post
I'll leave the one with the most replies open.

This topic is closed to new replies.

Advertisement