在程序中关闭其它应用程序,例如关掉计算器。
我想先用
h=FindWindow(NULL,"计算器")
得到句柄,再用
SendMessage(h,WM_COLSE,0,0)
来实现,但是系统却报错说:
error c2660:'SendMessageA' does not take 4 parameters
好象是说SendMessage函数只有三个参数,没有句柄这个参数。
请教各位老大!
我想先用
h=FindWindow(NULL,"计算器")
得到句柄,再用
SendMessage(h,WM_COLSE,0,0)
来实现,但是系统却报错说:
error c2660:'SendMessageA' does not take 4 parameters
好象是说SendMessage函数只有三个参数,没有句柄这个参数。
请教各位老大!
MFC只是一个win32 API包装而矣
LRESULT CWnd::SendMessage(UINT message, WPARAM wParam , LPARAM lParam)
{
return ::SendMessage(m_hWnd,message,wParam,lParam);
}