dialog box fonts

This is a discussion on dialog box fonts within the Windows Programming forums, part of the Platform Specific Boards category; Hi, just a quick question, I hope. How can I change the fonts used on a dialog box (static text ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    10

    dialog box fonts

    Hi,

    just a quick question, I hope.

    How can I change the fonts used on a dialog box (static text
    and a list box). The book I have mentions PNSetFont function
    but MSVC++ doesn't even recognise this function, which is
    strange because all the examples are for MSVC++.

    Also, If I need to format text and numbers for an dialog I usually use sprintf(), is there a better way of doing this because it doesn't format the text very evenly?

    Thanks,
    rob
    www.goldroad.co.uk
    freeware ARM assembler
    dynarec gameboy advance emulator
    try them now!

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    >sprintf

    You can use the CString Format function, but it does basically
    the same.

    window.SetFont( &CFont ) will set the font of any window.
    You obviously need a CFont Object before you call this funtion.
    Create one as a member of you dialog and call it's CreateFont()
    function in OnInitDialog.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    10
    thanks for the help

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 01:59 PM
  2. Parent of a BrowseForFolder dialog box
    By @nthony in forum Windows Programming
    Replies: 4
    Last Post: 01-08-2007, 01:54 PM
  3. Display Dialog Box Then Execute
    By stickman in forum C++ Programming
    Replies: 17
    Last Post: 05-10-2006, 11:02 AM
  4. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 07:00 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21