Ah, this is easy.. (or otherwise I've misunderstood the whole question and I appologize).
You mentioned earlier that you had problems compiling (or setting up) your project under VC6. I gave you some sugestions on that thread, but forgot to tell you this (I think) because I assumed you used TCHAR.
First of all, there is no need to modify the VC6 project to be UNICODE. I havn't done it, and I havn't got the slightest idea of how to to it either.
Just make shure you user the TCHAR and _T macros (defined in <tchar.h>) everywhere there are different functions (UNICODE and ANSI).
Like, for instance:
- Code:
::MessageBox(0,_T("a message"),_T("info:"),MB_OK);
The LoadImage is a bit different, because here you also need to add the absolute path on WinCE, so there is really no point in using the _T macro. You could just as well use the L macro for WinCE code and no macro on VC6.
The problems with LoadImage also arrise because there is a standard win API function called LoadImage. This is why you should always use namespace quantifiers as often as possible, for instance: Frog::LoadImage() instead of LoadImage(). This will enshure that you are in fact using the LoadImage() from PocketFrog, and you won't get silly error messages generated from the win API (which can be very confusing if you don't know about this).
Like Orpe said on the other thread (hey, he's also from cold snowy sweden =) the linker links to different definitions according to wether UNICODE is defined by you project or not.. As I tried to illustrate with the ::MessageBox example above, it also is redefined to a ::MessageBoxW for UNICODE and a ::MessageBoxA for plain ASCII. But you don't have to keep track of this as long as you use the _T macro around all the input..
Pew.. hope this makes any sence..
I recon you could try to recompile the PocketFrog lib with the UNICODE option set, but as I'm trying to explain, this is not necessary (and probably will create other interesting problems).
In some cases (as I explained more thouroughly on the other thread where you requested help using VC6) you need to use special preprocessor defines to get around. In my project, there are not that many of these solutions, so I don't mind.. But I guess recompiling and defining the VC6 project to use UNICODE is a valid option, if you hate to see your code use preprocessor calls, and IF you know how to pull it of =)
Hope this helped ya out. Not shure that I answered your question, but atleast now you should be able to do a workaround..
AND, just to set things straight (for those who havn't got the faintest idea of what the TCHAR, _T and L macros do) here are some defines.
TCHAR and _T are platform dependant macros. And with platform I mean UNICODE or ANSI. On a UNICODE system, the TCHAR is translated into a wchar and on an ANSI system, a regular char. This is very handy.
The _T macro is used for static character string definitions and is used like this:
TCHAR tmp[] = _T("a string");
What this means is that on a UNICODE system it's interpreted (and linked by the compiler/linker) as:
wchar_t tmp[] = L"a string";
and on an ASCII system as:
char tmp[] = "a string";
And by this, it should be clear how the L macro is used.
(Sorry Conan if I got a bit sidetracked. Hopefully this thread will continue to be about your problem and not questions about TCHAR and string handeling)