CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    7

    Change Default Font in CRichEditCtrl

    How would I change the Default Font in my CRichEditCtrl to a Fixed Pitched Font ?


  2. #2
    Guest

    Re: Change Default Font in CRichEditCtrl

    void CMyRichEditView::OnInitialUpdate()
    {
    CRichEditView::OnInitialUpdate();

    // Set the printing margins (720 twips = 1/2 inch).
    SetMargins(CRect(720, 720, 720, 720));
    // Set your default font here
    SendMessage(WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FIXED_FONT));
    }



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