home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / beaversweeper_v101.zip / src / MyDialogBar.cpp < prev    next >
C/C++ Source or Header  |  2003-01-06  |  1KB  |  67 lines

  1. // MyDialogBar.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "tracker.h"
  6. #include "MyDialogBar.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CMyDialogBar dialog
  16. IMPLEMENT_DYNCREATE(CMyDialogBar, CDialogBar)
  17.  
  18.  
  19. CMyDialogBar::CMyDialogBar()
  20. {
  21.     //{{AFX_DATA_INIT(CMyDialogBar)
  22.         // NOTE: the ClassWizard will add member initialization here
  23.     //}}AFX_DATA_INIT
  24. }
  25.  
  26. CMyDialogBar::~CMyDialogBar()
  27. {
  28. }
  29.  
  30.  
  31. void CMyDialogBar::SetCaption(CString _caption)
  32. {
  33.   caption = _caption;
  34. }
  35. void CMyDialogBar::DoDataExchange(CDataExchange* pDX)
  36. {
  37.     CDialogBar::DoDataExchange(pDX);
  38.     //{{AFX_DATA_MAP(CMyDialogBar)
  39.         // NOTE: the ClassWizard will add DDX and DDV calls here
  40.     //}}AFX_DATA_MAP
  41. }
  42.  
  43.  
  44.  
  45. BEGIN_MESSAGE_MAP(CMyDialogBar, CDialogBar)
  46.     //{{AFX_MSG_MAP(CMyDialogBar)
  47.         // NOTE: the ClassWizard will add message map macros here
  48.     //}}AFX_MSG_MAP
  49. END_MESSAGE_MAP()
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CMyDialogBar message handlers
  53. LRESULT CMyDialogBar::WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
  54. {
  55.   LRESULT lResult = CDialogBar::WindowProc(message,wParam,lParam);
  56.   if(::IsWindow(m_hWnd))
  57.   {
  58.     CWnd *pWnd = GetParent();
  59.     if (pWnd != NULL)
  60.     {
  61.       pWnd->SetWindowText((LPCSTR)caption);
  62.     }
  63.     
  64.   }
  65.   return lResult;
  66. }
  67.