Not having messed with the win32 api for ages i decided i wanted to, so i start by finding out microsoft now give away a free 'express' version of vc so i decided what the hell and junked my vc.net 02 edition, now asside from missing every header i used i find im now having trouble writing a simple test app,
i used to be able to use the following function fine:
infact im sure i didnt even need the LPCTSTR typecast before but memory may be foggy..Code:MessageBox(NULL, (LPCTSTR)"Hello World", (LPCTSTR)"Title",MB_OK);
only to find i was introduced to a message box written in what seemed to be chinese.
i figured their might of been some changes due to unicode and such so i did a brief sweep of the msdn lib, finding that i now need to use the LPCWSTR and the char L infront of any string i want to directly pass so it now looks like:
Code:MessageBox(NULL, (LPCWSTR)L"Hello World", (LPCWSTR)L"Title",MB_OK);
Im guessing the W stands for wide and have no idea what the L stands for i guess literal as in string literal, no idea and trauling the net for a reasonable answer isnt my idea of fun, could anyone please enlighten this old coder as to the reason behind this change and what they stand for?
much appreciated,
Ryan



LinkBack URL
About LinkBacks




