Skip to content

Instantly share code, notes, and snippets.

@Neill3d
Created May 14, 2015 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neill3d/fcdc387aa0004eaea949 to your computer and use it in GitHub Desktop.
Save Neill3d/fcdc387aa0004eaea949 to your computer and use it in GitHub Desktop.
Sample showing how to catch MotionBuilder window handle
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