I need to load a .jpg file into the VC project and display this file in an edit box in the client area of a window (dialog window). In VC++6 I don't know what .h file from the MFC I should include to make my code passing the compiler complaint that the CImage class is not defined.
I read the book "Teach yourself Visual C++.Net" which described to include "#include <atlimage.h>" in the .cpp file and compile. but this never worked. The compiler complained that the header file could not be found. It looked like that the "altimage.h" is only available in VC++ .Net version, not in VC++6. Any one can sugest how can I get around this?
Since I read your article, I thought that I have to use the WideCharToMultiByte() function.
I use the preprocessor directive _UNICODE in my project. I have to write an ANSI text into a File.
So is it better to use the WideCharToMultiByte() or the CStdioFile class ?
I need to be able to convert character codes from specified fonts in old data files to the new unicode ones .Is there a function to do this or do I have to explicitly convert each character code within the source code. I am working in C++ and mainly using Symbol and Latin characters. Can anyone point me in the right direction?
Every function I have come across in the WinAPI that uses a string based on char has a wide character varient. To protect yourselves against this, (and using MFC has to be avoided at all cost :D):
Always write hard-coded strings using the _T() macro.
Check the MSDN documentation for the WinAPI function call, there is almost always an _t macro for it, eg fopen becomes _tfopen, fprintf becomes _ftprintf.
Even if you never ever expect to write a Unicode program, or cannot test for Unicode (W95/98 etc... peeps), it is always prudent to code in this way. You never know when you will sell your code and make millions, and then cause headaches when people do try and compile in Unicode.
Of course, you could always use MFC............
ABM UK Ltd
(recently converted a non Unicode program based on WinAPI to Unicode)
I am working under W98 and when I add unicode support to my program I can't run my program and I obtain the following message.
The application or DLL cannot be loaded on Windows 95 or Windows 3.1 .It takes advantage of Unicode features availble only on Windows- NT". then again it is popping up message box saying that "The MFC42UD.DLL file cannot start . Check the file to determine the problem
My program has an Edit control and I want to make it unicode because I want to activate the microsoft Input method editor in japanese for entering text into this edit control.
�How can i activate IME in an Edit control not using _UNICODE?
�Should i use other type of control?
�Can i add unicode support to my program under W95, W98 and WMe?
I am unix C++ programer. I need to know how to localize the english into the selected language in VC++.Trying to do with that withe resource files but not confident about the concepts of resource files creation.Can you please help me.