error C2065: 'WM_MOUSELEAVE' : undeclared identifier怎么回事?帮帮忙吧?

coffeemlx coffeemlx 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

// Test32.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "resource.h"
#include"stdio.h"
/*BOOL callback theProc(
HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
);
*/
BOOL CALLBACK theProc(
HWND hwndDlg, // handle to dialog box
UINT uMsg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
)

{
switch (uMsg)
{
case WM_INITDIALOG:
MoveWindow(hwndDlg,100,80,200,250,FALSE);
SetWindowText(hwndDlg,"测试窗口标题");
return TRUE;
case WM_COMMAND:
switch(LOWORD (wParam))
{
case IDOK:
case IDCANCEL:
EndDialog(hwndDlg,wParam);
return TRUE;
}
break;
case WM_LBUTTONDOWN:
{
int x = LOWORD(lParam);
int y = HIWORD(lParam);
char s[200];
sprintf(s,"x = %d,y = %d",x,y);
MessageBox(hwndDlg,s,"提示",0);
}
return TRUE;
case WM_MOUSELEAVE:


{
int x = LOWORD(lParam);
int y = HIWORD(lParam);
char s[200];
sprintf(s,"x = %d,y = %d",x,y);
SetWindowText(hwndDlg,s);
}

return TRUE;

}
return FALSE;
}

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
int nRet = DialogBox(hInstance,(LPCTSTR)IDD_MAIN_DLG,NULL,theProc);

return 0;
}

error C2065: 'WM_MOUSELEAVE' : undeclared identifier怎么回事?帮帮忙吧?
...全文
评论 4
收藏 已收藏
分享
返回顶部
coffeemlx
VC/MFC 16,551 成员 421,605 内容