绘制成“向下"的按钮.按下按钮后的状态. [英] Buttons drawing in "down" state after button press.

查看:71
本文介绍了绘制成“向下"的按钮.按下按钮后的状态.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在COleControl中有几个CButton.每当我单击任何一个按钮时,即使在释放按钮之后,该按钮也会以向下状态绘制其自身.按下后似乎无法再次以正常状态绘制它.

这是我创建按钮的方式,我尝试使用普通的3D样式,但仍然遇到相同的问题.

Hi,

I have several CButton''s in a COleControl. Whenever I click on any of the buttons the button draws itself in the down state even after the button is released. I do not seem to be able to get it to draw in the normal state again after a press.

Here is how I create the buttons, I have tried using the normal 3D style but still get the same problem.

m_btnLeftPage.Create( _T("<<"), WS_CHILD|BS_PUSHBUTTON|BS_FLAT, CRect(0,0,0,0), this, BTN_LEFTPAGE_ID );
    m_btnLeft.Create( _T("<"), WS_CHILD|BS_PUSHBUTTON|BS_FLAT, CRect(0,0,0,0), this, BTN_LEFT_ID );
    m_btnZoomInX.Create( _T("+"), WS_CHILD|BS_PUSHBUTTON|BS_FLAT, CRect(0,0,0,0), this, BTN_ZOOMINX_ID );
    m_btnZoomOutX.Create( _T("-"), WS_CHILD|BS_PUSHBUTTON|BS_FLAT, CRect(0,0,0,0), this, BTN_ZOOMOUTX_ID );
    m_btnRight.Create( _T(">"), WS_CHILD|BS_PUSHBUTTON|BS_FLAT, CRect(0,0,0,0), this, BTN_RIGHT_ID );
    m_btnRightPage.Create( _T(">>"), WS_CHILD|BS_PUSHBUTTON|BS_FLAT, CRect(0,0,0,0), this, BTN_RIGHTPAGE_ID );



在OnSize()中为按钮提供了正确的大小和位置.

有什么建议吗?

谢谢-John



The buttons are given the correct size and position in OnSize().

Any suggestions?

Thanks - John

推荐答案

http://msdn.microsoft.com/en-us/library/ms907525.aspx [ ^ ]

检查MSDN链接以创建其他样式的按钮
http://msdn.microsoft.com/en-us/library/ms907525.aspx[^]

check the MSDN link to create button of different style


这篇关于绘制成“向下"的按钮.按下按钮后的状态.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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