freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

簡(jiǎn)單計(jì)算器課程設(shè)計(jì)報(bào)告(文件)

2025-02-05 23:50 上一頁面

下一頁面
 

【正文】 D()。if ( == (UINT)1){// Possibly a popup menu, route to first item of that popup. = pPopupMenuGetSubMenu()。 // Popups are never auto disabled.}else{// Normal menu item.// Auto enable/disable if frame window has m_bAutoMenuEnable// set and mand is _not_ a system mand. = NULL。while ( nCount amp。}}//0到9數(shù)值的實(shí)現(xiàn)代碼,此處以0代替:void CLiuyunlongDlg::OnNumber0() { // TODO: Add your control notification handler code here if(danshuang==0)num2=0。idianhou。 //否則前面加負(fù)號(hào) } else if(zhengfu==TRUE) m_num=m_num*10。//小數(shù)點(diǎn)標(biāo)志位賦值}//負(fù)號(hào)按鈕的響應(yīng)函數(shù)void CLiuyunlongDlg::OnChange() { // TODO: Add your control notification handler code here if(m_num==0)zhengfu=false。 //變量2為0 dianhou=0。 UpdateData(FALSE)。idianhou1。idianhou1。 if(m_num==0)zhengfu=TRUE。 //把第二個(gè)值賦于輸出框的成員變量 m_num=0。 //小數(shù)位數(shù)無 danshuang=2。 case 2: m_num=num2m_num。 //兩數(shù)相乘 UpdateData(FALSE)。UpdateData(FALSE)。UpdateData(FALSE)。 num1=0。 zhengfu=TRUE。 //數(shù)據(jù)刷新 num2=m_num。 point=FALSE。//角度轉(zhuǎn)換為弧度 } m_num=cos(m_num*m_jiao)。 zhengfu=true。 // 彈出新建對(duì)話框}//標(biāo)準(zhǔn)型、科學(xué)型菜單項(xiàng)實(shí)現(xiàn)代碼,以科學(xué)型為例:void CLiuyunlongDlg::OnMENUkexue() { // TODO: Add your mand handler code here //顯示“完整版”對(duì)話框 SetWindowPos(NULL,0,0,(),(), SWP_NOMOVE|SWP_NOZORDER)。//設(shè)置單選標(biāo)記函數(shù)}//退出功能void CLiuyunlongDlg::Onexit() { // TODO: Add your mand handler code here OnOK()。 biaozhun=false。 //數(shù)據(jù)刷新}///關(guān)于菜單項(xiàng)的實(shí)現(xiàn)代碼void CLiuyunlongDlg::OnMENUguanyu() { // TODO: Add your mand handler code here CguanyuDlg dlg。 //數(shù)據(jù)刷新 dianhou=0。}//正余弦、正切實(shí)現(xiàn)代碼,以余弦為例void CLiuyunlongDlg::OnCos() { // TODO: Add your control notification handler code here if(m_hudu==0) { m_jiao=1。 num1=0。 if(m_num=0) { m_num=sqrt(num2)。 point=FALSE。 } if(m_num=||m_num) GetDlgItem(IDC_SHUCHU)SetWindowText(結(jié)果過大,無法顯示)。 case 5: if (m_num=0||num2=0) //判斷操作數(shù)是否合法 GetDlgItem(IDC_SHUCHU)SetWindowText(輸入錯(cuò)誤,取對(duì)數(shù)要為正數(shù)!)。 case 4: if (m_num==0) //在除法中,判斷除數(shù)是否為0 GetDlgItem(IDC_SHUCHU)SetWindowText(輸入錯(cuò)誤,0不能作除數(shù)!)。 //數(shù)據(jù)刷新 break。 //兩數(shù)相加 UpdateData(FALSE)。 //當(dāng)前小數(shù)無 zhengfu=true。 //數(shù)據(jù)刷新}//加減乘除、取對(duì)數(shù)實(shí)現(xiàn)代碼,以減法為例void CLiuyunlongDlg::OnDifference() { // TODO: Add your control notification handler code here if(danshuang!=0)OnEqual()。 } } dianhou=dianhou。 //移動(dòng)至只有一個(gè)小數(shù)位 } m_num=m_numfmod(m_num,1)。 if (point==FALSE ) //判斷當(dāng)前是否有小數(shù)點(diǎn),如果沒有 m_num=m_num/10fmod(m_num/10,1)。 point=FALSE。 //輸出框清0 num1=0。UpdateData(FALSE)。 //1/10,得到的小數(shù)放入輸出框中 } if (zhengfu==TRUE) //當(dāng)前值是否是正數(shù)還是負(fù)數(shù),如果是正數(shù) m_num=m_num+num1。 dianhou=dianhou++。pPopupMenuGetMenuItemID() == ){++。}// Adjust for menu deletions and additions.UINT nCount = pPopupMenuGetMenuItemCount()。 // First item of popup can39。 // Menu separator or invalid cmd ignore it.ASSERT( == NULL)。for ( = 0。 nIndex nIndexMax。t have menusneed to go to the top!if (pParent != NULL amp。// Determine if menu is popup in toplevel menu and set m_pOther to// it if so (m_pParentMenu == NULL indicates that it is secondary popup).HMENU hParentMenu。// Check the enabled state of various menu items.CCmdUI state。 GetClientRect(rect)。 SetWindowPos(NULL,0,0,(),(), SWP_NOMOVE|SWP_NOZORDER)。 =。 GetWindowRect(amp。//新加的擴(kuò)展與收縮對(duì)話框的變量//編輯框和單選按鈕的變量初始化CLiuyunlongDlg::CLiuyunlongDlg(CWnd* pParent /*=NULL*/) : CDialog(CLiuyunlongDlg::IDD, pParent){ //{{AFX_DATA_INIT(CLiuyunlongDlg) m_num = 。double num1。//diann判斷小數(shù)后的位數(shù)BOOL point=false。如下圖所示:圖19 關(guān)于計(jì)算器信息顯示圖//定義的相關(guān)變量BOOL zhengfu=true。并且根據(jù)計(jì)算知道該結(jié)果正確,且該計(jì)算器能實(shí)現(xiàn)運(yùn)算符的連續(xù)運(yùn)算。CRect rectSmall。 解決辦法:經(jīng)分析應(yīng)該是沒有對(duì)單選按鈕相關(guān)聯(lián)的變量沒有進(jìn)行初始化,在CLiuyunlongDlg::CLiuyunlongDlg(CWnd* pParent /*=NULL*/): CDialog(CLiuyunlongDlg::IDD, pParent) 中加入m_hudu=0,進(jìn)行初始化后得以解決。在階乘運(yùn)算代碼中用“else GetDlgItem(IDC_SHUCHU)SetWindowText(不是整數(shù)無法進(jìn)行階乘運(yùn)算)。%39。該函數(shù)中利用GetDlgItem()函數(shù)獲得圖像控件的窗口句柄,結(jié)合GetWindowRect()函數(shù)得到圖像控件的矩形框。
點(diǎn)擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1