📄 frontdlg.cpp
字号:
// FrontDlg.cpp : implementation file
//
#include "stdafx.h"
#include "compress.h"
#include "FrontDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFrontDlg dialog
CFrontDlg::CFrontDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFrontDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFrontDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CFrontDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFrontDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFrontDlg, CDialog)
//{{AFX_MSG_MAP(CFrontDlg)
ON_WM_PAINT()
ON_WM_TIMER()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFrontDlg message handlers
BOOL CFrontDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CRect rc;
int nWidth;
int nHeight;
nWidth=GetSystemMetrics(SM_CXSCREEN);
nHeight=GetSystemMetrics(SM_CYSCREEN);
GetWindowRect(rc);
MoveWindow((nWidth-rc.Width())/2,(nHeight-rc.Height())/2,rc.Width(),rc.Height(),TRUE);
m_Timer=SetTimer(101,3000,NULL);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CFrontDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
AfxGetApp()->DoWaitCursor(-1);
// TODO: Add your message handler code here
CDC *pMemDC=new CDC;
CBitmap *pOldBitmap;
if(pMemDC->CreateCompatibleDC(&dc))
{
CBitmap *bitmap=new CBitmap;
if(bitmap->LoadBitmap(IDB_TITLE))
{
CRect rect;
GetClientRect(rect);
pOldBitmap=pMemDC->SelectObject(bitmap);
BITMAP bm;
bitmap->GetObject(sizeof(BITMAP),&bm);
dc.StretchBlt(0,0,rect.Width(),rect.Height(),pMemDC,0,0,bm.bmWidth,bm.bmHeight,SRCCOPY);
pMemDC->SelectObject(pOldBitmap);
}
ReleaseDC(pMemDC);
bitmap->DeleteObject();
delete bitmap;
}
delete pMemDC;
}
void CFrontDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
//CDialog::OnTimer(nIDEvent);
KillTimer(m_Timer);
EndDialog(IDOK);
}
void CFrontDlg::OnDestroy()
{
CDialog::OnDestroy();
// TODO: Add your message handler code here
AfxGetApp()->DoWaitCursor(0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -