home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / atlduck / duckdoerdlg.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  61 lines

  1. // DuckDoerDlg.h : Declaration of the CDuckDoerDlg
  2. //
  3. // This is a part of the Active Template Library.
  4. // Copyright (C) 1996-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Active Template Library Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Active Template Library product.
  12.  
  13. #ifndef __DUCKDOERDLG_H_
  14. #define __DUCKDOERDLG_H_
  15.  
  16. #include "resource.h"       // main symbols
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CDuckDoerDlg
  20. class CDuckDoer;
  21.  
  22. class CDuckDoerDlg :
  23.     public CDialogImpl<CDuckDoerDlg>
  24. {
  25. public:
  26.     CDuckDoerDlg();
  27.     ~CDuckDoerDlg();
  28.  
  29.     enum { IDD = IDD_DUCKDOERDLG };
  30.  
  31. BEGIN_MSG_MAP(CDuckDoerDlg)
  32.     MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  33.     COMMAND_ID_HANDLER(IDOK, OnOK)
  34.     COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  35.     COMMAND_ID_HANDLER(IDC_QUACK, OnQuack)
  36.     COMMAND_ID_HANDLER(IDC_FLAP, OnFlap)
  37.     COMMAND_ID_HANDLER(IDC_WALK, OnWalk)
  38.     COMMAND_ID_HANDLER(IDC_PADDLE, OnPaddle)
  39. END_MSG_MAP()
  40.  
  41.     LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  42.     LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  43.     LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  44.     LRESULT OnWalk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  45.     LRESULT OnQuack(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  46.     LRESULT OnPaddle(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  47.     LRESULT OnFlap(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  48.  
  49. public:
  50.     void SetOwner(CDuckDoer* pObject){m_pObject = pObject;}
  51.     void RecalcListboxExtent(LPCTSTR lpszEntry, BOOL bAdded = TRUE);
  52.  
  53. protected:
  54.     CDuckDoer*  m_pObject;
  55.     int         m_xListboxExtentMax;
  56.  
  57. public:
  58. };
  59.  
  60. #endif //__DUCKDOERDLG_H_
  61.