




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
area 之后如果想看23日的 ,只需在日歷上點(diǎn)擊23日,之前寫好的就會(huì)在右側(cè)顯 等internet自動(dòng)同步世界或者手動(dòng)更改,并且國內(nèi)時(shí)間并不需要掌握的很精確,所以選擇了固定的timespan來計(jì)算出東八區(qū)時(shí)間。每秒運(yùn)行此函數(shù)。CStringfilePath=selectTime.Format("%Y-%m-%d.txt");CFileFindfinder;BOOLexist=voidvoidBOOL此函數(shù)中了大量繁瑣事物,大量的初始化功能的代碼。CBrush有關(guān)的方法,但是使用后顯示會(huì)有bug,文字會(huì)有一部分莫名,所以暫時(shí)保留了這個(gè)丑*。如果寫完直接點(diǎn)擊其他日期或者X會(huì)視為放棄保存,而沒有提示用戶,這是一個(gè)//dairy.h:mainheaderfilefortheDAIRY#if!defined(AFX_DAIRY_H71E43E06_745F_4062_A9D9_9469EFFA72CCINCLUDED_)#defineAFX_DAIRY_H71E43E06_745F_4062_A9D9_9469EFFA72CCINCLUDED_#if_MSC_VER>#pragma#endif//_MSC_VER>#ifndef #errorinclude'stdafx.h'beforeincludingthisfileforPCH#include //main////Seedairy.cppfortheimplementationofthisclassCDairyApp:public{////ClassWizardgeneratedvirtualfunctionvirtualBOOL////NOTE-theClassWizardwilladdandremovememberfunctions DONOTEDITwhatyouseeintheseblocksofgeneratedcode VisualC++willinsertadditionaldeclarations ybeforetheprevious//!defined(AFX_DAIRY_H71E43E06_745F_4062_A9D9_9469EFFA72CC//dairyDlg.h:header#if!defined(AFX_DAIRYDLG_H764738DD_E581_400D_A3FE_D0F1567A316AINCLU#defineAFX_DAIRYDLG_H764738DD_E581_400D_A3FE_D0F1567A316A#if_MSC_VER>#pragma#endif//_MSC_VER>//CDairyDlgclassCDairyDlg:public{//ConstructionCDairyDlg(CWnd*pParent=NULL);//standard//Dialogenum{IDD=IDD_DAIRY_DIALOG CButtonm_M4;CButtonCButtonCButtonCButtonCButtonCButtonCButton CStringm_hollandTime;CStringm_chinaTime; //ClassWizardgeneratedvirtualfunctionvirtualvoidDoDataExchange(CDataExchange* //DDX/DDV//ImplementationHICON//GeneratedmessagemapvirtualBOOLOnInitDialog();afx_msgvoid mand(UINTnID,LPARAMlParam);afx_msgvoidOnPaint();afx_msgHCURSOROnQueryDragIcon();afx_msgvoidOnTimer(UINTnIDEvent);afx_msgvoidOnSelectDate(NMHDR*pNMHDR,LRESULT*pResult);afx_msgvoidOnMind1();afx_msgvoidOnMind2();afx_msgvoidOnMind3();afx_msgvoidOnMind4();afx_msgvoidOnLife1();afx_msgvoidOnLife2();afx_msgvoidOnLife3();afx_msgvoidOnLife4();afx_msgvoidOnSave();afx_msgvoidOnChangeEdit(); VisualC++willinsertadditionaldeclarations ybeforetheprevious//!defined(AFX_DAIRYDLG_H764738DD_E581_400D_A3FE_D0F1567A316AINCLUD#if!defined(AFX_DIALOG1_H6571C58F_7683_4A1E_8027_2D6F0F572B4D#defineAFX_DIALOG1_H6571C58F_7683_4A1E_8027_2D6F0F572B4D#if_MSC_VER>#pragma#endif//_MSC_VER>//DIALOG1.h:header//DIALOG1classDIALOG1:public{//ConstructionDIALOG1(CWnd*pParent=NULL); //standardconstructorBOOLDIALOG1::OnInitDialog();//Dialogenum{IDD=IDD_DIALOG1}; CStringm_tip;////ClassWizardgeneratedvirtualfunctionvirtualvoidDoDataExchange(CDataExchange* //DDX/DDV//Implementation//Generatedmessagemap//NOTE:theClassWizardwilladdmemberfunctions VisualC++willinsertadditionaldeclarations ybeforetheprevious//!defined(AFX_DIALOG1_H6571C58F_7683_4A1E_8027_2D6F0F572B4D DeveloperStudiogenerated//Usedby#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define#define//Nextdefaultvaluesfornew#ifdef#define #define#define//stdafx.h:includefileforstandardsysteminclude orprojectspecificincludefilesthatareusedfrequently, arechanged#if!defined(AFX_STDAFX_H96380EDD_B40B_4A33_BFA7_3A71908AF6F8#defineAFX_STDAFX_H96380EDD_B40B_4A33_BFA7_3A71908AF6F8#if_MSC_VER>#pragma#endif//_MSC_VER>#defineVC_EXTRALEAN //Excluderarely-usedstufffromWindowsheaders#include<afxwin.h> //MFCcoreandstandardcomponents#include<afxext.h> //MFCextensions#include<afxdisp.h> //MFCAutomationclasses#include<afxdtctl.h> //MFCsupportforInternetExplorer4CommonControls#ifndef_AFX_NO_AFXCMN_SUPPORT#include<afxcmn.h> //MFCsupportforWindowsCommonControls#endif//_AFX_NO_AFXCMN_SUPPORTexternCTimecurrentTime;externCTimechineseTime;externCTimeselectTime;externCTimeSpantimeSpan;externCStringdata;externint//VisualC++willinsertadditionaldeclarationsimmediaybeforetheprevious//!defined(AFX_STDAFX_H96380EDD_B40B_4A33_BFA7_3A71908AF6F8Copyright(c)1997-1998 CorporationModuleName::TypedefinitionsforthebasicsizedJeffHavens(jhavens) RevisionHistory:--#ifndef_BASETSD_H_#define#ifdefcplusplusextern"C"{//Thefollowingtypesareguaranteedtobesignedand32bitstypedefintLONG32,*PLONG32;typedefintINT32,*PINT32;//Thefollowingtypesareguaranteedtobeunsignedand32bitstypedefunsignedintULONG32,*PULONG32;typedefunsignedintDWORD32,*PDWORD32;typedefunsignedintUINT32,*PUINT32;//TheINT_PTRisguaranteedtobethesamesizeasa //sizewithchangewithpointersize Itshouldbe//anywherethatapointeriscasttoanintegertype.UINT_PTR//theunsigned//HALF_PTRishalfthesizeofapointeritintendedforuse//withinstrcuturewhichcontainapointerandtwosmall//UHALF_PTRistheunsigned#ifdeftypedefint64INT_PTR,typedefunsignedint64UINT_PTR,#defineMAXINT_PTR(0x7fffffffffffffffI64)#defineMININT_PTR(0x8000000000000000I64)#defineMAXUINT_PTRtypedefunsignedintUHALF_PTR,*PUHALF_PTR;typedefintHALF_PTR,*PHALF_PTR;#defineMAXHALF_PTR(0x7fffffffL)#defineMINHALF_PTR(0x #pragmawarning(disable:4311) //typecasttruncation#if!defined(midl)inlineunsignedlongvoid){return((unsignedlong)h}inlineunsignedlong ){return((unsignedlong)p}inlineunsignedshort ){return((unsignedshort)p}inline ){return((long)p}inline ){return((short)p}#pragmawarning(3:4311) //typecasttruncationtypedeflongINT_PTR,typedefunsignedlongUINT_PTR,#defineMAXINT_PTR(0x7fffffffL)#defineMININT_PTR(0x typedefunsignedshortUHALF_PTR,*PUHALF_PTR;typedefshortHALF_PTR,*PHALF_PTR;#defineMAXUHALF_PTR0xffff#defineMAXHALF_PTR0x7fff#defineMINHALF_PTR0x8000#defineHandleToUlong(h)((ULONG)(h))#definePtrToUlong(p)((ULONG)(p))#definePtrToLong(p)((LONG)(p))#definePtrToUshort(p)((unsignedshort)(p))#definePtrToShort(p)((short)(p))//SIZE_Tusedforcountsorrangeswhichneedtospantherange//ofa SSIZE_TisthesignedtypedefUINT_PTRSIZE_T,*PSIZE_T;typedefINT_PTRSSIZE_T,*PSSIZE_T;//Thefollowingtypesareguaranteedtobesignedand64bitstypedefint64LONG64,*PLONG64;typedefint64INT64,*PINT64;//Thefollowingtypesareguaranteedtobeunsignedand64bitstypedefunsignedint64ULONG64,*PULONG64;typedefunsignedint64DWORD64,*PDWORD64;typedefunsignedint64UINT64,*PUINT64;#ifdef}#endif////dairy.cpp:Definestheclassbehaviorsforthe#include"stdafx.h"#include"dairy.h"#include"dairyDlg.h"#ifdef#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[]=FILE;////NOTE-theClassWizardwilladdandremovemapmacros DONOTEDITwhatyouseeintheseblocksofgenerated//CDairyApp{//TODO:addconstructioncode//Placeallsignificantinitializationin}//TheoneandonlyCDairyAppobjectCDairyApptheApp;//CDairyAppBOOL{//Standard//Ifyouarenotusingthesefeaturesandwishtoreducethe ofyourfinalexecutable,youshouldremovefromthe thespecificinitializationroutinesyoudonot#ifdef //CallthiswhenusingMFCinasharedDLL //CallthiswhenlinkingtoMFCstaticallyCDairyDlgdlg;m_pMainWnd=&dlg;intnResponse=dlg.DoModal();if(nResponse==IDOK){//TODO:Placecodeheretohandlewhenthedialog dismissedwith}elseif(nResponse=={//TODO:Placecodeheretohandlewhenthedialog dismissedwith}//Sincethedialoghasbeenclosed,returnFALSEsothatweexit application,ratherthanstarttheapplication'smessagepump.returnFALSE;}//dairyDlg.cpp:implementation#include"stdafx.h"#include"dairy.h"#include"dairyDlg.h"#include"DIALOG1.h"#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[]=FILE;//CAboutDlgdialogusedforAppclassCAboutDlg:public{//Dialogenum{IDD=IDD_ABOUTBOX//ClassWizardgeneratedvirtualfunctionvirtualvoidDoDataExchange(CDataExchange* //DDX/DDV//ImplementationCAboutDlg::CAboutDlg():{}{}//Nomessage//CDairyDlg:CDialog(CDairyDlg::IDD,{m_hollandTime=_T("");m_chinaTime=_T("");m_selectDate=//NotethatLoadIcondoesnotrequireasubsequentDestroyIconinWin32m_hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME);}{DDX_Control(pDX,IDC_EDIT,m_edit);DDX_Control(pDX,IDC_MONTHCALENDAR,m_calendar);DDX_Control(pDX,IDC_MIND4,m_M4);DDX_Control(pDX,IDC_MIND3,m_M3);DDX_Control(pDX,IDC_MIND2,m_M2);DDX_Control(pDX,IDC_MIND1,m_M1);DDX_Control(pDX,IDC_LIFE4,m_L4);DDX_Control(pDX,IDC_LIFE3,m_L3);DDX_Control(pDX,IDC_LIFE2,m_L2);DDX_Control(pDX,IDC_LIFE1,m_L1);DDX_Control(pDX,IDC_CHINATIME,m_CTime);DDX_Control(pDX,IDC_HOLL ,m_HTime);DDX_Text(pDX,IDC_HOLL DDX_Text(pDX,IDC_CHINATIME,m_chinaTime);}ON_NOTIFY(MCN_SELCHANGE,IDC_MONTHCALENDAR,OnSelectDate)ON_BN_CLICKED(IDC_MIND1,OnMind1)ON_BN_CLICKED(IDC_MIND2,OnMind2)ON_BN_CLICKED(IDC_MIND3,OnMind3)ON_BN_CLICKED(IDC_MIND4,OnMind4)ON_BN_CLICKED(IDC_LIFE1,OnLife1)ON_BN_CLICKED(IDC_LIFE2,OnLife2)ON_BN_CLICKED(IDC_LIFE3,OnLife3)ON_BN_CLICKED(IDC_LIFE4,OnLife4)ON_BN_CLICKED(IDC_SAVE,OnSave)//CDairyDlgmessageBOOL{//Add itemto //IDM_ABOUTBOXmustbeinthesystemcommandrange.ASSERT((IDM_ABOUTBOX&0xFFF0)==IDM_ABOUTBOX);ASSERT(IDM_ABOUTBOX<0xF000); *pSys if(pSys !=NULL){CString if(!strAbout { }}//Settheiconforthis Theframeworkdoesthis whentheapplication'smainwindowisnotadialogSetIcon(m_hIcon,TRUE); //SetbigiconSetIcon(m_hIcon,FALSE); //Setsmallicon//TODO:AddextrainitializationhereSetTimer(1,1000,NULL); m_strDateTime=m_time.Format(_T("%Y-%m-%d%H:%M:%S%A"));
hBitmap=LoadBitmap(AfxGetInstanceHandle(),hBitmap=LoadBitmap(AfxGetInstanceHandle(),hBitmap=LoadBitmap(AfxGetInstanceHandle(),hBitmap=LoadBitmap(AfxGetInstanceHandle(),hBitmap=LoadBitmap(AfxGetInstanceHandle(),hBitmap=LoadBitmap(AfxGetInstanceHandle(),hBitmap=LoadBitmap(AfxGetInstanceHandle(),hBitmap=LoadBitmap(AfxGetInstanceHandle(),CStringfilePath=selectTime.Format("%Y-%m-%d.txt");CFileFindfinder;BOOLexist=hBitmap=LoadBitmap(AfxGetInstanceHandle(),//ifnotexist{data= }//ifalreadyexist,data+=that{ifstreamifs;charcstr[1024];CStringdairy=data;dairy=dairy.Mid(8);}return //return unlessyousetthefocustoa}void {if((nID&0xFFF0)=={}{}}
CAboutDlgdlgAbout;mand(nID,//Ifyouaddaminimizebuttontoyourdialog,youwillneedthecode todrawthe ForMFCapplicationsusing /view thisisautomaticallydoneforyoubythevoid{if{CPaintDCdc(this);//devicecontextforpaintingSendMessage(WM_ICONERASEBKGND,( RAM)dc.GetSafeHdc(),0);//CentericoninclientintcxIcon=GetSystemMetrics(SM_CXICON);intcyIcon=GetSystemMetrics(SM_CYICON);CRectrect;intx=(rect.Width()-cxIcon+1)/2;inty=(rect.Height()-cyIcon+1)/2;//Drawtheicondc.DrawIcon(x,y,m_hIcon);}{CStringw=currentTime.Format("%w");CPaintDCdc(this); if(w=='1') //這個(gè)IDB_BITMAP1if(w=='2')if(w=='3')if(w=='4')if(w=='5')if(w=='6')if(w=='0') //這些參數(shù)可以調(diào)整添加位置和大小}}//Thesystemcallsthistoobtainthecursortodisplaywhiletheuser theminimizedHCURSOR{return(HCURSOR)}{//TODO:Addyourmessagehandlercodehereand/orcalldefault}{//TODO:AddyourcontrolnotificationhandlercodehereCStringfilePath=selectTime.Format("%Y-%m-%d.txt");CFileFindfinder;BOOLexist=//ifnotexist{data= *pResult=0;}//ifalreadyexist,{}
ifstreamifs;charcstr[1024];CStringdairy=data;dairy=dairy.Mid(8);}void{//TODO:Addyourcontrolnotificationhandlercodehere}void{//TODO:Addyourcontrolnotificationhandlercodehere}void{//TODO:Addyourcontrolnotificationhandlercodehere}void{//TODO:Addyourcontrolnotificationhandlercodehere}void{//TODO:Addyourcontrolnotificationhandl
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 品牌年服務(wù)合同
- 北京體育賽事策劃及執(zhí)行合同
- 珠寶銷售買賣合同
- 建筑工程施工合作協(xié)議
- 新能源電動(dòng)車充電站合作合同
- 機(jī)器人技術(shù)轉(zhuǎn)讓協(xié)議
- 公司銷售業(yè)務(wù)員合同協(xié)議
- 三農(nóng)村電商供應(yīng)鏈管理與優(yōu)化方案
- 個(gè)體工商戶商鋪?zhàn)赓U合同
- 影視制作行業(yè)版權(quán)使用許可合同
- 會(huì)陰擦洗課件
- 呼吸道疾病的健康宣教
- 2024-2030中國半導(dǎo)體閥門及管接頭市場現(xiàn)狀研究分析與發(fā)展前景預(yù)測報(bào)告
- 動(dòng)物生產(chǎn)與流通環(huán)節(jié)檢疫(動(dòng)物防疫檢疫課件)
- 公務(wù)員面試考官培訓(xùn)
- 繽紛天地美食街運(yùn)營方案
- 小學(xué)數(shù)學(xué)跨學(xué)科學(xué)習(xí)
- 2024年青島港灣職業(yè)技術(shù)學(xué)院單招職業(yè)技能測試題庫及答案解析
- 提高留置針規(guī)范使用率
- 裝配式建筑預(yù)制構(gòu)件安裝-預(yù)制構(gòu)件的吊裝
- 2024年山東泰安市泰山財(cái)金投資集團(tuán)有限公司招聘筆試參考題庫含答案解析
評(píng)論
0/150
提交評(píng)論