Customizing the font dialog

This is an implementation of my class and the dialog template.

The motivation for doing that:

Our program stores font info in the drawing. It may happen that I save the picture on one machine, take it to the other one, edit it there and take it back to the first one. Now suppose the first machine has font "StrangeFont CE" while the second one does not. We do not want to convert anything if the user does not intend to (we just display some other font but save with the original one).

To make the things more complicated (we do zooming), we save font height as double, negative meaning "height undefined" - ie. specified by other means. (Therefore the two added controls to the dialog.)

This example:

1. Adds two controls and handles them, using DDX and Fail() method as well. It also shows handling of WM_ACTIVATEAPP and WM_QUERYENDSESSION not to pop-up error messagebox in vain.

2. It adds a special font to the combo box and if it is selected, disables font style and script combos.

Download files



Comments

  • Works well !!

    Posted by Legacy on 02/22/2002 12:00am

    Originally posted by: Saravanan K


    This code works well for me.

    Try to change the code as below in the InitDialog() function as below..

    CWnd *cwnd = 0;
    cwnd = GetDlgItem(0x0442); // address for stc3
    if(cwnd)cwnd->ShowWindow(SW_HIDE);

    Happy coding!!!

    sarav

    Reply
  • This does not work

    Posted by Legacy on 10/06/1998 12:00am

    Originally posted by: Craig

    These files arent even close to compiling right, whats the deal with the 10 includes at the top of the .cpp file? Who has those?

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • IT decision support impacts all aspects of technology management, from governance and strategy to budgets and resource planning. IT decision support effectiveness often falls prey to data-driven challenges that make it difficult to understand the data in context. These challenges: overwhelming data volumes, heterogeneous data types, and growing data complexity. This Forrester Consulting Paper reports the three key findings from their study conducted, on behalf of BDNA, to test the hypothesis that data …

  • Packaged application development teams frequently operate with limited testing environments due to time and labor constraints. By virtualizing the entire application stack, packaged application development teams can deliver business results faster, at higher quality, and with lower risk.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds