Embedding a CColorDialog in a CPropertySheet ....
Stanley Man-Kit Ho -- stanleyh@majordomo.netcom.com
Tuesday, August 20, 1996
Hi,
Environment: VC++ 4.2, Win 95
I would like to group the CFontDialog and CColorDialog in a single
CPropertySheet and multiple CPropertyPage. How can I do this?? Since
CFontDialog and CColorDialog are derived from CDialog and so do CPropertyPage,
I assume it can be done. Thanks for any help.
Stanley 8^)
--
______________________________________________________________________________
Stanley Man-Kit Ho Email: stanleyh@netcom.com
Internet Commerce Division, Novell. mho@novell.com
WWW: http://www.novell.com Running Windows 95/NT, OS/2 Warp
______________________________________________________________________________
Niels Ull Jacobsen -- nuj@kruger.dk
Monday, August 26, 1996
At 13:13 20-08-96 -0700, you wrote:
>Hi,
>
> Environment: VC++ 4.2, Win 95
>
> I would like to group the CFontDialog and CColorDialog in a single
>CPropertySheet and multiple CPropertyPage. How can I do this?? Since=20
>CFontDialog and CColorDialog are derived from CDialog and so do CPropert=
yPage,
>I assume it can be done. Thanks for any help.
FAQ. You can't add common dialogs to a property sheet. You'll have to
reimplement them on your own.
I saw some source for this somewhere on the WWW, but I can't remember whe=
re.
> Stanley 8^)
Niels Ull Jacobsen, Kr=FCger A/S (nuj@kruger.dk)
Everything stated herein is THE OFFICIAL POLICY of the entire Kruger=20
group and should be taken as legally binding in every respect.=20
Pigs will grow wings and fly.
Manish Chopra -- manish@earthlink.net
Tuesday, August 27, 1996
[Mini-digest: 3 responses]
Make a class derived from CPropertyPage and use AddPage from the=20
CPropertySheet derived class. CPropertyPage class is nothing but a=20
CDialog.And then you are a free bird.
Niels Ull Jacobsen wrote:
>=20
> At 13:13 20-08-96 -0700, you wrote:
> >Hi,
> >
> > Environment: VC++ 4.2, Win 95
> >
> > I would like to group the CFontDialog and CColorDialog in a sin=
gle
> >CPropertySheet and multiple CPropertyPage. How can I do this?? Since
> >CFontDialog and CColorDialog are derived from CDialog and so do CPrope=
rtyPage,
> >I assume it can be done. Thanks for any help.
>=20
> FAQ. You can't add common dialogs to a property sheet. You'll have to
> reimplement them on your own.
> I saw some source for this somewhere on the WWW, but I can't remember w=
here.
>=20
> > Stanley 8^)
> Niels Ull Jacobsen, Kr=FCger A/S (nuj@kruger.dk)
> Everything stated herein is THE OFFICIAL POLICY of the entire Kruger
> group and should be taken as legally binding in every respect.
> Pigs will grow wings and fly.
-----From: John Moulder
This came up about a month ago, check the archives :-)
Take a look at http://users.aol.com/chinajoe/wcmfclib.html. This is contains
two CPropertyPage derived classes for the colour and font common dialogs.
-----From: James Shao
This can be done. All you need to do is to grab the source code from MFC\sr=
c=20
related .cpp files, also run developer studio to open related .rc file=20
and copy the two dialogs into your project.=20
I forgot the filenames. But you can use grep to find it out.
You need to make necessary modifications on the source code to make it work=
.=20
In this way, you can also customize the functionality of the two property p=
ages.
I have done it successfully.
James Shao=20
| Вернуться в корень Архива
|