VS2010 提示This program need window NT
我的电脑是win7 + vs2010
今天写了一个程序,提示:This program need window NT,下面是出现异常的代码段
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; }