CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Location
    Timisoara, Romania
    Posts
    433

    [RESOLVED] CEditView and Fonts

    Hello there. I have written code to change the font in my CEditView class, but exactly after I quit the function, the font changes to a basic one (I can see it fine because I place MessageBox() before exiting the function).
    What is wrong? The CEditView does not accept other fonts? but Notepad accepts, and Notepad seem to have CEditView.

    Can anybody explain me this and if it's something I can do, please?

  2. #2
    Join Date
    Feb 2000
    Location
    Indore, India
    Posts
    1,046

    Re: CEditView and Fonts

    Hello,

    It is quite probable that you had set the font to some CFont type variable which is defined locally in the function. Make the CFont variable as a member variable of CEditView class.

    If you had shown the codes where you set the font, one can understand more what can be the problem.

    Regards,
    Pravin.
    Let me know if I have helped by rating this post

    Recent FAQs

    Drag an image
    Area of a window exposed on desktop
    Display rotated bitmap

  3. #3
    Join Date
    Aug 2006
    Location
    Timisoara, Romania
    Posts
    433

    Re: CEditView and Fonts

    I can't believe it! How could I have declared my CFont in my function and hope it will last?

    Thanks a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured