Solved

CFontDialog in a CPropertyPage

Posted on 1997-12-08
3
468 Views
Last Modified: 2013-11-20
I need to insert a common dialog (CFontDialog) into a property page (CPropertyPage). The font dialog should be displayed on a property page, but user should choose OK, Cancel and Apply buttons from property sheet (CPropertySheet) - not from CFontDialog.
I DON'T want to build my own font dialog and create the property page from template - it HAVE TO be this one defined as common dialog in Windows.
It'n not neccessary to use directly CFontDialog - maybe there is another way to use common dialogs?
0
Comment
Question by:habryka
[X]
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
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 200 total points
ID: 1311768
Font picture and color property pages are wrapped by internal MFC classes CFontPropPage, CPicturePropPage and CColorPropPage. All these classes are derived from base class CStockPropPage which is in turn derived from COlePropertyPage. You can find CFontPropPage class in ctlimpl.h and fontprop.cpp. To embedd this page in Property sheet you can create page as Property sheet child window and then hide Ok and Apply buttons. When user cliks Ok or Apply buttons on Property sheet you should call IPropertyPage::Apply.
0
 

Author Comment

by:habryka
ID: 1311769
I found these classes and files, but what exactly should I do: include ctlimpl.h as a header and use CFontPropPage instead CPropertyPage (or perhaps derive my own class from CFontPropPage)?
Or should I only use definition of CFontPropPage as an example.
My goal is to create this property page this way, so that when Microsoft changes something in common font dialog, it should change also in my application. In other words this font property page should always look the same as the common font dialog in other windows applications.
Maybe you have some piece of code to solve my problem?
0
 
LVL 7

Expert Comment

by:galkin
ID: 1311770
Unfortunally, I have never implemented this myself but I can use CFontPropPage instead of one of the pages in your property sheet. Yes template itself is in OLE DLLs so you should not worry about its change when using this class.
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
Process filename extension 3 209
withoutTen challenge 14 137
Use of condition with 'serial' in ansible 2 88
Excel file not created as expected 7 93
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.

749 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