📄 index028.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">如何在代码中获取工具条和状态条的指针</font></td></tr>
<tr><td><p>
</Br>
缺省时, 工作框创建状态条和工具条时将它们作为主框窗口的子窗口,状态条有一个AFX_IDW_STATUS_BAR标识符,工具条有一个AFX_IDW_TOOLBAR标识符,下例说明了如何通过一起调用CWnd: : GetDescendantWindow和AfxGetMainWnd来获取这些子窗口的指针:<Br>
//Get pointer to status bar .<Br>
CStatusBar * pStatusBar = (CStatusBar *) AfxGetMainWnd ( )<Br>
—> GetDescendantWindow(AFX_IDW_STUTUS_BAR)<Br>
</Br>
//Get pointer to toolbar .<Br>
CToolBar * pToolBar = (CToolBar * ) AfxGetMainWnd ( )<Br>
—> GetDescendantWindow(AFX_IDW_TOOLBAR)<Br>
</Br>
</p></td></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -