index010.htm

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

HTM
31
字号
<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:: PreCreateWindow 并修改CREATESTRUCT结构来指定窗口风格和其他创建信息.<Br>
&nbsp;Example: Delete "Max" Button and Set Original<Br>
Window's Position and Size<Br>
</Br>
&nbsp;BOOL CMainFrame:: PreCreateWindow<Br>
(CREATESTRUCT &cs)<Br>
&nbsp;{<Br>
&nbsp;cs.style &=~WS_MAXINIZEMOX<Br>
</Br>
&nbsp;cs.x=cs.y=0<Br>
&nbsp;cs.cx=GetSystemMetrics(SM_CXSCREEN/2)<Br>
&nbsp;cs.cy=GetSystemMetrics(SM_CYSCREEN/2)<Br>
</Br>
&nbsp;return CMDIFramewnd ::PreCreateWindow(cs)<Br>
&nbsp;}<Br>
</Br>
</p></td></tr>
</table>
</body></html>

⌨️ 快捷键说明

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