Make somebody else's window dock...

Started by
1 comment, last by Fresh 22 years, 6 months ago
Hello. Is it possible, given the handle to a window which already has been created, to make it dockable ? Simple question, although I''m not sure of the answer... r. "The mere thought hadn''t even begun to speculate about the slightest possibility of traversing the eternal wasteland that is my mind..."
Advertisement
Simple answer: no.
Long answer, yes.

Create a hook in windows that traps a threads messages using the setwindowshookex function. Get the right thread by using the GetWindowThreadProcessId function.

Use the WH_CALLWNDPROC parameter to grab the messages sent with SendMessage (should include WM_MOVE I think) or WH_GETMESSAGE if it is PostMessage. One of them will trap the message. Probably WH_CALLWNDPRO.

Check to see if the window is in a position that docks. If so, send another message telling it to move to the new, docked, locatoin. Careful not to get into a recursive loop though...

Edited by - ludemann8 on October 18, 2001 8:11:17 AM

This topic is closed to new replies.

Advertisement