Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Customizing OLE Stock Property Pages

Posted on 1997-01-21
1
271 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
twoTwo  challenge 35 107
Use of condition with 'serial' in ansible 2 70
Sed question 2 100
Dialogbox API leak? 18 98
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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…

792 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