我很笨,帮帮忙吧
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
RECT rc;
int xChar,yChar;
WNDCLASSEX wnd;
char szAppName[]="键盘消息监视程序";
LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);
BOOL MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE hInstance,int iCmdShow);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
if(!(MyRegisterClass(hInstance)))
{
return FALSE;
}
if(!InitInstance(hInstance,iCmdShow))
~~~~~~~~~~出错!!!!!!!!!
{
return FALSE;
}
while (GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
错误消息为iCmdShow没有定义。不知道该怎么办。
问题点数:30、回复次数:5Top
1 楼panda_w(好想睡啊!)回复于 2001-07-23 10:41:08 得分 15
把InitInstance(hInstance,iCmdShow))改为InitInstance(hInstance,nCmdShow))
Top
2 楼wjyasd(金子鱼)回复于 2001-07-23 10:45:30 得分 15
你的参数在这里定义的:
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow) 《-------------就是它!
可是到了使用的时候问什么变成了 iCmdShow 呢? 不明白?…… -_-#
Top
3 楼hitwd2000(东邪王七)回复于 2001-07-23 10:46:42 得分 0
感谢,感谢,如果你能告诉我为什么,我给另外15分,谢谢了Top
4 楼hitwd2000(东邪王七)回复于 2001-07-23 10:47:51 得分 0
我明白了Top
5 楼freyue(muzi)回复于 2001-07-23 10:51:55 得分 0
因为你用的参数iCmdShow和你定义的参数nCmdShow不一样啊,hehe~~~,细心点了Top




