RE: Property Sheet in a WTL dialog.
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
Thank you for your help.
From: Brandon Corfman [mailto:bcorfman@...]
Sent: Sunday, April 01, 2001 10:06 PM
Subject: Re: [wtl] Property Sheet in a WTL dialog.
My suggestion is to look at the second DevelopMentor WTL White Paper (found
http://www.develop.com/dm/dev_resources.asp). It has a section on property
and I think it has most, if not all, the answers you're looking for.
> I would like to put a property sheet on a dialog box with WTL but I seem
> be at some what of a stand still. I know about either
> 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.
> other words what is IDC_PROPERTSHEET in terms of a resource?
> The second approach is that I do the following in OnInitDialog
> m_propertySheet.ModifyStyleEx(0, WS_EX_CONTROLPARENT);
> m_propertySheet.ModifyStyle(0, WS_TABSTOP);
> 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
> 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
> 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
> WM_CREATE or simliar point to initialize or save the property sheets.
> Any suggestions?
> Thank you.
> Kevin Burton
> To unsubscribe from this group, send an email to:
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
To unsubscribe from this group, send an email to:
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/