标 题: How subclass the listbox portion of a combobox?
发信人: Pacific (无情~~~Nolove), 信区: VisualC
发信站: BBS 水木清华站 (Fri Oct 16 17:46:43 1998)
The listbox portion of a combobox is of type COMBOLBOX ( notice the
'L').
Because the ComboLBox window is not a child of the ComboBox window, it is
not obvious how to subclass the COMBOLBOX control. Luckily, under the
Win32
API, Windows sends a message to the COMBOBOX ( notice no 'L') called
WM_CTLCOLORLISTBOX before the listbox is drawn. The lParam passed with this
message contains the handle of the listbox. For example:
LRESULT CFileUpdateCombo::OnCtlColorListBox(WPARAM wParam,
LPARAM lParam)
{
if ( ! m_bSubclassedListBox )
(原文此处缺代码)
--
老鸟有交待,中鸟要等待,菜鸟要忍耐。
老鸟级功夫:吹牛、聊天、玩MUD 、发呆。
中鸟级功夫:睡觉、灌水、玩游戏、NT&VC。
菜鸟级功夫:学习、泡妞、玩篮球、And so on
My E-Mail: Nolove@263.net
--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: yazhou.bbs@bbs.net.t]
※ 修改:.fzx 于 Aug 9 16:44:14 修改本文.[FROM: heart.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.647毫秒