摘要:
CWnd* pWnd = GetTopWindow(); while(pWnd!=NULL) { int i = pWnd->GetDlgCtrlID(); CString str; str.Format("ID是:%d", i); //pWnd->SetWindowText(str); if(i!=-1) MessageBox(str); pWnd = pWnd->GetNextWindow(); } 阅读全文
摘要:
BOOL CMfcDlg::OnInitDialog(){ CDialog::OnInitDialog(); this->SetWindowText("蟒蛇软件站"); return TRUE; }void CCalcDlg::OnCalc(){ CString strText = _T(""); GetWindowText(strText); SetDlgItemText(IDC_EDIT1, strText); SetWindowText("pythonschool.com");}void CDemoDlg::OnTest1 阅读全文
摘要:
//创建一个基于对话框的工程,向对话框中添加静态文本,编辑框和组合框控件CComboBox m_Symbo;CEdit m_SecOpt;CEdit m_Result;CEdit m_FirstOpt;enum Symbo {PLUS, SUB, MUL,DIV};template <class Type>class CCalc{public: Type Calc(Type &refFirstOpt, Type &refSecOpt, Symbo Opt) { switch (Opt) { case PLUS: ret... 阅读全文