得到对话框下面的空间句柄:
HWND GetDlgItem(
  HWND hDlg,       // handle to dialog box
  int nIDDlgItem   // control identifier
);得到文本:SendMessage( 
  (HWND) hWnd,              // handle to destination window 
  WM_GETTEXT,               // message to send
  (WPARAM) wParam,          // number of characters to copy
  (LPARAM) lParam           // text buffer
);
或者
SendMessage( 
  (HWND) hWnd,              // handle to destination window 
  EM_GETLINE,               // message to send
  (WPARAM) wParam,          // line number
  (LPARAM) lParam          // line buffer (LPCTSTR)
);