Clone
ixen <ixen@copyhandler.com>
committed
on 13 Mar 08
Merged help language dialog with the standard language dialog.
LoggerImprovements + 5 more
src/libictranslate/HelpLngDialog.cpp (deleted)
1   /************************************************************************
2           Copy Handler 1.x - program for copying data in Microsoft Windows
3                                                    systems.
4           Copyright (C) 2001-2004 Ixen Gerthannes (copyhandler@o2.pl)
5  
6           This program is free software; you can redistribute it and/or modify
7           it under the terms of the GNU General Public License as published by
8           the Free Software Foundation; either version 2 of the License, or
9           (at your option) any later version.
10  
11           This program is distributed in the hope that it will be useful,
12           but WITHOUT ANY WARRANTY; without even the implied warranty of
13           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14           GNU General Public License for more details.
15  
16           You should have received a copy of the GNU General Public License
17           along with this program; if not, write to the Free Software
18           Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19   *************************************************************************/
20  
21   #include "stdafx.h"
22   #include "HelpLngDialog.h"
23  
24   #ifdef _DEBUG
25   #define new DEBUG_NEW
26   #endif
27  
28   BEGIN_ICTRANSLATE_NAMESPACE
29  
30   /////////////////////////////////////////////////////////////////////////////
31   // CHLanguageDialog dialog
32  
33   BEGIN_MESSAGE_MAP(CHLanguageDialog, CLanguageDialog)
34           ON_WM_HELPINFO()
35           ON_WM_CONTEXTMENU()
36           ON_BN_CLICKED(IDHELP, OnHelpButton)
37   END_MESSAGE_MAP()
38  
39   BOOL CHLanguageDialog::OnHelpInfo(HELPINFO* pHelpInfo)
40   {
41           if (pHelpInfo->iContextType == HELPINFO_WINDOW)
42           {
43                   pHelpInfo->dwContextId=(m_uiResID << 16) | pHelpInfo->iCtrlId;
44                   AfxGetApp()->HtmlHelp((DWORD_PTR)pHelpInfo, HH_DISPLAY_TEXT_POPUP);
45                   return true;
46           }
47           else
48                   return false;
49   }
50  
51   void CHLanguageDialog::OnContextMenu(CWnd* pWnd, CPoint point)
52   {
53           HELPINFO hi;
54           hi.cbSize=sizeof(HELPINFO);
55           hi.iCtrlId=pWnd->GetDlgCtrlID();
56           hi.dwContextId=(m_uiResID << 16) | hi.iCtrlId;
57           hi.hItemHandle=pWnd->m_hWnd;
58           hi.iContextType=HELPINFO_WINDOW;
59           hi.MousePos=point;
60  
61           HtmlHelp((DWORD_PTR)&hi, HH_DISPLAY_TEXT_POPUP);
62   }
63  
64   void CHLanguageDialog::OnHelpButton()
65   {
66           HtmlHelp(m_uiResID+0x20000, HH_HELP_CONTEXT);
67   }
68  
69   END_ICTRANSLATE_NAMESPACE