将CButton放在CListbox项内 [英] Place CButton inside a CListbox Item

查看:76
本文介绍了将CButton放在CListbox项内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将CButton放在CListBox项内并处理按钮上的onclick事件.

提前thanx

How to place the CButton inside a CListBox Item and handle the onclick event on the button.

thanx in advance

推荐答案

看看本文 [ ^ ],可能会给您一些有关如何操作的建议...

希望这会有所帮助.
在DrawItem()函数中,您可以找到以下代码
Take a look at this article[^], probably it will give you some advice on how to do that...

Hope this helps.
In the DrawItem() function you may find the below code
pDC->DrawFrameControl(&rect, DFC_BUTTON, DFCS_BUTTONRADIO | (sel?DFCS_CHECKED:0));



只需将其更改为



just change this to

pDC->DrawFrameControl(&rect, DFC_BUTTON, DFCS_BUTTONPUSH | (sel?DFCS_CHECKED:0));


这篇关于将CButton放在CListbox项内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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