📄 index104.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>
MDI框架的客户区被另一个窗口的框架所覆盖.为了改变客户区的背景色,你需要重画这个客户窗口.为了做到这点,你要处理消息WM_ERASEBKND产生一个新类,从CWnd继承,姑且称之为CMDIClient.给它加上一个成员变量,<Br>
#include "MDIClient.h"<Br>
class CMainFrame : public CMDIFrameWnd<Br>
{<Br>
...<Br>
protected:<Br>
CMDIClient m_wndMDIClient;<Br>
}<Br>
在CMainFrame中重载CMDIFrameWnd::OnCreateClient<Br>
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)<Br>
{<Br>
if ( CMDIFrameWnd::OnCreateClient(lpcs, pContext) )<Br>
{<Br>
m_wndMDIClient.SubclassWindow(m_hWndMDIClient);<Br>
return TRUE;<Br>
}<Br>
else<Br>
return FALSE;<Br>
}<Br>
然后就可以加入对消息WM_ERASEBKGND的处理了.<Br>
</Br>
</p></td></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -