Archived

This topic is now archived and is closed to further replies.

dockable dialog

This topic is 5588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to have in my tools application the same effect as WinAmp has. What I mean is that I want my dialogs to dock outside on the main window if I move a dialog close to it. Also I want that the dialogs move with the main window if they are docked to it. Someone knows how to do that (with mfc)? I have no idea... ;o( greeting the untaught

Share this post


Link to post
Share on other sites
Not sure if this would work, but it might (win32 code)


    
case WM_MOVING:
{
// let's say we want the window to dock to the top of the screen (as an example, of course)

RECT *pRect = (RECT*)lParam;
if (pRect->top <= 50) // if the window is 50 pixels close to the top

{
pRect->top = 0;
return(true);
}
} break;


Goblineye Entertainment
The road to success is always under construction

[edited by - Tornado on August 27, 2002 12:34:03 PM]

Share this post


Link to post
Share on other sites