Thread: CEdit Fonts??

  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,708
    Look into CreateFontIndirect and study the LOGFONT structure as Kuphryn suggested. CreateFont is easy to use, but allows less control over the font.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

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, 02: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, 09: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