MFC杂记

来源:互联网 发布:如何在淘宝上拍卖东西 编辑:程序博客网 时间:2024/06/06 08:25

菜单项的状态设置:

在菜单项的建立类向导里面,选择UPDATE_COMMAND_UI,在函数里写入:

<span style="white-space:pre"></span>pCmdUI->SetCheck(true); //true为按下,false为弹起

对话框的显示:

对话框对象.DoModal();    //模态对话框

        CColorDLG dlg;dlg.DoModal();
对话框对象.Create(IDD_DIALOG,this)  //非模态对话框

对话框对象.ShowWindow();

<span style="white-space:pre"></span>CTestDLG *pdlg=new CTestDLG():<span style="white-space:pre"></span>dlg.Create(IDD_DIALOG1,this);<span style="white-space:pre"></span>dlg.ShowWindow();



0 0
原创粉丝点击