⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maindlg.cpp

📁 这是一套学校设备管理系统的源码 里面有树形结构使用的很棒的方法
💻 CPP
字号:
// maindlg.cpp : implementation file
//

#include "stdafx.h"
#include "xxgl.h"
#include "maindlg.h"
#include "process.h"
#include "strt.h"
#include "ext.h"
#include "func.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

Cmaindlg::Cmaindlg(CWnd* pParent /*=NULL*/)
	: CDialog(Cmaindlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(Cmaindlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void Cmaindlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Cmaindlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Cmaindlg, CDialog)
	//{{AFX_MSG_MAP(Cmaindlg)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Cmaindlg message handlers
static int first_flag=0;
static int old_sec;
void Cmaindlg::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	
	// Do not call CDialog::OnPaint() for painting messages
}

LRESULT Cmaindlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	
    time_t ltime;    
	struct tm *pti;
	int sec;

    time(&ltime);    
	pti = gmtime(&ltime);
	sec = pti->tm_sec;
	if (first_flag == 0){
		first_flag = 1;
		old_sec = sec;
    }
	if (old_sec != sec){
		if (first_flag == 1){
	      EndDialog(1);
          first_flag = 2;
		  old_sec = sec;
		}
		else{
	      EndDialog(1);
        }
    }
	return CDialog::DefWindowProc(message, wParam, lParam);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -