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

  1. // mydlg.h: Declaration of CMyDlg
  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 INC_MAINDLG_H
  14. #define INC_MAINDLG_H
  15.  
  16. #include "stdafx.h"
  17. #include "duckint.h"
  18. class CMyDlg : public CDialogImpl<CMyDlg>
  19. {
  20.     BEGIN_MSG_MAP(CMyDlg)
  21.         COMMAND_HANDLER(IDC_CREATEDODUCK, BN_CLICKED, OnCreateDoDuck)
  22.         COMMAND_HANDLER(IDC_DESTROYDODUCK, BN_CLICKED, OnDestroyDoDuck)
  23.         COMMAND_HANDLER(IDC_ADVISE, BN_CLICKED, OnAdvise)
  24.         COMMAND_HANDLER(IDC_UNADVISE, BN_CLICKED, OnUnadvise)
  25.         COMMAND_ID_HANDLER(IDOK, OnOK)
  26.         COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  27.         MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  28.     END_MSG_MAP()
  29.  
  30.     enum {IDD = IDD_MAINDLG};
  31.  
  32.     CMyDlg();
  33.     ~CMyDlg();
  34.  
  35. protected:
  36.  
  37.     static BOOL m_bOleInitialized;
  38.     DWORD m_dwCookie;
  39.     IConnectionPoint*   m_pIDuckConnectionPoint; // IConnectionPoint interface pointer to IDuck interface
  40.     CDuckInt*           m_pDuckInt;  //interface to be used by the connection point
  41.  
  42.     LRESULT OnCreateDoDuck(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
  43.     LRESULT OnDestroyDoDuck(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
  44.     LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  45.     LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  46.     LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  47.     LRESULT OnAdvise(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
  48.     LRESULT OnUnadvise(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
  49.  
  50. //implementation
  51.     void DoMyIToA(DWORD dwNumber, LPTSTR lpszResult);
  52. };
  53.  
  54. #endif
  55.