15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


OLE Font property page

Julius Hamelberg -- jhamelberg@dca.com
Monday, July 15, 1996

     Env: VC++ 4.1 under Win 95 and WinNT
     
     Hello all,
     
     In the font property page provided by MFC, I would like to only 
     display fixed pitched fonts for the user to select from.
     
     [Q] Can I enumerate the fonts when the dialog initializes and filter 
     the fonts I do not want? If yes any suggestions?
     
     Thanks in advance
     




Julius Hamelberg -- jhamelberg@dca.com
Thursday, July 18, 1996

[Mini-digest: 2 responses]

     Env: VC++ 4.1 under Win 95 and WinNT 3.51
     
     Hello all,
     
     In the font property page provided by MFC, I would like to only 
     display fixed pitched fonts for the user to select from.
     
     [Q] Can I enumerate the fonts when the dialog initializes and filter 
     the fonts I do not want? If yes any suggestions?
     
     Thanks in advance
     

-----From: "Mike Blaszczak" 

MFC doesn't provide a font property page.  Do you mean that you're writing an 
OLE control and you've created a font property to which you've hooked the 
standard font property page?  Or do you mean that you want the CFontDialog to 
only list fixed-pitch fonts when it is displayed?  It's really hard to tell, 
since you say "property page" in the first part of your note, but "dialog" in 
the second part of your note.

The CHOOSEFONT structure, which is at the core of the CFontDialog class in 
MFC, has a flags member.  That flags member can have a flag called 
CF_FIXEDPITCHONLY which, when set, will cause the CFontDialog to display only 
fixed-pitch fonts.

.B ekiM
http://www.nwlink.com/~mikeblas

----------
From: 	owner-mfc-l@netcom.com on behalf of Julius Hamelberg
Sent: 	Monday, July 15, 1996 12:17 PM
To: 	mfc-l@netcom.com; jhamelberg@dca.com
Subject: 	OLE Font property page

     Env: VC++ 4.1 under Win 95 and WinNT
     
     Hello all,
     
     In the font property page provided by MFC, I would like to only 
     display fixed pitched fonts for the user to select from.
     
     [Q] Can I enumerate the fonts when the dialog initializes and filter 
     the fonts I do not want? If yes any suggestions?
     
     Thanks in advance
     





John Moulder -- jm@wg.icl.co.uk
Monday, July 22, 1996

[Mini-digest: 2 responses]

At 15:59 18/07/96 EST, you wrote:
>[Mini-digest: 2 responses]
>
>     Env: VC++ 4.1 under Win 95 and WinNT 3.51
>     
>     Hello all,
>     
>     In the font property page provided by MFC, I would like to only 
>     display fixed pitched fonts for the user to select from.
>     
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.
You could use the font property page as a base class for you application's page.

-----From: "Julius Hamelberg" 

     
     What I mean is that I am writing an OLE control and have created a 
     font property to which I have hooked the standard font property page 
     and I only want to display fixed pitch font.
     
     Do I have access to the CHOOSEFONT structure in the standard font 
     property page?
     
     Thanks for the clarification and the response. Very appreciated.
     
     Julius.



John & Annette Elsbree -- elsbree@msn.com
Thursday, July 25, 1996

Julius -

There is no way to override the default behaviour of the stock font property 
page. This is because your control class just provides the class ID of the 
property page to the system, and the page itself is instantiated via a call to 
CoCreateInstance, with no further intervention on the part of your control.

If you want different behaviour, you'll need to provide your own property page 
implementation. After all, we couldn't get away with calling it a "stock" 
property page, if you could customize it... :-)

Feel free to borrow code from ppgstock.cpp and ppgfont.cpp to build your 
custom page class.

John ("not speaking for Microsoft") Elsbree

----------
From: 	owner-mfc-l@netcom.com on behalf of Julius Hamelberg
Sent: 	Monday, July 15, 1996 12:17 PM
To: 	mfc-l@netcom.com; jhamelberg@dca.com
Subject: 	OLE Font property page

     Env: VC++ 4.1 under Win 95 and WinNT
     
     Hello all,
     
     In the font property page provided by MFC, I would like to only 
     display fixed pitched fonts for the user to select from.
     
     [Q] Can I enumerate the fonts when the dialog initializes and filter 
     the fonts I do not want? If yes any suggestions?
     
     Thanks in advance
     





djw@arbortext.com
Thursday, July 25, 1996

>...
>Take a look at http://users.aol.com/chinajoe/wcmfclib.html. This is contains
>...

The zip file of MFC code referred to from that WEB page doesn't seem to be
there.  Any suggestions?

Dave Wilson  djw@arbortext.com




| Вернуться в корень Архива |