注册窗口时出现的问题!关于类型转换,求大神啊!

//注册窗口信息 ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX) //WNDCLASSEX的大小 wcex.style = CS_HREDRAW | CS_VREDRAW; // wcex.lpfnWndProc = (WNDPROC)WndProc; //窗口处理函数指针 wcex.cbClsExtra = 0; //指定紧跟在窗口类结构后的附加字节数 wcex.cbWndExtra = 0; //指定紧跟在窗口事例后的附加字节数 wcex.hInstance = hInstance;//本模块的事例句柄 wcex.hIcon = NULL; //图标的句柄 wcex.hCursor = LoadCursor (NULL, IDC_ARROW);//光标的句柄 wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW); //背景画刷的句柄 wcex.lpszMenuName = NULL; //指向菜单的指针 wcex.lpszClassName = "STATIC"; //指向类名称的指针 wcex.hIconSm = NULL; //和窗口类关联的小图标 return RegisterClassEx(&wcex); //注册窗口 }
上面是程序注册窗口的代码,不知道为什么一直是有下面的错误:
error C2440: 'type cast' : cannot convert from 'unsigned int' to 'struct tagWNDCLASSEXA'
不知道是为什么



