Archived

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

NTense

Floating and Docking Toolbars

Recommended Posts

Is it possible to create floating/docking toolbars in Win32 without using MFC? I''ve created a toolbar, but it''s posted under the main menu. Does anyone know of some sample code out there for it?

Share this post


Link to post
Share on other sites
it''s definitely possible. photoshop had docking toolbars way before MFC was created.

the algorithm seems simple enough. when a toolbar is being dragged around you keep track of it''s updated bounds. when those bounds intersect with areas of your window that you have previously tagged somehow as dockable, you insert the toolbar into that area of the window. floating a toolbar just means you remove the toolbar from that "dockable" area and put it in its own child window.

as for the how of the coding, i don''t know win32 enough to help you out there. i''d try googling around for a while, there is doubtless something out there that can help more with the specifics.

at the same time, i''m forced to ask why you want to do this in win32 only when mfc already provides this functionality.

-me

Share this post


Link to post
Share on other sites