MFC的SendMessage用法
Cwnd::SendMessage 函数将直接调用窗口过程,并且在该窗口处理该消息之前,不会返回。 这与 PostMessage 成员函数不同,后者将消息放入窗口的消息队列,并立即返回。 函数声明: LRESULT SendMessage(UINT message, WPARAM wParam = 0,LPARAM lParam = 0); 具体的用法: void CAboutDlg::OnPaint() { // This code, normally emitted by the Application Wizard for a dialog- // based project for the dialog's WM_PAINT handler, runs only if the // window is iconic. The window erases the icon's area, then // paints the icon referenced by m_hIcon. if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM)dc.GetSafeHdc(), 0); // Center icon in