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   #include "Copy Handler.h"
  24  
  25   /////////////////////////////////////////////////////////////////////////////
  26   // CHLanguageDialog dialog
  27  
  28   BEGIN_MESSAGE_MAP(CHLanguageDialog, CLanguageDialog)
  29           ON_WM_HELPINFO()
  30           ON_WM_CONTEXTMENU()
  31           ON_BN_CLICKED(IDC_HELP_BUTTON, OnHelpButton)
  32   END_MESSAGE_MAP()
  33  
  34   BOOL CHLanguageDialog::OnHelpInfo(HELPINFO* pHelpInfo)
  35   {
  36           if (pHelpInfo->iContextType == HELPINFO_WINDOW)
  37           {
  38                   pHelpInfo->dwContextId=(m_uiResID << 16) | pHelpInfo->iCtrlId;
  39                   return GetApp()->HtmlHelp(HH_DISPLAY_TEXT_POPUP, (LPARAM)pHelpInfo);
  40           }
  41           else
  42                   return false;
  43   }
  44  
  45   void CHLanguageDialog::OnContextMenu(CWnd* pWnd, CPoint point)
  46   {
  47           HELPINFO hi;
  48           hi.cbSize=sizeof(HELPINFO);
  49           hi.iCtrlId=pWnd->GetDlgCtrlID();
  50           hi.dwContextId=(m_uiResID << 16) | hi.iCtrlId;
  51           hi.hItemHandle=pWnd->m_hWnd;
  52           hi.iContextType=HELPINFO_WINDOW;
  53           hi.MousePos=point;
  54  
  55           GetApp()->HtmlHelp(HH_DISPLAY_TEXT_POPUP, (LPARAM)&hi);
  56   }
  57  
  58   void CHLanguageDialog::OnHelpButton()
  59   {
  60           GetApp()->HtmlHelp(HH_HELP_CONTEXT, m_uiResID+0x20000);
  61   }