RE: Property Sheet in a WTL dialog.
Hello,
I have read this White Paper (WTL Makes UI Programming a Joy, Part 2: The
bells and whistles) but the section on property pages only shows how to
implement a "DoModal" type of dialog. It was from this example that I
started to look at deriving from CPropertySheetImpl. If I use this approach
do I have to use DoModal? If I just have a dialog based application or a
form view type of application what methods can I override at the beginning
and the end to initialize and save the results of the property pages
respectively?
Thank you for your help.
Kevin Burton
kevin.burton@...
-----Original Message-----
From: Brandon Corfman [mailto:bcorfman@...]
Sent: Sunday, April 01, 2001 10:06 PM
To: wtl@...
Subject: Re: [wtl] Property Sheet in a WTL dialog.
Hi Kevin
My suggestion is to look at the second DevelopMentor WTL White Paper (found
at
http://www.develop.com/dm/dev_resources.asp). It has a section on property
pages
and I think it has most, if not all, the answers you're looking for.
Best regards,
Brandon
kevin.burton@... wrote:
> I would like to put a property sheet on a dialog box with WTL but I seem
to
> be at some what of a stand still. I know about either
> m_propertySheet.SubclassWindow(GetDlgItem(IDC_PROPERTYSHEET));
> or
> m_propertySheet.Attach(GetDlgItem(IDC_PROPERTYSHEET));
> The problem with these two approaches is that I don't know what to put on
> the dialog box resource to act as a place holder for the property sheet.
In
> other words what is IDC_PROPERTSHEET in terms of a resource?
>
> The second approach is that I do the following in OnInitDialog
> m_propertySheet.Create(m_hWnd);
> m_propertySheet.ModifyStyleEx(0, WS_EX_CONTROLPARENT);
> m_propertySheet.ModifyStyle(0, WS_TABSTOP);
> m_propertySheet.CenterWindow();
> This "works" but I end up creating a child window that sits on top of the
> main dialog. When the property sheet is closed I am left with a blank
dialog
> and no way to close it. I wanted the IDOK buttons on the property sheet to
> act for the whole application, or at least some "global" way of shutting
> down the application. And, I don't want to have to close the property
sheet
> AND close the application. This method worked for putting a property sheet
> on a dialog with MFC but it does not seem to "attach" to the main page.
>
> Finally I derived CMainDlg from CPropertySheetImpl<CMainDlg>. This worked
> fairly well but I don't have much control over the window, OnInitDialog is
> no longer called and I am not sure where to put "initialization" and
> "shutdown" code as it seems the main dialog does not get WM_DESTROY,
> WM_QUIT, etc. Also as I mentioned OnInitDialog is not called as there is
no
> WM_CREATE or simliar point to initialize or save the property sheets.
>
> Any suggestions?
>
> Thank you.
>
> Kevin Burton
> kevin.burton@...
>
>
> To unsubscribe from this group, send an email to:
> wtl-unsubscribe@...
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
To unsubscribe from this group, send an email to:
wtl-unsubscribe@...
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/