/*************************************************************************** * Copyright (C) 2001-2008 by Józef Starosczyk * * ixen@copyhandler.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License * * (version 2) as published by the Free Software Foundation; * * * * 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 Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "stdafx.h" #include "ch.h" #include "resource.h" #include "AboutDlg.h" #include "StaticEx.h" #include "../common/version.h" #ifdef _DEBUG #define new DEBUG_NEW #endif bool CAboutDlg::m_bLock=false; CAboutDlg::CAboutDlg() :ictranslate::CLanguageDialog(CAboutDlg::IDD, NULL, &m_bLock) { //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT RegisterStaticExControl(AfxGetInstanceHandle()); } CAboutDlg::~CAboutDlg() { } BEGIN_MESSAGE_MAP(CAboutDlg,ictranslate::CLanguageDialog) //{{AFX_MSG_MAP(CAboutDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() void CAboutDlg::UpdateProgramVersion() { CWnd* pCtl=(CWnd*)GetDlgItem(IDC_PROGRAM_STATICEX); CWnd* pCtl2=(CWnd*)GetDlgItem(IDC_FULLVERSION_STATICEX); CWnd* pWndCopyright = GetDlgItem(IDC_COPYRIGHT_STATIC); if (!pCtl || !pCtl2 || !pWndCopyright) return; else { CString strText = GetResManager()->LoadString(IDS_ABOUTVERSION_STRING); strText += GetApp()->GetAppVersion(); pCtl->SetWindowText(GetApp()->GetAppNameVer()); pCtl2->SetWindowText(strText); pWndCopyright->SetWindowText(_T(COPYRIGHT_INFO)); } } BOOL CAboutDlg::OnInitDialog() { CLanguageDialog::OnInitDialog(); UpdateProgramVersion(); return TRUE; } void CAboutDlg::OnLanguageChanged() { UpdateProgramVersion(); } BOOL CAboutDlg::OnTooltipText(UINT uiID, TOOLTIPTEXT* pTip) { switch(uiID) { case IDC_HOMEPAGELINK_STATIC: case IDC_CONTACT1LINK_STATIC: case IDC_CONTACT2LINK_STATIC: { HWND hWnd=::GetDlgItem(this->m_hWnd, uiID); if (!hWnd) return FALSE; ::SendMessage(hWnd, SEM_GETLINK, (WPARAM)79, (LPARAM)pTip->szText); pTip->szText[79]=_T('\0'); return TRUE; } default: return FALSE; } }