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

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


OCX Custom Font Property at Runtime (CFont to CFontHolder)

Martin Schlaghecke -- 100316.450@CompuServe.COM
Friday, September 13, 1996

Environment: VC++ 4.2, NT 3.51, NT 4.0 (Beta2)

Hi all,

I am implementing a OCX subclassed from a TreeView I want to have a Custom
Font Property Page on RunTime. Using the "normal" Font Dialog a get a CFont
back. The CFont could not be  converted to the CFontHolder used in
COleControl.

Is it possible to use the OLE Font-PropertyPage from the COleControl or is
it possible to get a CFontHolder out of the Dialog?
-- 

Regards
Martin 




Mike Blaszczak -- mikeblas@nwlink.com
Sunday, September 22, 1996

At 10:54 AM 9/13/96 +0200, "Martin Schlaghecke" <100316.450@CompuServe.COM>
wrote:
>Environment: VC++ 4.2, NT 3.51, NT 4.0 (Beta2)

>I am implementing a OCX subclassed from a TreeView I want to have a Custom
>Font Property Page on RunTime. Using the "normal" Font Dialog a get a CFont
>back. The CFont could not be  converted to the CFontHolder used in
>COleControl.

CFont provides enough information to initialize a FONTDESC that you'd provide
to CFontHolder::InitializeFont().

You might be better-off getting the information directly from CFontDialog
instead
of getting a CFont first.  Check out CFontDialog's m_cf member, which has
a pointer to a LOGFONT structure.

.B ekiM
http://www.nwlink.com/~mikeblas/
Don't look at my hands: look at my _shoulders_!
These words are my own. I do not speak on behalf of Microsoft.





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