Property Sheets
mkropp@BIX.com
Thursday, August 17, 1995
I need to do sort of a custom Property sheet dialog without the standard
buttons but some other buttons instead. Is there a fairly standard way to
get rid of the OK, Cancel, Apply, and Help buttons and add others? What do
they belong to: a property page or the property sheet?
/\/\ike Kropp
Image Software
Terry Peterson -- petersot@motsat.sat.mot.com
Friday, August 18, 1995
> From owner-mfc-l@netcom.com Thu Aug 17 21:03:06 1995
> Subject: Property Sheets
Rick Esterling -- rick@eco.twg.com
Friday, August 18, 1995
On 17 Aug 95 at 16:52, mkropp@bix.com wrote:
> I need to do sort of a custom Property sheet dialog without the standard
> buttons but some other buttons instead. Is there a fairly standard way to
> get rid of the OK, Cancel, Apply, and Help buttons and add others? What do
> they belong to: a property page or the property sheet?
The default buttons belong to the CPropertySheet-derived object.
They are only present (by default) if you invoke the sheet as a
modal dialog. If you invoke the sheet object by calling Create(),
but buttons will not be there. Both statements above are true
whether you instantiate an object directly from CPropertySheet or
even if you derive a class from CPropertySheet and instantiate an
object from your derived class.
If you look up CPropertySheet in Books Online, at the bottom
you'll see "...see the article "Property Sheets" in Programming with
the Microsoft Foundation Class Library". Follow that link and you'll
find all of this information and more.
Good luck,
LeRoy Baxter -- lbaxter@cinfo.com
Friday, August 18, 1995
the buttons indicated belong to the PropertySheet
^^^^^^
to get reid of them, get their ID's and then ShowWindow(SW_HIDE)
----------
From: mkropp@BIX.com[SMTP:mkropp@BIX.com]
Sent: Thursday, August 17, 1995 9:52 AM
To: mfc-l@netcom.com
Subject: Property Sheets
I need to do sort of a custom Property sheet dialog without the standard
buttons but some other buttons instead. Is there a fairly standard way to
get rid of the OK, Cancel, Apply, and Help buttons and add others? What do
they belong to: a property page or the property sheet?
/\/\ike Kropp
Image Software
matthew@thor.udc.neweast.ca
Sunday, February 04, 1996
Hello,
From a look at the property sheet documentation it appears that
the pages have to be derived from resource keys, and not in-memory
resource templates. If this is so, is there any technical
reason why the property pages cannot be constructed from templates?
--
Matthew Newhook. matthew@neweast.ca, http://www.engr.mun.ca/~matthew
Software Development. Ultimateast Data Communications Limited.
John & Annette Elsbree -- elsbree@msn.com
Monday, February 05, 1996
True, the MFC wrappers for the Win32 property sheet API are geared toward
dialog templates loaded from resources, but you still have the option of using
an in-memory dialog template. And pretty painless, in fact (once you know
where to look):
CPropertyPage page;
page.m_psp.pResource = pDlgTemplate;
page.m_psp.dwFlags |= PSP_DLGINDIRECT;
Documentation on doing this can be found in the product. Go to the
"CPropertyPage Class Members" topic and you'll see the m_psp member. Click on
PROPSHEETPAGE (the type of m_psp) and you'll see all of the options provided
by the underlying API.
//mfcTeam.m_johnels; // does not represent Microsoft
----------
From: owner-mfc-l@netcom.com on behalf of matthew@thor.udc.neweast.ca
From a look at the property sheet documentation it appears that
the pages have to be derived from resource keys, and not in-memory
resource templates. If this is so, is there any technical
reason why the property pages cannot be constructed from templates?
John Moulder -- jm@wg.icl.co.uk
Tuesday, February 06, 1996
At 16:54 04/02/96 -0330, you wrote:
>Hello,
> From a look at the property sheet documentation it appears that
> the pages have to be derived from resource keys, and not in-memory
> resource templates. If this is so, is there any technical
> reason why the property pages cannot be constructed from templates?
>
>--
>Matthew Newhook. matthew@neweast.ca, http://www.engr.mun.ca/~matthew
>Software Development. Ultimateast Data Communications Limited.
>From a quick browse of the 16 bit MFC property sheet/page code, I don't see
why not.
Of course, it probably quite a bit of work as you will have do define your
own CPropertyPage derived class and re-implement functions like :
CPropertyPage::CreatePage() calls CDialog::Create()
CPropertyPage::LoadCaption() loads resource and gets caption
CPropertyPage::CommonConstruct() to make things consistent???
and anything else that uses the CPropertyPage m_lpDialogTemplate variable.
Hope this helps.
John
| Вернуться в корень Архива
|