I have a problem with mouse input in my OGL app.
If mouse pointer is ower GL window i get only nonClient
area mouse messages. The weird thing is that sometimes
it works as intended. SetCapture does not help!
(If i click ower my app - i get WM_KILLFOCUS.
If i use Alt+Tab - click on other app (undo SetCapture)
and Alt+Tab again - i have my mouse back.)
WindowSetup:
RegisterClass(wc); - new window class ChangeDisplaySettings(SS,CDS_FULLSCREEN)); H_wnd:=CreateWindowEx(WS_EX_APPWINDOW,'z','zz',WS_POPUP or WS_CLIPSIBLINGS or WS_CLIPCHILDREN,0,0,X,Y,0,0,hinstance,NIL); dwFlags:=PFD_DRAW_TO_WINDOW or PFD_SUPPORT_OPENGL or PFD_DOUBLEBUFFER; iLayerType:=PFD_MAIN_PLANE; h_Dc:=GetDC(h_Wnd); PF:=ChoosePixelFormat(h_Dc,@pfd); SetPixelFormat(h_Dc,PF,@pfd); h_Rc:=wglCreateContext(h_Dc); wglMakeCurrent(h_Dc,h_Rc); ShowWindow(h_Wnd,SW_SHOW); ShowCursor(False); - no cursor please SetFOcus(h_Wnd) SetForegroundWindow(h_Wnd) SetCapture(h_Wnd);
I do not get any errors on seting up my window (except
SetForegroundWindow that gives me allways the same
error - as GetLastError says “The operation completed
successfully” error in manual?)
Any idea ?