按下和未按下对话框工具栏 [英] Dialog toolbar pressed and unpressed

查看:56
本文介绍了按下和未按下对话框工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在对话框上有工具栏当点击工具栏中的按钮时应按下它并再次点击它应该是未按下的。这是一个对话框onupdate没有在sdi中调用我们可以通过onupdate命令在对话框中怎么做。请告诉我。



我将如何获得它是否被按下和按下它按下它应该显示像按下。



我尝试过:



m_IsLineEnabled =!m_IsLineEnabled;

i have tool bar on the dialog how when clicking on button in tool bar it should be pressed and clicking again the it should be unpressed. this is a dialog onupdate is not calling in sdi we can do it through onupdatecommand how to do in dialog. please let me know.

how i will get whether it is pressed and unpressed and while pressing it should show like pressed.

What I have tried:

m_IsLineEnabled = !m_IsLineEnabled;

推荐答案

您必须了解工具栏api。阅读概述使用工具栏控件



您可以使用底层的 CToolBarCtrl 获得更好的访问权限。在该类中,您可以使用GetButton和 SetButtonInfo 函数来操作控件。



最多 easilist solution
You must learn about the toolbar api. Read the overview Working with the Toolbar Control.

Finer access you get with the underlying CToolBarCtrl. In that class you have the GetButton and SetButtonInfo functions to manipulate the control.

The most easilist solution.


这篇关于按下和未按下对话框工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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