Created
May 14, 2015 11:03
-
-
Save Neill3d/fcdc387aa0004eaea949 to your computer and use it in GitHub Desktop.
Sample showing how to catch MotionBuilder window handle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char windowTitle[128]; | |
HWND FindInParent(HWND wnd) | |
{ | |
if (wnd == nullptr) | |
return nullptr; | |
GetWindowText( wnd, windowTitle, 128 ); | |
if (strstr( windowTitle, "MotionBuilder" ) != nullptr ) | |
{ | |
return wnd; | |
} | |
return GetParent(wnd); | |
} | |
HWND GetMoBuHWND() | |
{ | |
HWND wnd = GetActiveWindow(); | |
return FindInParent(wnd); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment