Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Customizing OLE Stock Property Pages

Posted on 1997-01-21
1
Medium Priority
?
281 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 400 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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…

927 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