I'm writing an application for Unigraphics NX5 (UG) that is launched internally, as it is a DLL file. The application calls CreateWindowEx and then enters a simple message loop:
- Code: Select all
HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
HWND ug = UF_UI_get_default_parent ( ); // This is the parent window of my new window, which is UG
hwndMain = CreateWindowEx(0,
This doesn't include registering the class and so forth, but I assume that it is unrelated to my question.
Anyway, using spy++, I noticed there was a window named "3DxWare Client Interface" where all the motion messages are ending up. They are 0xC109 Registered: "MotionEvent". Accompanying these are WM_SETCURSOR messages set to the display window of UG, which is a child of the MDIclient.
However, after I create my window, the WM_SETCURSOR messages are no longer reaching the display window, and my device stops working with UG. I've had this problem since the spaceball 2002C. I'm currently using a Space Pilot, but I've had this problem on every 3Dxware device I've used.
I can't figure out where they are going, and am also assuming they are vital for interaction of 3DxWare with UG. It doesn't look like my new window is eating the WM_SETCURSOR messages, it just looks like they aren't being set to UG's window. While this is happening, all of the 0xC109 messages are still reaching the 3DxWare Client Interface window with no problem.
So far, I've tried setting up some filters, such as having my window ignore messages > 0xC000, setting the second parameter of GetMessage to the handle of the window I've created, and a couple of other things, all to no avail. Anyone have any ideas? I know that I probably should be doing something else so not to snarf all of the messages from UG, but I'm not really sure what exactly.
Thanks for any help, let me know if more information is needed.