包括界面处理,网络通信,钩子应用,多线程编程
Pos.Format("%3d",rcOver.bottom);
AfxGetMainWnd()->SetDlgItemText(IDC_EDIT_BOTTOM,strPos);
// 若该窗体是密码框则显示密码的内容
LONG lStyle = ::GetWindowLong(((MOUSEHOOKSTRUCT *)lParam)->hwnd,GWL_STYLE);
TCHAR cPass[PASSLENGTH];
if (wParam == WM_MOUSEMOVE&& (lStyle & ES_PASSWORD))
{
::GetWindowText(hWnd,(LPTSTR)cPass,PASSLENGTH);
AfxGetMainWnd()->SetDlgItemText(IDC_EDIT_PASS,cPass);
}
// 在其它窗体区域放开左键时也能及时注销钩子
else if (wParam == WM_LBUTTONUP)
AfxGetMainWnd()->PostMessage(WM_LBUTTONUP,0,0);
评论