CEdit Fonts??

This is a discussion on CEdit Fonts?? within the C++ Programming forums, part of the General Programming Boards category; I was wondering if anyone can tell me how to manipulate the font in a static text box. I created ...

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    2

    Question CEdit Fonts??

    I was wondering if anyone can tell me how to manipulate the font in a static text box. I created a control variable called m_cStatic,

    Ityped in m_cStatic.SetFont(), the problem is the parameters that
    are needed are CFont* pFont , and a bool) I have looked in all the documentation i have and all it says id that pFont is a pointer to the new font.

    I tried typing in font names with and with out quotes it is not working. Has anybody used this or can anybody tell me how to change the font in a static text box?

    JG

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    One solution is to create a new font and pass SetFont() its reference. One solution is to create a font via LOGFONT.

    Kuphryn

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,655
    Look into CreateFontIndirect and study the LOGFONT structure as Kuphryn suggested. CreateFont is easy to use, but allows less control over the font.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Conversion Char To Char * Problem
    By ltanusaputra in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2008, 01:06 PM
  2. Scrolling text with variable pitch fonts
    By Raison in forum Windows Programming
    Replies: 0
    Last Post: 06-02-2004, 08:20 AM
  3. GNOME fonts
    By bludstayne in forum Tech Board
    Replies: 3
    Last Post: 01-20-2004, 08:49 PM
  4. MFC CEdit: Could please somebody explain this ?
    By marsface in forum Windows Programming
    Replies: 1
    Last Post: 07-15-2003, 06:15 AM
  5. Accessing CEdit Member Functions Inside CEditView ::MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 04-10-2002, 08:52 PM

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