index068.htm
来自「介绍了L C ö O S 2Ê 在TM S320VC5402 」· HTM 代码 · 共 38 行
HTM
38 行
<html>
<style type="text/css"><!--
.p9 { font-family: "宋体"; font-size: 9pt}a {text-transform: none; text-decoration: none;}
a:hover {text-decoration: underline; color: #FF0000;}
--></style>
<body background="../di2001.jpg">
<h3 align="center"><font COLOR="#AOAO99"></font></h3>
<table width="100%" border="1" cellspacing="1">
<tr><td><p align="center"><font color="#FF0000">如何访问桌面窗口</font></td></tr>
<tr><td><p>
</Br>
静态函数CWnd:: GetDesktopWindow 返回桌面窗口的指针。下例说明了MFC函数CFrameWnd::BeginModalStae是如何使用该函数进入内部窗口列表的。<Br>
</Br>
void CFrameWnd::BeginModalState ()<Br>
{<Br>
…<Br>
//first count all windows that need to be disabled<Br>
UINT nCount=0<Br>
HWND hWnd= :: GetWindow (:: GetDesktopWindow(), GW_CHILD)<Br>
while (hWnd!=NULL)<Br>
{<Br>
if (:: IsWindowEnabled (hwnd)<Br>
&& CWnd::FromHandlePermanent (hWnd)!=NULL<Br>
&& AfxIsDescendant (pParent->m_hWnd, hWnd)<Br>
&& :: SendMessage (hWnd, WM_DISABLEMODAL, 0, 0)==0)<Br>
{<Br>
++nCount<Br>
}<Br>
hWnd=:: GetWindow (hWnd, GW_HWNDNEXT)<Br>
}<Br>
…<Br>
</Br>
</Br>
</Br>
</p></td></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?