为什么我的窗口类设计不成功呢?
我是新手,实在不懂,大家帮忙看看#include <windows.h>
#include <stdio.h>
LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM);
 int WINAPI WinMain(HINSTANCE hins,HINSTANCE hpreins,LPSTR lpcmdline,int ncmdshow)
 {
 MSG msg;
 WNDCLASS wndclass;
 wndclass.cbClsExtra=0;
 wndclass.cbClsExtra=0;
 wndclass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
 wndclass.hCursor=LoadCursor(NULL,IDC_CROSS);
 wndclass.hIcon=LoadIcon(NULL,IDI_ERROR);
 wndclass.hInstance=hins;
 wndclass.lpfnWndProc=WindowProc;
 wndclass.lpszClassName="chenhao";
 wndclass.lpszMenuName=NULL;
 wndclass.style=CS_HREDRAW|CS_VREDRAW;
if( !RegisterClass(&wndclass))
{
MessageBox(NULL,"haha111","chenhao",0);
}
 HWND hwnd;
 hwnd=CreateWindow("chenhao","hello everyone!",WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,
               CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,,NULL,NULL,hins,NULL);  ShowWindow(hwnd,ncmdshow);
 UpdateWindow(hwnd);
 while (GetMessage(&msg,NULL,0,0))
 {
          TranslateMessage(&msg);
  DispatchMessage(&msg);
 }  return 0;
 }
    LRESULT CALLBACK WindowProc(HWND hwnd,UINT message,WPARAM wparam,LPARAM lparam)
{
              switch(message)
  {
  case WM_PAINT:
     PAINTSTRUCT ps;
 HDC hdc;
     hdc=BeginPaint(hwnd,&ps);
 TextOut(hdc,30,50,"hello!",strlen("hello!"));
 EndPaint(hwnd,&ps);
 break;
  case WM_LBUTTONDOWN:
        MessageBox(NULL,"Mouse left click","button",MB_OK);
break;
              case WM_CHAR:
    HDC hDc;
hDc=GetDC(hwnd);
char szchar[28];
sprintf(szchar,"char is %d",wparam);
ReleaseDC(hwnd,hDc);
break;
  default:
     DefWindowProc(hwnd,message,wparam,lparam);
  }  return 0;
}