1.定义消息触发后要处理的函数
LRESULT DBUpgradeProcessDlg::OnChangePara(WPARAM wParam, LPARAM lParam);
2.定义WM_CHANGEPARA
#define WM_CHANGEPARA WM_USER+101
3.增加消息映射
BEGIN_MESSAGE_MAP(DBUpgradeProcessDlg, CDialogEx)
ON_MESSAGE(WM_CHANGEPARA,OnChangePara)
END_MESSAGE_MAP()
4.在某一函数增加消息函数SendMessage
unsigned int __stdcall ThreadFun(void *pPM)
{
HWND hWnd = ::FindWindow(NULL,_T("数据库升级"));
::SendMessage(hWnd,WM_CHANGEPARA, NULL,NULL);
return 0;
}