shiyanbaogao1.成员列表非凡_第1页
shiyanbaogao1.成员列表非凡_第2页
shiyanbaogao1.成员列表非凡_第3页
shiyanbaogao1.成员列表非凡_第4页
shiyanbaogao1.成员列表非凡_第5页
已阅读5页,还剩25页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

area 之后如果想看23日的 ,只需在日历上点击23日,之前写好的就会在右侧显 等internet自动同步世界或者手动更改,并且国内时间并不需要掌握的很精确,所以选择了固定的timespan来计算出东八区时间。每秒运行此函数。CStringfilePath=selectTime.Format("%Y-%m-%d.txt");CFileFindfinder;BOOLexist=voidvoidBOOL此函数中了大量繁琐事物,大量的初始化功能的代码。CBrush有关的方法,但是使用后显示会有bug,文字会有一部分莫名,所以暂时保留了这个丑*。如果写完直接点击其他日期或者X会视为放弃保存,而没有提示用户,这是一个//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') //这个IDB_BITMAP1if(w=='2')if(w=='3')if(w=='4')if(w=='5')if(w=='6')if(w=='0') //这些参数可以调整添加位置和大小}}//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等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论