关于网友提出的“ 如何得知窗口上面的标准控件状态是Enable还是Disble?”问题疑问,本网通过在网上对“ 如何得知窗口上面的标准控件状态是Enable还是Disble?”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: 如何得知窗口上面的标准控件状态是Enable还是Disble?描述:
通过函数EnableWindow(TRUE or FALSe)可以让控件可用或禁用。
但是我想在调用EnableWindow函数之前得知控件的状态,免得重复设置影响运行速度。
帮忙告诉我一下吧。
解决方案1:
BOOL IsWindowEnabled( ) const;
Return Value:
Nonzero if CWnd is enabled; otherwise 0.
Remarks:
Specifies whether CWnd is enabled for mouse and keyboard input.
楼上的IsWindowEnabled即可
复杂一点的用 GetWindowInfo()返回 WINDOWINFO structure即可;
Good Luck
^_^