📄 index065.htm
字号:
<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">如何检索原先的Task Manager应用程序使用的任务列表</font></td></tr>
<tr><td><p>
</Br>
原先的Task Manager应用程序显示顶层窗口的列表。为了显示该列表,窗口必须可见、包含一个标题以及不能被其他窗口拥有。调用CWnd:: GetWindow可以检索顶层窗口的列表,调用IsWindowVisible、GetWindowTextLength以及GetOwner可以确定窗口是否应该在列表中。下例将把TaskManager窗口的标题填充到列表中。<Br>
</Br>
void GetTadkList (CListBox&list)<Br>
{<Br>
CString strCaption<Br>
//Caption of window.<Br>
</Br>
list.ResetContent ()<Br>
//Clear list box.<Br>
</Br>
//Get first Window in window list.<Br>
ASSERT_VALID (AfxGetMainWnd ())<Br>
CWnd* pWnd=AfxGetMainWnd () ->GetWindow (GW_HWNDFIRST)<Br>
</Br>
//Walk window list.<Br>
while (pWnd)<Br>
{<Br>
// I window visible, has a caption, and does not have an owner?<Br>
if (pWnd ->IsWindowVisible()<Br>
&& pWnd ->GetWindowTextLength ()<Br>
&&! pWnd ->GetOwner ())<Br>
{<Br>
</Br>
//Add caption o window to list box.<Br>
</Br>
pWnd ->GetWindowText (strCaption)<Br>
</Br>
list.AddString (strCaption)<Br>
}<Br>
//Get next window in window list.<Br>
pWnd=pWnd ->GetWindow(GW_HWNDNEXT)<Br>
}<Br>
}<Br>
</Br>
</p></td></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -