Adding font and color attributes to CEditView

Posted on 2000-05-09
Last Modified: 2013-12-03
How do I change my font and color of the text to be output to screen and to a file?

I can change those attributes and fwrite to a file, right?

The App Wizard I used is MFC with SDI and CEditView option. The rest are default.


Question by:raymondwee
  • 6
  • 4
LVL 10

Accepted Solution

RONSLOW earned 70 total points
ID: 2795023
you cannot save colour and font to a text file with CEditView .. it only handles ASCII text.

You can change the font and colour for the whole eidt box .. but that is not saved in a file

You want a CRichEditView - based app

Look at the Superpad app and other MFC samples

Author Comment

ID: 2795240
I am trying not to use IE or netscape dll or lib.
Would CRichEdit use those dll?
I mean I would like something that is independent of IE and netscape. And also as few windows dll as possible.

Author Comment

ID: 2795247
how do i print to the SDI windows char by char?
LVL 10

Expert Comment

ID: 2795248
RichEdit is part of Windows .. no need for IE etc.

Check out the examples that come with VC.
LVL 10

Expert Comment

ID: 2795253
what do you mean by 'print the SDI windows char by char'?
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.


Author Comment

ID: 2795354
Adjusted points from 50 to 70

Author Comment

ID: 2795355
i mean:
after user keyed in the filename to open in the fileopen dialog, I want to take this file and open it in my application. After processing, I want to print char by char to the window screen. Bypass the CArchive, I think...
btw, I am not too sure how it works from the time user input the filename till the text is displayed on the SDI window.

Can you explain?

Author Comment

ID: 2902724
Answer accepted

Author Comment

ID: 2902725
Thanks for your efforts.
I have switched to win32 programming instead.
LVL 10

Expert Comment

ID: 2902742
This is not a MFC restirction .. it is a Win32 restriction.  Going to Win32 will probably not help.

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
font missing in acrobat 3 63
Color? 8 91
Looking for a specific application/software 2 91
iSeries DB2 Query 2 83
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now