|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Paolo Giustinoni
|
Sep 16, 2006 - 7:13 AM
|
Sorry to disturb you... I have a question regardind the CExtPageContainerWnd class: I want to put a CExtPageContainerWnd class in a CExtResizableDialog, so the page container is hooked to the dialog. How can I do this?
Thanks, Paolo
|
|
Technical Support
|
Sep 16, 2006 - 11:15 AM
|
You can use the page container as a custom control on the dialog resource. Add the CExtPageContainerWnd m_wndPC; property to your dialog class, add the DDX_Control( pDX, IDC_YOUR_PAGE_CONTAINER, m_wndPC ); line of code into the DoDataExchange() virtual method of your dialog class, drop the custom control onto your dialog template resource, specify the IDC_YOUR_PAGE_CONTAINER as its identifier and ProfUIS-PageContainerWnd as the custom control’s window class name. Finally initialize pages of the m_wndPC window in the OnInitDialog() virtual method.
|
|
Paolo Giustinoni
|
Sep 22, 2006 - 9:16 AM
|
Can you provide me with an example about how to insert a CExtPageContainerWnd in a dialog? I explain you my problem: I’m trying to insert in a dialog box your CCustomDrawnPageContainer (from your examples). I added the CCustomDrawnPageContainer property, the DDX_Control(...), but it doesn’t work.. In particular, I can’t hook the CCustomDrawnPageContainer property to the custom control inserted in the Dialog.
Thanks, Paolo
|
|
Technical Support
|
Sep 22, 2006 - 10:01 AM
|
Here is a simple project which demonstrates how to create the page container control as a custom control. Please note that the control is non initialized, so you should do this yourself.
|
|
Paolo Giustinoni
|
Sep 22, 2006 - 10:55 AM
|
Thanks for your help.. But I have some trouble on insert the pages in the controls. My steps are the follow: 1. I create a dialog (with style=CHILD, border=NONE and CLIP CHILDREN) 2. I inserted as property in the main dialog 3. In the OnInitDialog(..) handler I create it (with Create(IDD, this)) 4. I call the m_wndPageContainer.PageInsert(dlg, ...) I have a Debug assertion in CExtPageContainerWnd->GetPageContainerWnd()
What I miss or wrong? Thanks, Paolo
|
|
Technical Support
|
Sep 22, 2006 - 12:53 PM
|
You wrote: 3. In the OnInitDialog(..) handler I create it (with Create(IDD, this)) Please ensure you have created the child page dialog as a child of the page container window and not as a child of the dialog window.
|
|
Paolo Giustinoni
|
Sep 22, 2006 - 1:55 PM
|
Exact... Sorry; I correct my mistake just after post the question... With this control, how can I set the __EPCW_PAGEBORDERS style to show the border?
|
|
Technical Support
|
Sep 24, 2006 - 10:09 AM
|
You can change the page container control’s styles using the CExtPageContainerWnd::ModifyPageContainerStyle() method: CExtPageContainerWnd * pWndPageContainer = . . .
pWndPageContainer->ModifyPageContainerStyle( __EPCWS_PAGE_BORDERS, 0, true );
|
|