user-0 提问: 请大家帮忙分析一下这代码错误提示的原因

回复:
user: user-0
content: 引用 4 楼 xihu1364 的回复:[quote=引用 3 楼 cyycxz 的回复:] [quote=引用 1 楼 vrace 的回复:] LRESULT 打错了 WinMain 打错了 WM_ 很多打错了 还有很多东西注意大小写  打字的时候注意点……你让我出大丑了。。。[/quote][/quote]

user: user-1
content: LRESULT 打错了 WinMain 打错了 WM_ 很多打错了 还有很多东西注意大小写  打字的时候注意点……

user: user-2
content: 引用 楼主 cyycxz 的回复:以下是摘自《windows程序设计》的代码（精简）： #include<windows.h> LRESUALT CALLBACK wndproc(HWND,UNIT,WPARAM,LPARAM);  int WINAPI winmain(HINSTANCE hinstance,HINSTANCE hprevinstance,PSTR szcmdline,int icmdshow)    {     static TCHAR szappname[]=TEXT("hello");       HWND hwnd;       MSG msg;       WNDCLASS wndclass;     wndclass.style=CS_HREDRAW|CS_VREDRAW;    wndclass.lpfnwndclass=wndproc;    wndclass.cbclsextra=0;    wndclass.cbwndextra=0;    wndclass.hinstance=hinstance;    wndclass.hicon=loadicon(NULL,IDI_APPLICATION);    wndclass.hcursor=loadcursor(NULL,IDC_ARROW);    wndclass.hbrbackground=(HBRUSH) getstockobject(WHITE_BRUSH);    wndclass.lpszmenuname=NULL;    wndclass.lpszclassname=szappname;  if(!registerclass(&wndclass))  { messagebox(NULL,TEXT("WO CAO"),szappname,MB_ICONERROR);    return 0;}  hwnd=createwindow(szappname,TEXT("the hello program"),WS_OVERLAPPEDWINDOW,CW_USEDFAULT,CW_USEDFAULT,CW_USEDFAULT,CW_USEDFAULT,NULL,NULL,hinstance,NULL);  showwindow(hwnd,icmdshow); updatewindow(hwnd);  while(getmessage(&msg,NULL,0,0))   {translatemessage(&msg);    dispatchmessage(&msg);}  return msg.wapram;}  LRESAULT CALLBACK wndproc(HWND hwnd,UINT message,WPARAM wparam,LPARAM lparam)    {HDC hdc;    PAINTSTRUCT ps;    RECT rect;   switch(message)   {case MWM_PAINT:hdc=beginpaint(hwnd,&ps);gecclientrect(hwnd,&rect); drawtext(hdc,TEXT("hello,windows 98"),-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);return 0;    case MWM_DESTROY:postquitmessage(0);return 0;} return defwindowproc(hwnd,message,wparam,lparam);}  以下是错误提示： d:\vc++ 6.0projects\fsb.c(2) : error C2143: syntax error : missing '{' before '__stdcall' d:\vc++ 6.0projects\fsb.c(2) : error C2081: 'UNIT' : name in formal parameter list illegal d:\vc++ 6.0projects\fsb.c(2) : error C2081: 'WPARAM' : name in formal parameter list illegal d:\vc++ 6.0projects\fsb.c(2) : error C2081: 'LPARAM' : name in formal parameter list illegal d:\vc++ 6.0projects\fsb.c(12) : error C2039: 'lpfnwndclass' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(13) : error C2039: 'cbclsextra' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(14) : error C2039: 'cbwndextra' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(15) : error C2039: 'hinstance' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(16) : error C2039: 'hicon' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(16) : warning C4013: 'loadicon' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(17) : error C2039: 'hcursor' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(17) : warning C4013: 'loadcursor' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(18) : error C2039: 'hbrbackground' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(18) : warning C4013: 'getstockobject' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(19) : error C2039: 'lpszmenuname' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(20) : error C2039: 'lpszclassname' : is not a member of 'tagWNDCLASSA'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1184) : see declaration of 'tagWNDCLASSA' d:\vc++ 6.0projects\fsb.c(22) : warning C4013: 'registerclass' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(23) : warning C4013: 'messagebox' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(26) : warning C4013: 'createwindow' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(26) : error C2065: 'CW_USEDFAULT' : undeclared identifier d:\vc++ 6.0projects\fsb.c(26) : warning C4047: '=' : 'struct HWND__ *' differs in levels of indirection from 'int ' d:\vc++ 6.0projects\fsb.c(28) : warning C4013: 'showwindow' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(29) : warning C4013: 'updatewindow' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(31) : warning C4013: 'getmessage' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(32) : warning C4013: 'translatemessage' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(33) : warning C4013: 'dispatchmessage' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(34) : error C2039: 'wapram' : is not a member of 'tagMSG'         d:\vc++6.0\microsoft visual studio\vc98\include\winuser.h(1226) : see declaration of 'tagMSG' d:\vc++ 6.0projects\fsb.c(34) : warning C4033: 'winmain' must return a value d:\vc++ 6.0projects\fsb.c(36) : error C2143: syntax error : missing '{' before '__stdcall' d:\vc++ 6.0projects\fsb.c(38) : warning C4028: formal parameter 2 different from declaration d:\vc++ 6.0projects\fsb.c(38) : warning C4028: formal parameter 3 different from declaration d:\vc++ 6.0projects\fsb.c(38) : warning C4028: formal parameter 4 different from declaration d:\vc++ 6.0projects\fsb.c(43) : error C2065: 'MWM_PAINT' : undeclared identifier d:\vc++ 6.0projects\fsb.c(43) : error C2051: case expression not constant d:\vc++ 6.0projects\fsb.c(43) : warning C4013: 'beginpaint' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(43) : warning C4047: '=' : 'struct HDC__ *' differs in levels of indirection from 'int ' d:\vc++ 6.0projects\fsb.c(43) : warning C4013: 'gecclientrect' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(43) : warning C4013: 'drawtext' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(44) : error C2065: 'MWM_DESTROY' : undeclared identifier d:\vc++ 6.0projects\fsb.c(44) : error C2051: case expression not constant d:\vc++ 6.0projects\fsb.c(44) : warning C4013: 'postquitmessage' undefined; assuming extern returning int d:\vc++ 6.0projects\fsb.c(45) : warning C4013: 'defwindowproc' undefined; assuming extern returning int 执行 cl.exe 时出错.  fsb.obj - 1 error(s), 0 warning(s)  以上代码运行环境是VC++ 6.0，请高手分析一下是什么原因  参考某赵的打字训练

user: user-3
content: 引用 3 楼 cyycxz 的回复:[quote=引用 1 楼 vrace 的回复:] LRESULT 打错了 WinMain 打错了 WM_ 很多打错了 还有很多东西注意大小写  打字的时候注意点……你让我出大丑了。。。[/quote]

user: user-0
content: 引用 1 楼 vrace 的回复:LRESULT 打错了 WinMain 打错了 WM_ 很多打错了 还有很多东西注意大小写  打字的时候注意点……你让我出大丑了。。。

user: user-4
content: 同意#1 ，主要是抄写错误（键盘输入错误），多练习练习就好。