📄 dlgnagnag.cpp
字号:
/*
VaporCD CD-ROM Volume Emulation for Windows NT/2000
Copyright (C) 2000 Brad Johnson
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
http://vaporcd.sourceforge.net/
Brad Johnson
3305 2nd PL #222
Lubbock, TX 79415
*/
// DlgNagNag.cpp : implementation file
//
#include "stdafx.h"
#include "VaporCD.h"
#include "DlgNagNag.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// DlgNagNag dialog
DlgNagNag::DlgNagNag(CWnd* pParent /*=NULL*/)
: CDialog(DlgNagNag::IDD, pParent)
{
//{{AFX_DATA_INIT(DlgNagNag)
m_sNagText = _T("");
//}}AFX_DATA_INIT
m_iNagCount = 0;
m_bOkayToGo = FALSE;
}
void DlgNagNag::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DlgNagNag)
DDX_Control(pDX, IDCANCEL, m_cCancel);
DDX_Text(pDX, IDC_NAG_TEXT, m_sNagText);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DlgNagNag, CDialog)
//{{AFX_MSG_MAP(DlgNagNag)
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DlgNagNag message handlers
void DlgNagNag::OnOK()
{
// TODO: Add extra validation here
}
void DlgNagNag::OnCancel()
{
// TODO: Add extra cleanup here
if (m_bOkayToGo)
CDialog::OnCancel();
}
void DlgNagNag::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if (IDOK == nIDEvent)
{
m_iNagCount++;
if (m_iNagCount > 3)
{
m_bOkayToGo = TRUE;
m_sNagText = "";
m_cCancel.EnableWindow(TRUE);
SendMessage(WM_COMMAND, IDCANCEL);
}else
{
m_sNagText =
//VaprorCD comes with ABSOLUTELY NO WARRANTY; for details read license.txt. This is free software, and you are welcome to redistribute it under certain conditions; read license.txt for details.
"VaprorCD version 1.41\nCopyright (C) 2000 Brad Johnson.\n\n"
"VaprorCD comes with ABSOLUTELY NO WARRANTY; for "
"details read license.txt. This is free software, "
"and you are welcome to redistribute it under certain "
"conditions; read license.txt for details."
;
SetTimer(IDOK,1000,NULL);
}
UpdateData(FALSE);
UpdateWindow();
}else
CDialog::OnTimer(nIDEvent);
}
BOOL DlgNagNag::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
SetTimer(IDOK,1000,NULL);
OnTimer(IDOK);
m_cCancel.EnableWindow(FALSE);
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 + -