home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / FERRAMEN / VBXSTD12 / LISTDEMO.CP_ / LISTDEMO.CPP
Encoding:
C/C++ Source or Header  |  1994-08-23  |  1.6 KB  |  76 lines

  1. // listdemo.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "vbxdemo.h"
  6. #include "listdemo.h"
  7.  
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char BASED_CODE THIS_FILE[] = __FILE__;
  11. #endif
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CListDemo dialog
  15.  
  16.  
  17. CListDemo::CListDemo(CWnd* pParent /*=NULL*/)
  18.     : CDialog(CListDemo::IDD, pParent)
  19. {
  20.     //{{AFX_DATA_INIT(CListDemo)
  21.         // NOTE: the ClassWizard will add member initialization here
  22.     //}}AFX_DATA_INIT
  23. }
  24.  
  25. void CListDemo::DoDataExchange(CDataExchange* pDX)
  26. {
  27.     CDialog::DoDataExchange(pDX);
  28.     //{{AFX_DATA_MAP(CListDemo)
  29.         // NOTE: the ClassWizard will add DDX and DDV calls here
  30.     //}}AFX_DATA_MAP
  31. }
  32.  
  33. BEGIN_MESSAGE_MAP(CListDemo, CDialog)
  34.     //{{AFX_MSG_MAP(CListDemo)
  35.     ON_WM_DESTROY()
  36.     ON_BN_CLICKED(IDHELP, OnHelp)
  37.     //}}AFX_MSG_MAP
  38. END_MESSAGE_MAP()
  39.  
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CListDemo message handlers
  43.  
  44. void CListDemo::OnDestroy()
  45. {
  46.     CDialog::OnDestroy();
  47.     
  48.     ::WinHelp( m_hWnd, "VBXSTD12.HLP", HELP_QUIT, NULL );        
  49.     
  50. }
  51.  
  52. BOOL CListDemo::OnInitDialog()
  53. {
  54.     CDialog::OnInitDialog();
  55.     
  56. if ( !IsHlpHere() )
  57.         GetDlgItem( IDHELP )->EnableWindow( FALSE );
  58.     
  59.     return TRUE;  // return TRUE  unless you set the focus to a control
  60. }
  61.  
  62. void CListDemo::OnHelp()
  63. {
  64.     CString FAR szWinDir, szName, szMsg;
  65.     GetSystemDirectory( szWinDir.GetBuffer(250), 248 );
  66.     szWinDir.ReleaseBuffer();
  67.     if ( szWinDir.GetLength() > 3 )
  68.         szWinDir += "\\";
  69.     szName = szWinDir;
  70.     szName += "VBXSTD12.HLP";
  71.     if ( !IsHlpHere() )
  72.         return;
  73.     ::WinHelp( m_hWnd, szName, HELP_KEY, (long)"VBList" );
  74.     
  75. }
  76.