www.pudn.com > PhoneReaderSrc.rar > VersionDlg.cpp
// VersionDlg.cpp: implementation of the CVersionDlg class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "VersionDlg.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CVersionDlg::CVersionDlg()
{
}
CVersionDlg::~CVersionDlg()
{
}
LRESULT CVersionDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
g_hWndLast = m_hWnd;
LoadSHMenuBar(MAKEINTRESOURCE(IDR_OKMENU));
m_Titles.Attach(GetDlgItem(IDC_COPYRIGHT));
return 0;
}
LRESULT CVersionDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
g_hWndLast = NULL;
EndDialog(IDCANCEL);
return 0;
}
LRESULT CVersionDlg::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
g_hWndLast = NULL;
EndDialog(IDOK);
return 0;
}
LRESULT CVersionDlg::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
// TODO : Add Code for message handler. Call DefWindowProc if necessary.
CPaintDC dc(m_hWnd);
LOGFONT lf;
ZeroMemory(&lf,sizeof(lf));
lstrcpy(lf.lfFaceName, _T("Arial"));
lf.lfWeight = 600;
lf.lfHeight = 16;
CFont NewFont;
NewFont.CreateFontIndirect(&lf);
m_Titles.SetFont(NewFont.m_hFont);
NewFont.DeleteObject();
return 0;
}