home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / vbxstud / combodem.cp_ / COMBODEM.CPP
Encoding:
C/C++ Source or Header  |  1994-08-23  |  1.7 KB  |  78 lines

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