error C2065: 'WM_MOUSELEAVE' : undeclared identifier怎么回事?帮帮忙吧?
// 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怎么回事?帮帮忙吧?