setting font in buttons etc.

This is a discussion on setting font in buttons etc. within the Windows Programming forums, part of the Platform Specific Boards category; Hallo, i wrote small application with couple of text outputs, dialogs and buttons, but i'm quite disappointed with it's interface: ...

  1. #1
    Registered User lobo's Avatar
    Join Date
    Oct 2001
    Posts
    71

    setting font in buttons etc.

    Hallo,
    i wrote small application with couple of text outputs, dialogs and buttons, but i'm quite disappointed with it's interface:
    all child windows (especially buttons) use default font, not that 'nice' ms sans serif 8 or what, used in MessageBox() or so. Is there any (simple) way to set font globally for application? I tried functions like (?) CreateFont(), ChooseFont(), SelectObject(), but as documentation says, it only works for functions like DrawText() or so (eg for current window and obviously not for it's childs).
    Any ideas?

  2. #2
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    Use Borland's CBuilder, such tasks are easy to accomplish with this great tool.
    Else you can only do the following : buttons must be owner-drawn, and follow the not-so-easy way you just described.
    I faced these problems, too, since I've got to use Visual C++, and it seems to be no other, easier way .
    Or use skins for your interface.

    For more ideas and help try these links:

    http://www.codeproject.com/ (good stuff here!)
    http://codeguru.earthweb.com/

    Have fun!

  3. #3
    Registered User lobo's Avatar
    Join Date
    Oct 2001
    Posts
    71
    Damn! i feared that

  4. #4
    Registered User
    Join Date
    Aug 2001
    Location
    Fort Worth, TX
    Posts
    53

    Font Battle

    I tried the way you had described with doing the following "I tried functions like (?) CreateFont(), ChooseFont(), SelectObject(), but as documentation says, it only works for functions like DrawText() or so (eg for current window and obviously not for it's childs).
    "
    , but have had no sucess. Did you ever get it worked out? Can you describe the "buttons must be owner-drawn, and follow the not-so-easy way you just described"
    Thanks

  5. #5
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    > BMAN1176 -- When we stop learning, we start dieing .

    Learn not to bump threads. Also, learn how to spell "dying".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem with my font manager
    By hannibar in forum C Programming
    Replies: 1
    Last Post: 03-07-2006, 07:03 AM
  2. destroywindow() problem
    By algi in forum Windows Programming
    Replies: 6
    Last Post: 03-27-2005, 10:40 PM
  3. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 09:18 PM
  4. how to change font of button's caption using MFC
    By urvashi in forum Windows Programming
    Replies: 5
    Last Post: 04-27-2004, 06:09 AM
  5. Changing the font on static text and buttons
    By Unregistered in forum Windows Programming
    Replies: 3
    Last Post: 06-28-2002, 09:36 AM

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