CDialogBar help

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

There is internal MFC class CDockBar responsible for docking control bars. CControlbar class has a pointer to CDockBar and CDockBar's member function ReDockControlBar is called when redocking is neccessary
phueneAuthor Commented:
Thank you for the comment.  I've looked over the MFC source code and I now see the member pointer to the CDockBar class, but I'm not sure how this would help me, since I can't modify the member functions of CDockBar (without recompiling mfc of course).  I need someway to have the framework tell me when the docking status of the dialog bar has changed, as well, I need to know what happens and how to over-ride it when the user clicks on the "x" of the floating dialog bar.  Thanks.
                Peter Huene
Murali Devarakonda4WeekStartup.guruCommented:
All messages for the CDialogBar go to it's parent- the Frame.
You can add handlers for relevant messages in either the Frame, View, Doc or App class(es).

Check out

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

phueneAuthor Commented:
Does that include messages like WM_CLOSE and WM_SHOWWINDOW?  Or just control notification messages?
Murali Devarakonda4WeekStartup.guruCommented:
The DialogBar class gets the WM_SHOWWINDOW. I don't see anyone getting the WM_CLOSE notification. You are right- the DialogBar is hidden, not closed.

You can implement custom behaviour by overriding OnCmdMsg.
phueneAuthor Commented:
Ok well, I see it gets WM_SHOWWINDOW, because OnShowWindow() is being called, but it isn't being called when the dialog bar is being hidden as a result of the user "closing" the dialog bar (selecting the close button).  Any ideas?
Murali Devarakonda4WeekStartup.guruCommented:
Try using Spy++ utility that comes with Visual C++. You can monitor all messages generated by user interaction.

Good luck.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.