子类列表控件,其中包含另一个控件 [英] Subclass list control with another controls inside

查看:70
本文介绍了子类列表控件,其中包含另一个控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做一个特殊的列表控件(基于CListBox).但是列表框中的项目将是另一个控件-编辑控件.您知道关于此类事情的好文章吗?将控件子类化为列表?我进行了很多搜索,但没有找到合适的方法.

I would like to do a special list control (CListBox based). But the items in list box will be another controls - edit control. Do you know any good article about such things? Subclassing of controls into lists? I searched a lot, but didn''t found any suitable. Maybe I have used wrong words?

推荐答案

在CP文章中使用关键字CListBoxCEdit搜索您的第一个匹配词是 ^ ].如果这不是您想要的内容,请尝试 CP文章搜索 [
Using the keywords CListBox and CEdit in the CP article search your first hit is Editable ListBox Tutorial[^]. If this is not what you are looking for, try the CP Article Search[^] yourself, e.g. with the keywords CListBox and Subclass.


,您可以使用可编辑列表框教程"中的代码,只需将类从CEdit更改为CRichEditCtrl,并在此处添加/更改一些代码
you can use the code in "Editable ListBox Tutorial" and just changed the class from CEdit to CRichEditCtrl, and add/change some codes here and there, and it works.


看起来像一个答案,但是CEdit并不总是出现.此控件仅在编辑项目时创建CEdit.我需要始终可用的CEdit控件,因为实际上我需要CRichEdit.也许会有一些文章将介绍如何将控制图重定向到CListBox中的DrawItem.
Looks like an answer, but there CEdit isn''t presented always. This control, creates CEdit only while editing the item. I need the CEdit controls always available, because actually I need CRichEdit. Maybe there is some article that will describe, how to redirect control drawing into DrawItem in the CListBox.


这篇关于子类列表控件,其中包含另一个控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆