OpenGL Inventor and Windows Platform SDk
-
Hi all, I am developing a visualization tool using VC++ and openGL Inventor. I am using OpenGL Inventor for rendering the scenegraph information. In the scenegraph, I created so many nodes. What I need to do is to edit the node by prompting a dialog box,which will ask for translational and rotational values. To show the dialog box, I used DialogBox() function in the event callback of one of the scenegraph nodes. But after getting the values from the prompted DialogBox, the control is going back to the scenegraph event callback by default. I need to transfer the control to the main window. It would be great if anybody suggest me some workarounds for this?? -NG
-
Hi all, I am developing a visualization tool using VC++ and openGL Inventor. I am using OpenGL Inventor for rendering the scenegraph information. In the scenegraph, I created so many nodes. What I need to do is to edit the node by prompting a dialog box,which will ask for translational and rotational values. To show the dialog box, I used DialogBox() function in the event callback of one of the scenegraph nodes. But after getting the values from the prompted DialogBox, the control is going back to the scenegraph event callback by default. I need to transfer the control to the main window. It would be great if anybody suggest me some workarounds for this?? -NG
I dont know Inventor but what u should basically do is to call TranslateMessage and DispatchMessage for every message. For this u must have all the message params including HWND or u can run your dialog modal - run a modal loop. Here's a very basic one that can fit a openGL app:
WindowProc(...) { : } : // modal loop CreateWindow(...); for( ;; ) { PeekMessage(...); if( dialog closed ) break; if( message ) { if( hWnd != myWnd ) continue; TranslateMessage(...); DispatchMessage(...); // tihs will call WindowProc } else { // no message // idle -> render the gl window(s) } }