1. VS2005 项目属性-->配置属性-->C/C++-->常规-->检测64位可移植性问题-->否

2.

问题: 无法从“const char [10]”转换为“LPCWSTR”

解决: VS2005 项目属性-->配置属性-->常规-->字符集-->未设置

原因: LPWSTR MSDN解释  W= Unicode character string

For example, to convert from a Unicode string to a generic string without changing the converted string, use CW2CT.

If it is known that the converted string is unlikely to be more than 64 characters, the EX version, such as CW2CTEX<64>, can be used to save space on the stack.

3.

问题:“WinMain”: 无法重载函数

解决:

int WINAPI WinMain(
  HINSTANCE hInstance,
  HINSTANCE hPrevInstance,
  LPSTR lpCmdLine,
  int nShowCmd
)

4. 如果下面2个标红的窗口类名不一样, 运行时不会报错, 但是窗口显示不出来

wndcls.lpszClassName = "ferry2010";

hwnd = CreateWindow("ferry2010", "渡口网络", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 600, 400, NULL, NULL, hInstance, NULL);

5. while(GetMessage(&msg, NULL, 0, 0))   NULL 表示获取所有窗口的消息

 

posted on 2010-07-16 16:53  萝卜哥  阅读(242)  评论(0编辑  收藏  举报