diff --git a/include/osgViewer/api/Win32/GraphicsWindowWin32 b/include/osgViewer/api/Win32/GraphicsWindowWin32 index 927c6a236..e359bd940 100644 --- a/include/osgViewer/api/Win32/GraphicsWindowWin32 +++ b/include/osgViewer/api/Win32/GraphicsWindowWin32 @@ -106,6 +106,9 @@ class OSGVIEWER_EXPORT GraphicsWindowWin32 : public osgViewer::GraphicsWindow, p protected: void init(); + + void registerWindow(); + void unregisterWindow(); bool registerWindowProcedure(); bool unregisterWindowProcedure(); diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index 0c2f19722..160c9fc89 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -1334,6 +1334,16 @@ void GraphicsWindowWin32::destroyWindow( bool deleteNativeWindow ) _destroying = false; } +void GraphicsWindowWin32::registerWindow() +{ + Win32WindowingSystem::getInterface()->registerWindow(_hwnd, this); +} + +void GraphicsWindowWin32::unregisterWindow() +{ + Win32WindowingSystem::getInterface()->unregisterWindow(_hwnd); +} + bool GraphicsWindowWin32::registerWindowProcedure() { ::SetLastError(0);