Link to home
Start Free TrialLog in
Avatar of nickha
nickha

asked on

Output a Text File in the wanted Fonts, Colors

I am writing in Visual C++ 6.0/C++.
What I want to do is: under C++ source code
fopen("TextFile.xxx",..); searching through the TextFile for some "wanted strings";
fonting and coloring the "wanted strings"; insert back the fonted, colored "wanted strings" onto the TextFile and use some Windows-base editor to print out the already fonted and colorred TextFile.
Ex: input TextFile contents : Name:xxxx, Address:xxx,etc
Output TextFile: Name:, Address: which are already fonted and colorred
I did try CFont->TextOut but does not work as I want.
Please help me.Thanks
ASKER CERTIFIED SOLUTION
Avatar of gj62
gj62

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nickha
nickha

ASKER

The application to read the "TextFile.TXT" is WordPad/Edit
The Fonts and Colors I need to use are very basic which any simple Editors(WordPad/Edit...) to understand, not user-defined fonts,etc.
What I want is that when I open the "TextFile.TXT/TextFil.DOC" using WordPad, the TextFile is already under Fonts and Colors.
It is possible.
I wrote it successfully under C++ for DOS by using:
fprinf with the Escape Sequence like \033[31m, etc..
but not with Windows Application using Visual C++ 6.0