📄 dodadvw.cpp
字号:
// DoDadvw.cpp : implementation of the CDoDadsView class
//
#include "stdafx.h"
#include "DooDads.h"
#include "DoDaddoc.h"
#include "DoDadvw.h"
#include "setkey.h"
#include "spinner.h"
#include "stats.h"
#include "anime.h"
#include "address.h"
#include "expose.h"
#include "progress.h"
#include "maskdlg.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDoDadsView
IMPLEMENT_DYNCREATE(CDoDadsView, CView)
BEGIN_MESSAGE_MAP(CDoDadsView, CView)
//{{AFX_MSG_MAP(CDoDadsView)
ON_COMMAND(ID_VIEW_HOTKEY, OnViewHotkey)
ON_COMMAND(ID_VIEW_SPINNER, OnViewSpinner)
ON_COMMAND(ID_VIEW_STATISTICS, OnViewStatistics)
ON_COMMAND(IDM_VIEW_ANIMATION, OnViewAnimation)
ON_COMMAND(ID_VIEW_ADDRESSES, OnViewAddresses)
ON_COMMAND(ID_VIEW_EXPOSURE, OnViewExposure)
ON_COMMAND(ID_VIEW_PROGRESS, OnViewProgress)
ON_COMMAND(ID_VIEW_MASKEDIMAGES, OnViewMaskedimages)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDoDadsView construction/destruction
CDoDadsView::CDoDadsView()
{
m_bRegistered = FALSE;
}
CDoDadsView::~CDoDadsView()
{
if (m_bRegistered == TRUE)
m_bRegistered = !::UnregisterHotKey(m_hWnd, IDC_HOTKEY);
}
/////////////////////////////////////////////////////////////////////////////
// CDoDadsView drawing
void CDoDadsView::OnDraw(CDC* pDC)
{
CDoDadsDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CDoDadsView diagnostics
#ifdef _DEBUG
void CDoDadsView::AssertValid() const
{
CView::AssertValid();
}
void CDoDadsView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CDoDadsDoc* CDoDadsView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDoDadsDoc)));
return (CDoDadsDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDoDadsView message handlers
void CDoDadsView::OnViewHotkey()
{
int nResult;
CSetHotKey dlg;
if (dlg.DoModal() == IDOK)
{
CWnd* pMain = AfxGetApp()->GetMainWnd();
nResult =
pMain->SendMessage(WM_SETHOTKEY, MAKELONG(dlg.m_wVirtKeyCode, dlg.m_wModifiers), 0);
}
}
void CDoDadsView::OnViewSpinner()
{
CSpinnerDialog dlg;
if (dlg.DoModal() == IDOK)
{
CString strMessage;
strMessage.Format(
_T("Year = %d\nMonth = %d\nScore = %d"),
dlg.m_nYear, dlg.m_nMonth, dlg.m_nScore);
MessageBox(strMessage);
}
}
void CDoDadsView::OnViewStatistics()
{
CStatsDialog dlg;
dlg.DoModal();
}
void CDoDadsView::OnViewAnimation()
{
CAnimeDialog dlg;
dlg.DoModal();
}
void CDoDadsView::OnViewAddresses()
{
CAddressDialog dlg;
dlg.DoModal();
}
void CDoDadsView::OnViewExposure()
{
CExposureDialog dlg;
dlg.DoModal();
}
void CDoDadsView::OnViewProgress()
{
CProgressDialog dlg;
dlg.DoModal();
}
void CDoDadsView::OnViewMaskedimages()
{
CMaskedDlg dlg;
dlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -