Solved

Customizing OLE Stock Property Pages

Posted on 1997-01-21
1
262 Views
Last Modified: 2013-11-25
How do I customize the stock property pages in an ocx? Specifically, how do I make the stock font property page display fixed pitch fonts only?

Thanks for any help,
Rondal
0
Comment
Question by:rondal
1 Comment
 

Accepted Solution

by:
nkothari earned 200 total points
ID: 1300044
MFC's COleFontPropPage is defined in ctlimpl.h and implemented in PpgFont.cpp.

Derive your property page from COleFontPropPage, and all you need to do is override

COleFontPropPage::EnumFontFamiliesCallBack
This function is called once for each font when Windows returns info about existing fonts.  It calls an AddFont method.
What you need to do is test the attributes of the font in question and determine if you'd like the font property page to show it in its combo box.

CFontPropPage will handle all the rest (size choices, bold/italic etc. and even user selection)

So all you need to do basically is impose a filter in between by overriding the method above.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
dog bark java program 15 82
lucky13 challenge 11 112
Window placement 17 65
how to split multiple lines delimiter : 8 54
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now