index016.htm

来自「一本不错的VC编程的参考书」· HTM 代码 · 共 30 行

HTM
30
字号
<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>
&nbsp;BringWindowToTop(Handle)<Br>
&nbsp;SetWindowPos函数,指定窗口的 最顶风格,用WS_EX_TOPMOST扩展窗口的风格<Br>
</Br>
&nbsp;Example:<Br>
&nbsp;void ToggleTopMost(<Br>
CWnd *pWnd)<Br>
&nbsp;{<Br>
ASSERT_VALID(pWnd)<Br>
</Br>
pWnd ->SetWindowPos(pWnd-> GetStyle( ) &WS_EX_TOPMOST)?<Br>
</Br>
&wndNoTopMOST: &wndTopMost,0,0,0,0,SSP_NOSIZE|WSP_NOMOVE)<Br>
&nbsp;}<Br>
</Br>
</Br>
</p></td></tr>
</table>
</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?