Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. OpenGL Inventor and Windows Platform SDk

OpenGL Inventor and Windows Platform SDk

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsgame-devquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    codingfreak
    wrote on last edited by
    #1

    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

    _ 1 Reply Last reply
    0
    • C codingfreak

      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

      _ Offline
      _ Offline
      __yb
      wrote on last edited by
      #2

      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)
          }
      }
      
      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups