GetDlgItem(IDC_EDIT1)->EnableWindow(FALSE); //把 id 为IDC_EIDT1禁止。

解决方案 »

  1.   

    对,EnableWindow()就可以了
    FALSE-禁止
    TRUE-显示
      

  2.   

    GetDlgItem(IDC_EDIT1)->是全局api函数吗??是不是哪儿都可以用??
      

  3.   

    You can use the GetDlgItem function with any parent-child window pair, not just with dialog boxes. As long as the hDlg parameter specifies a parent window and the child window has a unique identifier (as specified by the hMenu parameter in the CreateWindow or CreateWindowEx function that created the child window), GetDlgItem returns a valid handle to the child window.
      

  4.   

    利用WIN32的消息映射,OnUpdate控件(CCmdUI *pCmdUI)
    然后使用pCmdUI->Enable(FALSE);
    即可。
      

  5.   

    使用EnableWindow()太暗,我要看里面的内容.