VS2010 提示This program need window NT
我的电脑是win7 + vs2010
今天写了一个程序,提示:This program need window NT,下面是出现异常的代码段
- C/C++ code
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR szCmdLine,int iCmdShow){ static TCHAR szAppName[] = TEXT("CLOCK"); HWND hwnd; MSG msg; WNDCLASS wndclass; wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = NULL; wndclass.hCursor = LoadCursor(NULL,IDC_ARROW); wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wndclass.lpszClassName = szAppName; wndclass.lpszMenuName = NULL; if(!RegisterClass(&wndclass)) { [color=#FF0000]MessageBox(NULL,TEXT("This program need windows NT!"),szAppName,MB_ICONERROR);[/color] return 0; }
出现这种提示不解,系统应该满足要求,是不是配置方面出了问题?
希望大家帮忙解决一下,先谢谢啦!
[解决办法]
Windows SDK编程比较繁琐,目前界面编程很少直接使用
不过从学习原理和练手角度,非常值得一学
新版的MSDN目录树莫名其妙,没有VC6清晰,有些东西不太好找,只能搜索MSDN,这个得注意
写一个囊括大部分系统控件的小界面,其实SDK的界面编程基本就算入门了,而且也够了,下一步看Windows核心编程,这个才是SDK编程的精华