Print Page | Close Window

Embedding Dialogs

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=94
Printed Date: 23 November 2024 at 10:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Embedding Dialogs
Posted By: c_koerber
Subject: Embedding Dialogs
Date 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

 




Replies:
Posted By: Oleg
Date Posted: 09 July 2003 at 12:37pm

the better to use CFormView instead CDialog....

 

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



Posted By: Indrajit
Date 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

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net