index120.htm

来自「介绍了L C &ouml O S 2&Ecirc 在TM S320VC5402 」· HTM 代码 · 共 29 行

HTM
29
字号
<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 + =
减小字号Ctrl + -
显示快捷键?