【正文】
} // TODO: Return a different brush if the default is not desired return hbr。報(bào)告完成情況3010報(bào)告文字通順,內(nèi)容翔實(shí),論述充分、完整,立論正確,結(jié)構(gòu)嚴(yán)謹(jǐn)合理,報(bào)告整體格式規(guī)范。答辯組長(zhǎng): 20在規(guī)定時(shí)間內(nèi)能準(zhǔn)確、完整、流利地回答教師所提出的問(wèn)題。10能對(duì)整個(gè)設(shè)計(jì)過(guò)程進(jìn)行全面的總結(jié),得出有價(jià)值的結(jié)論或結(jié)果;參考文獻(xiàn)數(shù)量在3篇以上,格式符合要求,在正文中正確引用。10設(shè)計(jì)方案規(guī)范合理,設(shè)計(jì)目標(biāo)明確,符合專(zhuān)業(yè)培養(yǎng)要求,時(shí)間安排得當(dāng),技術(shù)路線可靠。 // TODO: Change any attributes of the DC here if(nCtlColor == CTLCOLOR_EDIT) { pDCSetBkColor(RGB(255,255,255))。 m=0。 m_Flag=1。}void CJSQDlg::OnMrButton() { // TODO: Add your control notification handler code here (%f,m)。M39。 m=m+atof(m_Show)。 m_Flag=1。}void CJSQDlg::OnFu5Button() { // TODO: Add your control notification handler code here (%f,atof(m_Show)/100)。 m_Point=0。 m_Count+=1。 if (m_Count==0) { string1=m_Show。 } m_Show=string1。i++) { res=res*10。(.)!=()1) {MessageBox(n必須為正整數(shù)!, 科學(xué)計(jì)算器(徐金富))。 UpdateData(false)。 while ((1)==0) { string1=(()1)。i=n。} else if (()!=1) {MessageBox(無(wú)法計(jì)算負(fù)數(shù)的n!,n必須為正整數(shù)!, 科學(xué)計(jì)算器(徐金富))。 float res=1。 } m_Show=string1。 } else if (()!=1) {MessageBox(輸入的數(shù)據(jù)錯(cuò)誤,請(qǐng)重新輸入!, 科學(xué)計(jì)算器(徐金富))。 UpdateData(false)。 while ((1)==0) { string1=(()1)。039。 } m_Show=string1。 UpdateData(false)。 while ((1)==0) { string1=(()1)。 m_Flag=1。}void CJSQDlg::OnCosButton() { // TODO: Add your control notification handler code here (%f,cos(atof(m_Show)*))。 } if ((1)==.) { string1=(()1)。 m_Flag=1。 (%f,f3)。 string1=m_Show。 } UpdateData(false)。 m_Flag = 1。 choose=4。 } UpdateData(false)。 m_Flag = 1。 choose=3。 } UpdateData(false)。 m_Flag = 1。 choose=2。 UpdateData(false)。 //m_edit1=0.。 choose=1。 m_Point=0。}void CJSQDlg::OnFu1Button() //加法運(yùn)算{ // TODO: Add your control notification handler code here UpdateData()。 m_Show=0。39。}void CJSQDlg::OnFu6Button() { // TODO: Add your control notification handler code here if((1)==39。}void CJSQDlg::OnBackspaceButton() { // TODO: Add your control notification handler code here UpdateData()。 } else { m_Show+=39。.39。 m_Show=。 } UpdateData(false)。939。 }void CJSQDlg::OnNum9Button() { // TODO: Add your control notification handler code here UpdateData()。 } else { if(m_Show==0) { m_Show=。 if(m_Flag==1) { m_Flag = 0。 } m_Show+=39。 m_Show=。639。 m_Show+=39。 } UpdateData(false)。539。 }void CJSQDlg::OnNum5Button() { // TODO: Add your control notification handler code here UpdateData()。 } else { if(m_Show==0) { m_Show=。 if(m_Flag==1) { m_Flag = 0。 } m_Show+=39。 m_Show=。239。 m_Show+=39。 } UpdateData(false)。139。}void CJSQDlg::OnNum1Button() { // TODO: Add your control notification handler code here UpdateData()。 } else { if(m_Show==0) { m_Show=。 if(m_Flag==1) { m_Flag = 0。 break。 while ((1)==0) { string1=(()1)。 ff1=atoi(string1)。 break。 while ((1)==0) { string1=(()1)。 f2=atof(string2)。 break。 while ((1)==0) { string1=(()1)。 f1=atof(string1)。 UpdateData(false)。 (%f,f3)。 string2=m_Show。 } m_Show=string1。 f3=f1+f2。39。 if((1)!=39。 }}// The system calls this to obtain the cursor to display while the user drags// the minimized window.HCURSOR CJSQDlg::OnQueryDragIcon(){ return (HCURSOR) m_hIcon。 int x = (() cxIcon + 1) / 2。 int cyIcon = GetSystemMetrics(SM_CYICON)。 }}// If you add a minimize button to your dialog, you will need the code below// to draw the icon. For MFC applications using the document/view model,// this is automatically done for you by the framework.void CJSQDlg::OnPaint() { m=0。 // return TRUE unless you set the focus to a control}void CJSQDlg::OnSysCommand(UINT nID, LPARAM lParam){ if ((nID amp。 } } // Set the icon for this dialog. The framework does this automatically // when the application39。 if (pSysMenu != NULL) { CString strAboutMenu。 // Add About... menu item to system menu. // IDM_ABOUTBOX must be in the system mand range. ASSERT((IDM_ABOUTBOX amp。}void CJSQDlg::DoDataExchange(CDataExchange* pDX){ CDialog::DoDataExchange(pDX)。CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD){ //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT}void CAboutDlg::DoDataExchange(CDataExchange* pDX){ CDialog::DoDataExchange(pDX)。endif/////////////////////////////////////////////////////////////////////////////// CAboutDlg dialog used for App Aboutclass CAboutDlg : public CDialog{public: CAboutDlg()。只有這樣不斷糾正不斷思考,才能完成程序設(shè)計(jì)功能目的,才能在實(shí)踐中不斷提升自己。在面臨無(wú)從下手等這些問(wèn)題只要找到相關(guān)的資料就會(huì)得到提示從而理解所要解決問(wèn)題的大致方向。讓我感受到了:學(xué)完VC++后做課程設(shè)計(jì)得基本功過(guò)硬,設(shè)計(jì)過(guò)程中不得有半點(diǎn)馬虎。在本學(xué)期中我們開(kāi)設(shè)了《Visual C++實(shí)用教程》課的MFC部分皆為需要實(shí)踐內(nèi)容,在開(kāi)始著手程序設(shè)計(jì)時(shí),有些功能感覺(jué)無(wú)從下手,都不知道要干什么。(2) MFC開(kāi)發(fā)的應(yīng)用程序使用了標(biāo)準(zhǔn)化的結(jié)構(gòu)。我還要感謝所有關(guān)心幫助過(guò)我的同學(xué)。當(dāng)case 1時(shí)候,同樣實(shí)現(xiàn)減法運(yùn)算value=data1data2。我們?cè)诿總€(gè)函數(shù)中運(yùn)用了type來(lái)定義運(yùn)算類(lèi)型,每個(gè)函數(shù)的type不同(如加法type=0。由于單目運(yùn)算符中必須有執(zhí)行運(yùn)算的函數(shù),,如m_show=sqrt(m_show).按下按鈕即可實(shí)現(xiàn)其功能。BOOL型變量用docimal來(lái)判斷是否有小數(shù)點(diǎn)和一個(gè)整型數(shù)data_int來(lái)表示小數(shù)點(diǎn)后的數(shù)據(jù)的位數(shù)。 } UpdateData(false)。139。在“1”按鈕上單擊鼠標(biāo)右鍵,選擇“建立類(lèi)向?qū)А辈藛雾?xiàng),在彈出的對(duì)話框中選擇Messages Maps選項(xiàng)卡,然后在Object IDs列表框中雙擊選擇IDC_NUM1_BUTTON,在Messages列表框中選擇雙擊BN_CLICKED項(xiàng),即給“1”按鈕選擇單擊按鈕事件,如圖37所示圖37“1”按鈕鏈接代碼對(duì)話框即對(duì)應(yīng)的添加按鈕“1”的代碼void CJSQDlg::OnNum1Button() { // TODO: Add your control notification handler code here UpdateData()。//存放運(yùn)算類(lèi)型.連接變量和代碼 1) 給編輯框連接變量。double data_int=0。表33 三角函數(shù)集反三角函數(shù)的屬性ButtonIDC_SIN_BUTTONsinButtonIDC_COS_BUTTONcosButtonIDC_TAN_BUTTONtan表34 其他按鈕的屬性ButtonIDC_LOG_BUTTONlogButtonIDC_MOD_BUTTONmodButtonIDC_KE2_BUTTONx^2ButtonIDC_K