home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / tstcon / ifacespg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  1.9 KB  |  76 lines

  1. // CInterfacesPage.Cpp : implementation file
  2. //
  3.  
  4. #include "StdAfx.H"
  5. #include "TestCon.H"
  6. #include "Resource.HM"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CInterfacesPage property page
  16.  
  17. IMPLEMENT_DYNCREATE(CInterfacesPage, CPropertyPage)
  18.  
  19. CInterfacesPage::CInterfacesPage() : CPropertyPage(CInterfacesPage::IDD)
  20. {
  21.    m_psp.dwFlags &= ~PSP_HASHELP;
  22.  
  23.     //{{AFX_DATA_INIT(CInterfacesPage)
  24.     m_tIOleInPlaceSiteWindowless = FALSE;
  25.     m_tIOleInPlaceSiteEx = FALSE;
  26.     m_tIAdviseSinkEx = FALSE;
  27.     //}}AFX_DATA_INIT
  28. }
  29.  
  30. CInterfacesPage::~CInterfacesPage()
  31. {
  32. }
  33.  
  34. void CInterfacesPage::DoDataExchange(CDataExchange* pDX)
  35. {
  36.     CPropertyPage::DoDataExchange(pDX);
  37.     //{{AFX_DATA_MAP(CInterfacesPage)
  38.     DDX_Check(pDX, IDC_IOLEINPLACESITEWINDOWLESS, m_tIOleInPlaceSiteWindowless);
  39.     DDX_Check(pDX, IDC_IOLEINPLACESITEEX, m_tIOleInPlaceSiteEx);
  40.     DDX_Check(pDX, IDC_IADVISESINKEX, m_tIAdviseSinkEx);
  41.     //}}AFX_DATA_MAP
  42. }
  43.  
  44.  
  45. BEGIN_MESSAGE_MAP(CInterfacesPage, CPropertyPage)
  46.     //{{AFX_MSG_MAP(CInterfacesPage)
  47.     ON_WM_HELPINFO()
  48.     ON_WM_CONTEXTMENU()
  49.     //}}AFX_MSG_MAP
  50. END_MESSAGE_MAP()
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CInterfacesPage message handlers
  54.  
  55.  
  56. static DWORD rgmapCHID[] =
  57. {
  58.    IDC_IOLEINPLACESITEEX, HIDC_IOLEINPLACESITEEX,
  59.    IDC_IOLEINPLACESITEWINDOWLESS, HIDC_IOLEINPLACESITEWINDOWLESS,
  60.    IDC_IADVISESINKEX, HIDC_IADVISESINKEX,
  61.    0, 0
  62. };
  63.  
  64. BOOL CInterfacesPage::OnHelpInfo( HELPINFO* pHelpInfo )
  65. {
  66.    return( ::WinHelp( HWND( pHelpInfo->hItemHandle ),
  67.       AfxGetApp()->m_pszHelpFilePath, HELP_WM_HELP, DWORD( LPVOID(
  68.       rgmapCHID ) ) ) );
  69. }
  70.  
  71. void CInterfacesPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
  72. {
  73.    ::WinHelp( HWND( *pWnd ), AfxGetApp()->m_pszHelpFilePath, HELP_CONTEXTMENU,
  74.       DWORD( LPVOID( rgmapCHID ) ) );
  75. }
  76.