当前位置: 代码迷 >> 综合 >> 孙鑫VC++深入详解:Lesson1
  详细解决方案

孙鑫VC++深入详解:Lesson1

热度:59   发布时间:2024-01-19 15:21:09.0


1. 开始我从MSDN 中copy WinMain原型时,搞错了

下面的代码编译是说 WinMain不能重载.....原来是参数不对. LPWSTR, 指向宽字符串的指针,16位=2个字节=一个字word

LPCWSTR--- Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts. 

下面这个WinMain是基于WIN CE

This function is called by the system as the initial entry point for WindowsCE-based applications.

int WINAPI WinMain(
HINSTANCE hInstance, 
HINSTANCE hPrevInstance, 
LPWSTR lpCmdLine, 
int nShowCmd ); 

下面这个是基于Windows ,  for a Windows-based application.

T