|
-
May 5th, 1999, 11:58 AM
#1
Docking bars
If a cdialogbar class window is 'docked' then when you hit the close button on the control the mesage is routed as normal ie the app receievs the wm_close message (i've added my own handler for the close button). But when the bar is floating the app does not get the message. How can this be resolved?
The problem is the that the floating bar has been reparented by CMiniDockFrameWnd and my app does not get the message as this handles it.
-
May 5th, 1999, 12:09 PM
#2
Re: Docking bars
Don't you get a WM_CLOSE in your CDialogBar? You could call AfxGetMainWnd()->PostMessage() to notify the frame window that your dialog bar has been destroyed. If you don't get WM_CLOSE, you could handle DestroyWindow instead.
MJA
-
May 5th, 1999, 01:10 PM
#3
Re: Docking bars
Thanks for the response.
What I'm trying to do is display a dialog. If the user says 'OK' then close the bar and save any changes . If the user says 'Cancel' then leave it open. If the user says 'NO' then close without saving any changes.
The problem is that the CMiniDockFrameWnd has its own OnClose() which is not a virtual. I think this is getting the WM_CLOSE message before me.
-
May 6th, 1999, 09:15 AM
#4
Re: Docking bars
The answer is to derrive a class from CMiniDockFramWnd and then handle
OnClose() yourself. When the bar floats it will be parented with your own derrived class and not the default. You can then handle the wm_close message .
What you must do is assign the m_pFloatingFrameClass=MyDockingWindowClass in your overrriden CMDIFrameWnd class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|