Sign in to follow this  

How do I make a dialog box dockable?

This topic is 3195 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

I've just relearnt how to use .rc files in VC++2008. Now I have a modeless dialog box that can come and go as I please, but I would like to make it dockable also. Just like the Solution Explorer in VC++2008 really. One other question. Is there a way to tell Windows to only open this dialog once at a time? Currently I can open another copy of the box even if one or more of the same dialogs are already on screen. Cheers.

Share this post


Link to post
Share on other sites
Unfortunately docking is not a standard control behaviour. You have to implement it yourself.

You could however use MFC (a huge wrapper for Win32) which could impose a problem by itself.

You could also take a look at CodeProject. There's a few docking libraries around (even with source).


For your second question:
You also have to implement that yourself. Shouldn't be too hard to carry a boolean flag in your program. If you mean to keep the dialog unique system wide (more than one program can only open one dialog) you might look into mutexes (e.g. CreateMutex with ERROR_ALREADY_EXISTS).

Share this post


Link to post
Share on other sites
Ah, thanks (and doh).

Yeah, the second question is no problem, I was just wondering if there was something built in.

Well I might poke around for some docking advice, although I think I'll stick with the KISS philosophy for now.

Share this post


Link to post
Share on other sites

This topic is 3195 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this