CWnd::EnableWindow
This method enables or disables mouse and keyboard input. When input is disabled, input such as mouse clicks and keystrokes is ignored. When input is enabled, the window processes all input. BOOL EnableWindow(
BOOL bEnable = TRUE );
Parameters
bEnable
Specifies whether the given window is to be enabled or disabled. If this parameter is TRUE, the window will be enabled. If this parameter is FALSE, the window will be disabled.
获得你对话框上那些框的指针或者对象,然后调用EnableWindow来enable或者disable如//Get handle of edt1 edit control & disable it.
CWnd* pWnd = pWndParent->GetDlgItem(edt1);
pWnd->EnableWindow(FALSE); // Get handle of edt3 edit control & disable it.
pWnd = pWndParent->GetDlgItem(ed3);
pWnd->EnableWindow(FALSE);
This method enables or disables mouse and keyboard input. When input is disabled, input such as mouse clicks and keystrokes is ignored. When input is enabled, the window processes all input. BOOL EnableWindow(
BOOL bEnable = TRUE );
Parameters
bEnable
Specifies whether the given window is to be enabled or disabled. If this parameter is TRUE, the window will be enabled. If this parameter is FALSE, the window will be disabled.
获得你对话框上那些框的指针或者对象,然后调用EnableWindow来enable或者disable如//Get handle of edt1 edit control & disable it.
CWnd* pWnd = pWndParent->GetDlgItem(edt1);
pWnd->EnableWindow(FALSE); // Get handle of edt3 edit control & disable it.
pWnd = pWndParent->GetDlgItem(ed3);
pWnd->EnableWindow(FALSE);
解决方案 »
- 有人可以做出这个样子的界面吗?
- 求助:CString与结构体转换
- 百分求教View中实时显示的问题!
- 《《《《《The C++ programming language》》》》(Third Edition)有参考答案吗?
- 兴趣发生转变,全新、经典的VC学习图书低价转让!
- 求助,我在VC中的TOOLBAR加了新的TOOLBAR,但是老是不出来。
- 我的2002(一个极度伤心的男人和两个女人)
- 有几个对话框,怎样使在工程文件。CPP的初始化函数中改变对话框先后出现的顺序
- 菜鸟求助:怎样编写VC++开发SQL数据库的登录对话框程序?
- 问一个关于做帮助文件的问题
- 如何显示文本
- 高手留步,帮忙看一下很简单的一段读取位图并显示的代码!
如果是非模态的还有用。
但是你不能直接用m_bCK,这个变量是人家的,你不能直接拿来就用啊,
在A对话框DoModal前将这个变量传进来。
你说应该在A对话框DoModal前将这个变量传进来
那应该在哪个函数里把m_bCK这个变量传进来呢?
模态对话框的执行过程是DoModel()->OnInitDialog(),即DoModel()在先吗?
dlg.xxx = yyy;
dlg.DoModal();
在类CB中赋值,
在类CA中使用