Embedding Dialogs |
Post Reply |
Author | |
c_koerber
Newbie Joined: 08 July 2003 Status: Offline Points: 4 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
the better to use CFormView instead CDialog....
but if it works.... the better not to change anything |
|
Indrajit
Newbie Joined: 17 July 2004 Location: Australia Status: Offline Points: 5 |
Post Options
Thanks(0)
|
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
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |