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);

解决方案 »

  1.   

    可以到是可以,但都是模态的这样有意义么?
    如果是非模态的还有用。
    但是你不能直接用m_bCK,这个变量是人家的,你不能直接拿来就用啊,
    在A对话框DoModal前将这个变量传进来。
      

  2.   

    请教chuachua66 ;
    你说应该在A对话框DoModal前将这个变量传进来
    那应该在哪个函数里把m_bCK这个变量传进来呢?
    模态对话框的执行过程是DoModel()->OnInitDialog(),即DoModel()在先吗?
      

  3.   

    CXXXDlg dlg;
    dlg.xxx = yyy;
    dlg.DoModal();
      

  4.   

    使用全局变量吧
    在类CB中赋值,
    在类CA中使用