GetActiveWindow与GetForegroundWindow的区别

来源:互联网 发布:sql 00933 编辑:程序博客网 时间:2024/06/06 04:23
 

  GetActiveWindow()   是你的程序的当前激活的窗口。  
  GetForegroundWindow()   是整个Windows系统的当前激活的窗口。

VC关于获得窗体标题的具体做法
CString str;
HWND pWnd =::GetForegroundWindow();
::GetWindowText(pWnd,str.GetBuffer(256),256);
::SetDlgItemText(pWnd,IDC_ADDRESS,str);


原创粉丝点击