⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index120.htm

📁 一本不错的VC编程的参考书
💻 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>
有什么方法使CListView成为类似WM_DIASBLED的风格,或者使它和背景色一致.<Br>
</Br>
方法一:你所要做的是处理CListView的WM_SETFOCUS消息,然后在TreeView中调用SetFocus,<Br>
这样,ListView就永远不会获得焦点.<Br>
&nbsp;&nbsp;&nbsp;&nbsp;afx_msg void CMyListView::OnSetFocus(CWnd* pOldWnd);<Br>
&nbsp;&nbsp;&nbsp;&nbsp;{<Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// assuming m_pwndTreeView points to the valid TreeView<Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// on the left side<Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_pwndTreeView->SetFocus();<Br>
&nbsp;&nbsp;&nbsp;&nbsp;}<Br>
</Br>
方法二:重载PreTranslateMessage,然后当消息为WM_LBUTTONDOWN或WM_RBUTTONDOWN时返回真即可.<Br>
</Br>
</Br>
</p></td></tr>
</table>
</body></html>

⌨️ 快捷键说明

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