如何访问桌面窗口
2009-02-22 15:02
190 查看
静态函数CWnd:: GetDesktopWindow 返回桌面窗口的指针。下例说明了MFC函数
CFrameWnd::BeginModalStae是如何使用该函数进入内部窗口列表的。
void CFrameWnd::BeginModalState ()
{
…
//first count all windows that need to be disabled
UINT nCount=0
HWND hWnd= :: GetWindow (:: GetDesktopWindow(), GW_CHILD)
while (hWnd!=NULL)
{
if (:: IsWindowEnabled (hwnd)
&& CWnd::FromHandlePermanent (hWnd)!=NULL
&& AfxIsDescendant (pParent->m_hWnd, hWnd)
&& :: SendMessage (hWnd, WM_DISABLEMODAL, 0, 0)==0)
{
++nCount
}
hWnd=:: GetWindow (hWnd, GW_HWNDNEXT)
}
CFrameWnd::BeginModalStae是如何使用该函数进入内部窗口列表的。
void CFrameWnd::BeginModalState ()
{
…
//first count all windows that need to be disabled
UINT nCount=0
HWND hWnd= :: GetWindow (:: GetDesktopWindow(), GW_CHILD)
while (hWnd!=NULL)
{
if (:: IsWindowEnabled (hwnd)
&& CWnd::FromHandlePermanent (hWnd)!=NULL
&& AfxIsDescendant (pParent->m_hWnd, hWnd)
&& :: SendMessage (hWnd, WM_DISABLEMODAL, 0, 0)==0)
{
++nCount
}
hWnd=:: GetWindow (hWnd, GW_HWNDNEXT)
}
相关文章推荐
- 如何访问桌面窗口
- 如何访问桌面窗口
- 如何确定桌面上任何两个窗口的Z-Order关系
- 用WebView访问证书有问题的SSL网页以及在文件关联窗口中选择浏览器后,浏览器如何识别到该连接地址
- [VC++]如何得到桌面窗口的句柄(桌面图标)
- Windows7桌面最近访问的位置图标如何去除
- Win7系统桌面任务栏透视缩略图窗口太小如何调整
- 如何解决远程桌面访问HASP NOT Found的问题
- 如何在对话框类中访问父窗口中的数据
- 如何找到当前桌面某一窗口上的类名
- 如何在远程桌面的服务器上访问本地磁盘
- 弹出的模态窗口如何访问父窗口的变量?
- 如何找到桌面上报错的窗口,C#中捕捉对话框
- 如何HOOK桌面窗口消息
- Android 如何预置桌面上的应用程序图标、快捷方式图标或者窗口小部件?
- 如何让更多用户使用远程桌面访问您的服务器
- 如何HOOK桌面窗口消息
- 粘粘窗口-如何在桌面边缘停靠你的 Delphi 窗口
- 如何将win10回收站固定到桌面快速访问
- 如何找到当前桌面某一窗口上的类名