0

I need to write some contents in the text file (notepad), with some specified font, and size .is it possible in C, kindly let me know.

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
0

Its not possible in any language. Files don't know a thing about fonts. As for Notepad.exe I know of no way to change it from a c program.

0

It's more accurate to say that Notepad doesn't know anything about fonts. Notepad is worthless. Forget that it exists.

as for creating custom documents, you can use Windows OLE Automation to programmatically create and modify MS Office documents (Word, Excel, etc.) complete with font and formatting and graphs and images and whatnot.. I guess this extends to Wordpad as well, since it can open basic .RTF and .DOC files.

It's been years since I did this, and I didn't do it in C. (I did it in Perl). all i remember was it was exceedingly tedious due to a poorly-documented API, but the final result (one i finally got it) was good. But i sure wouldn't want to go through it again.

so, if you really want to do this in C, then look it up and good luck. Although, i've got to say you might want to reconsider what you're trying to do, and why.


(PS: If you really want a good text editor, I recommend TextPad. Another good one is CrimsonEditor. Either one can be set to be the default application that opens .TXT files, and it will replace Notepad for good.)

.

Edited by jephthah: n/a

0

It's more accurate to say that Notepad doesn't know anything about fonts. Notepad is worthless. Forget that it exists.

Notepad does now (win7) and I think it did in previous versions too. Menu Format --> Font. But it uses the same font for everything.

Edited by Ancient Dragon: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.