Link to home
Start Free TrialLog in
Avatar of Zeyadss
Zeyadss

asked on

.res file not displaying properly

Now that I figured how to use .res and add any kind of file, I have a slight problem with my .rtf file. My .rtf file has information in it, including the formatting of colors and text as Arial Narrow.
When I use LoadResData(101, "CUSTOM") to open the .rtf file, it shows alll question marks in my rich text box. The formatting of the .rtf file is gone too. There are no more colors and the font and size changed all of a sudden to blank question marks.

May I know why?
ASKER CERTIFIED SOLUTION
Avatar of Mark_FreeSoftware
Mark_FreeSoftware
Flag of Netherlands image

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 Zeyadss
Zeyadss

ASKER

I have done what you said exactly. I can see the text in english, but the fonts, colors and size of the fonts are not working. I also still see the codes like these:
{\rtf1\fbidis\ansi\ansicpg1256\deff0\deflang1025{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial Narrow;}}
{\colortbl ;\red0\green128\blue128;}
I use wordpad to create my formatting for my chapters and save them as .txt and when I open the text file it shows all those weird codes. I have the same problem with .rtf files. I also heard that wordpad also uses richtextbox to open those files but im not sure if it does. If you look at those weird codes above, it looks like wordpad creates them to give the formatting colors, sizes and look of my text.

The code you gave me worked since I can read the text, but those weird codes are still shown and the formatting of my text is not working.
Avatar of Zeyadss

ASKER

Oh wait a minute nevermind!. It worked. lol. I guess when I restarted visual basic it worked then. Sorry!
Avatar of Zeyadss

ASKER

Thanks again. I may have few more questions. You might want to participate.

thanks for the points and the grade!