会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
iThinking
Follow Your Heart
博客园
首页
管理
CBitmapButton类的使用
CBitmapButton类
说明:
class CBitmapButton : public CButton.
CBitmapButton objects contain
up to four bitmaps
, which contain images for the different states a button can assume: up (or normal), down (or selected), focused, and disabled.
Only the first bitmap is required; the others are optional
.(摘自msdn)
for dialog:
在dialog中添加button控件,
设置
owner-draw
属性
设置button caption为"$$$",ID为IDC_$$$
添加四张button图片(对应四种状态),设置ID为"$$$U" "$$$D" "$$$F" "$$$X"
(注意加"")
在dialog类中添加CbitmapButton成员变量m_bmpBtn
在OnInitDialog中调用: m_bmpBtn.AutoLoad(IDC_$$$,this)
OK!
注:由于在AutoLoad中会关联CbitmapButton类和button,所以无需DDX_Control进行关联,否则会出错!
posted @
2011-06-30 21:15
iThinking
阅读(
283
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告