I used to program in C for dos and now decided to learn how to do that for Windows using VC 2005.
Armed with all manuals and help files I could find, I tried to compile a simplest application consisting of WinMain, InitWindow and WndProc(or MsgProc). But it was too easy for programme just to work and it found 3 errors in this part:
bool InitWindow(HINSTANCE hInstance)
{
WNDCLASSEX wc;
...
wc.lpszClassName = "DirectXStuff"; //here be error
RegisterClassEx(&wc);
wndHandle = CreateWindow(
"DirectXStuff", //error too
"TitleBarMessageWoot!", //and here
...
Errors were like 'cannot convert from 'const char[13]' to 'LPCWSTR''. Ok, I changed parameters like this:
bool InitWindow(HINSTANCE hInstance)
{
WNDCLASSEX wc;
...
wc.lpszClassName = (LPCTSTR)"DirectXStuff";
RegisterClassEx(&wc);
wndHandle = CreateWindow(
(LPCTSTR)"DirectXStuff",
(LPCTSTR)"TitleBarMessageWoot!",
...
Compiler was satisfied and programme worked at last, though there was still one problem - title bar message was written in some japanese kanji and there's nothing I could do to change it.
Since sample in DirectX SDK worked just great without any manipulations with type, I copy-pasted its code into new project and tried to compile. Guess what, it showed me same errors as in my first application.
It appears to me that answer probably can be in one of those small files in solution folder but comprehending of its content is beyond my level
Thanks in advance











