📄 startupdlg.cpp
字号:
// StartupDlg.cpp : implementation file
//
#include "stdafx.h"
#include "PPPClient.h"
#include "StartupDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//取当前文件的路径名
extern CString GetCurDir();
/////////////////////////////////////////////////////////////////////////////
// CStartupDlg dialog
CStartupDlg::CStartupDlg(CWnd* pParent /*=NULL*/)
: CDialog(CStartupDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CStartupDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CStartupDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CStartupDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CStartupDlg, CDialog)
//{{AFX_MSG_MAP(CStartupDlg)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CStartupDlg message handlers
void CStartupDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// dc.SetBkColor(RGB(0,0,0));
// CRect rc;//(0,0,320,240);
//GetDlgItem(IDC_VW_FRAME)->
// GetClientRect(rc);
//ClientToScreen(rc);
// dc.FillRect(rc, CBrush::FromHandle((HBRUSH)GetStockObject(BLACK_BRUSH)));
CPicture m_picture;
CString filename;
filename=GetCurDir();
filename=filename+"startup.jpg";
if(m_picture.Load(filename))
{
//CClientDC dc(this);
CRect rect;
GetClientRect(&rect);
int w,h;
w=rect.Width();
h=rect.Height();
m_picture.Draw(&dc,0,0,w,h);
}
// Do not call CDialog::OnPaint() for painting messages
}
BOOL CStartupDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_ESCAPE) return TRUE;
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_RETURN) return TRUE;
return CDialog::PreTranslateMessage(pMsg);
}
BOOL CStartupDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CenterWindow(GetDesktopWindow());
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -