如何访问“禁用"按钮? [英] How to access to diable button ?

查看:72
本文介绍了如何访问“禁用"按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想访问一个窗口中的一个禁用按钮,我可以在一个窗口中挂钩并找到所有对象,但是找不到诸如按钮,静态文本,编辑等禁用对象,请告诉我一个解决方案可以访问禁用对象,谢谢,

hi , i want to access to one disable button in a window , i can hook and find all object in a window but can''nt find disable object like button , static text,edit and etc , please tell me a solution for access to disable object thanks ,

推荐答案

由于按钮,静态文本和编辑字段之类的控件是CWnd派生的类,请使用适当的CWnd父类函数:

CWnd :: EnableWindow(0) [ ^ ]将禁用控制(以灰色绘制并禁用鼠标和键盘输入).

要隐藏窗口或控件,请使用 CWnd :: ShowWindow(SW_HIDE) [ ^ ].
Because controls like buttons, static text, and edit fields are CWnd derived classes, use the appropriate CWnd parent class functions:

CWnd::EnableWindow(0)[^] will disable the control (draw grayed and disable mouse and keyboard input).

To hide a window or control, use CWnd::ShowWindow(SW_HIDE)[^].


这篇关于如何访问“禁用"按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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