<div dir="ltr">Hi Anders,<div><br></div><div>here is what I do for this on Windows</div><div><br></div><div><div> while (!viewer->done())</div><div> {</div><div><br></div><div>#if defined(_WIN32)</div><div> MSG msg;</div><div> if (::PeekMessage(&msg,NULL,0,0,PM_NOREMOVE))</div><div> {</div><div> ::GetMessage(&msg, NULL, 0, 0);</div><div><br></div><div> if (wins.size())</div><div> {</div><div> osgViewer::GraphicsHandleWin32 *hdl = dynamic_cast<osgViewer::GraphicsHandleWin32*>(<a href="http://wins.at">wins.at</a>(0));</div><div> if(hdl)</div><div> {</div><div> WNDPROC fWndProc = (WNDPROC)::GetWindowLongPtr(hdl->getHWND(), GWLP_WNDPROC);</div><div> if (fWndProc && hdl->getHWND())</div><div><span class="" style="white-space:pre"> </span>{</div><div><span class="" style="white-space:pre"> </span>::CallWindowProc(fWndProc,hdl->getHWND(),msg.message, msg.wParam, msg.lParam);</div><div><span class="" style="white-space:pre"> </span>}</div><div> }</div><div> }</div><div> }</div><div>#endif</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 11, 2015 at 4:21 PM, Anders Backman <span dir="ltr"><<a href="mailto:andersb@cs.umu.se" target="_blank">andersb@cs.umu.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi.<div><br></div><div>Trying the 3DConnexion SpaceNavigator with OSG. However I would like to stay away from VRPN and such dependencies...</div><div><br></div><div>I was wondering how to best intercept Windows messages from the GraphicsWindowWin32 class.</div><div><br></div><div>This class has a virtual method handleNativeWindowingEvent which I would like to override to catch custom messages from my device.</div><div><br></div><div>Would it be possible to implement a derived class and have that instantiated instead of the standard osgViewer::GraphicsWindowWin32 one?</div><div><br></div><div>Or is there a different method to listen to the messages:</div><div><br></div><div>( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )<br></div><div><br></div><div>Thanks,</div><div>Anders</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br clear="all"><div><br></div>-- <br><div>__________________________________________<br>Anders Backman, HPC2N<br>90187 Umeå University, Sweden<br><a href="mailto:anders@cs.umu.se" target="_blank">anders@cs.umu.se</a> <a href="http://www.hpc2n.umu.se/" target="_blank">http://www.hpc2n.umu.se</a><br>Cell: <a href="tel:%2B46-70-392%2064%2067" value="+46703926467" target="_blank">+46-70-392 64 67</a></div>
</div></font></span></div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">trajce nikolov nick<br></div>
</div>