Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Embedding Dialogs
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Embedding Dialogs

 Post Reply Post Reply
Author
Message
c_koerber View Drop Down
Newbie
Newbie


Joined: 08 July 2003
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote c_koerber Quote  Post ReplyReply Direct Link To This Post Topic: Embedding Dialogs
    Posted: 09 July 2003 at 2:22am

How do I embedd a dialog into a docking pane.

I tried to use a method that worked with CMDIChildFrame well, but I cannot even create the CDalog derived class ( Create() fails ) with a docking pane as parent.

Here is what I do in OnDockingPaneNotify:

CMiniFrameWnd* pParent = reinterpret_cast<CMiniFrameWnd*>(pPane);

pMD = new MyDialog( pParent );

Create fails In the constructor of MyDialog.

______________________________________________________________

Aha, it works, if I use the Mainframe as parent.

 pMD = new MyDialog( this );

This arises a new problem, the dialog buttons vanish once clicked and don't reappear until the pane is resized.

_______________________________________________________________

Problem solved:

Remove the cancel and ok buttons. These have some default functinality which cause this behaviour.

Another note: Handle the event messages in the dialog, they don't reach the main frame.

________________________________________________________________

A final remark, I spent two days on the initial problem, so it's not like I wasn't thinking for myself

 



Edited by c_koerber
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2003 at 12:37pm

the better to use CFormView instead CDialog....

 

but if it works.... the better not to change anything

Back to Top
Indrajit View Drop Down
Newbie
Newbie
Avatar

Joined: 17 July 2004
Location: Australia
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Indrajit Quote  Post ReplyReply Direct Link To This Post Posted: 14 March 2005 at 9:32pm

How do I handle messages sent/received from/to child controls (such as Picture, edit, etc) placed in a dialog which is embedded in a docking pane? Please help.

An example of what I am looking at is dynamically resizing a static rectangle using GetWindowRect(...), then, recalulating the rect, and resizing it using SetWindowPos(...).

Your valuable time is much appreciated.

Thanks
Indrajit

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.