if container moving , how can I receive WM_MOVE In the ActiveX control ?
Printable View
if container moving , how can I receive WM_MOVE In the ActiveX control ?
One way to do this would be to use the RegisterWindowMessage function to register a unique global message to send to all windows (in the container class).
In the WM_MOVE message handler of the container, call the PostMessage or SendMessage function with the 1st parameter being HWND_BROADCAST. THE WPARAM message parameter could be the x coordinate passed into the WM_MOVE message handler and the LPARAM message parameter could be the y coordinate passed into the WM_MOVE message handler.
The ActiveX control would require the custom message to be registered in its message map and a corresponding handler created for that message.