Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 33

OPENGL Window in Quickwin - window order problem

$
0
0

I have created an opengl window from within a quickwin apllication. I have some other quickwin child windows and some modeless doalog boxes (tool boxes) open that can manipulate the content of the 3D graphic, I also have dynamic zoom/pan/spin of the OGL 3D scene with the mouse...

A problem I have is that anytime I click a quickwin dialog/child window/frame window the OGL window disappears into the backround i.e. behind the application frame window. I really need it on top of the frame window but could be fully or partly obsured by the quickwin childen of the frame window.

The creation code for the OGL window is show below (based on IFORT rings sample program), any ideas what I could try?

if (hInstance == NULL0) then
hInstance = GetModuleHandle(NULL0)
 wc%cbSize = sizeof(wc)
 wc%style = CS_OWNDC
 wc%lpfnWndProc = loc(WindowProc)
 wc%cbClsExtra = 0
 wc%cbWndExtra = 0
 wc%hInstance = hInstance
 wc%hIcon = LoadIcon(0_HANDLE, int(IDI_WINLOGO,LPVOID))
 wc%hCursor = LoadCursor(0_HANDLE, int(IDC_ARROW,LPVOID))
 wc%hbrBackground = (COLOR_WINDOW + 1) !NULL
 wc%lpszMenuName = NULL0
 wc%lpszClassName = loc(szClassName)
 wc%hIconSm = NULL0
 class_atom = RegisterClassEx(wc)
 if (class_atom == 0) then
 ret = MessageBox(NULL0, "RegisterClass() failed: Cannot register window class."C, "Error"C, MB_OK)
 hWnd = NULL0
 return
 end if
 end if
 ! Create the window
 lcl_title = trim(title) // CHAR(0)
 wflags=ior(WS_OVERLAPPEDWINDOW,WS_CLIPSIBLINGS)
 wflags=ior(wflags,WS_CLIPCHILDREN)
 !wflags=ior(wflags,WS_CHILD) not possible 
 hWnd = CreateWindowEx(0,szClassName, lcl_title, wflags, x, y, width, height, NULL0, NULL0, hInstance, NULL0)
 if (hWnd == NULL0) then
 ret = GetLastError()
 ret = MessageBox(NULL0, "CreateWindow() failed: Cannot create a window."C, "Error"C, MB_OK);
 return
 end if

Viewing all articles
Browse latest Browse all 33

Trending Articles