Click here to Skip to main content
15,886,071 members
Articles / Desktop Programming / MFC

Adding high score capability to MS Solitaire

Rate me:
Please Sign up or sign in to vote.
4.70/5 (16 votes)
25 Jul 2007CPOL14 min read 44K   713   18  
An application that manages MS Solitaire high scores by reading and writing Solitaire memory
// Includes
#include "stdafx.h"
#include "SolitaireHighscore.h"
#include "SettingsDlg.h"


////////////////////////////////////// Implementation /////////////////////////////////

////////////////////////////////////// Message map /////////////////////////////////
BEGIN_MESSAGE_MAP(CSettingsDlg, CDialog)
	ON_BN_CLICKED(IDOK, &CSettingsDlg::OnBnClickedOk)
END_MESSAGE_MAP()

////////////////////////////////////// Construction /////////////////////////////////
CSettingsDlg::CSettingsDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CSettingsDlg::IDD, pParent)
	, UserName(_T(""))
	, Startup(FALSE)
	, StartSolitaire(FALSE)
{

}

CSettingsDlg::~CSettingsDlg()
{
}

////////////////////////////////////// Overrides /////////////////////////////////
void CSettingsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_TXTPLAYER, UserName);
	DDV_MaxChars(pDX, UserName, 20);
	DDX_Check(pDX, IDC_CHKSTARTUP, Startup);
	DDX_Check(pDX, IDC_CHKSTARTUPSOL, StartSolitaire);
}

////////////////////////////////////// Button events /////////////////////////////////
void CSettingsDlg::OnBnClickedOk()
{
	UpdateData();
	OnOK();
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Israel Israel
Software designer and programmer.
Programming languages:
MFC, C++, Java , C#, VB and sometimes C and assembly.

Comments and Discussions