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 >
Wrap
C/C++ Source or Header
|
1998-03-26
|
2KB
|
55 lines
// mydlg.h: Declaration of CMyDlg
//
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Active Template Library Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Active Template Library product.
#ifndef INC_MAINDLG_H
#define INC_MAINDLG_H
#include "stdafx.h"
#include "duckint.h"
class CMyDlg : public CDialogImpl<CMyDlg>
{
BEGIN_MSG_MAP(CMyDlg)
COMMAND_HANDLER(IDC_CREATEDODUCK, BN_CLICKED, OnCreateDoDuck)
COMMAND_HANDLER(IDC_DESTROYDODUCK, BN_CLICKED, OnDestroyDoDuck)
COMMAND_HANDLER(IDC_ADVISE, BN_CLICKED, OnAdvise)
COMMAND_HANDLER(IDC_UNADVISE, BN_CLICKED, OnUnadvise)
COMMAND_ID_HANDLER(IDOK, OnOK)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
END_MSG_MAP()
enum {IDD = IDD_MAINDLG};
CMyDlg();
~CMyDlg();
protected:
static BOOL m_bOleInitialized;
DWORD m_dwCookie;
IConnectionPoint* m_pIDuckConnectionPoint; // IConnectionPoint interface pointer to IDuck interface
CDuckInt* m_pDuckInt; //interface to be used by the connection point
LRESULT OnCreateDoDuck(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
LRESULT OnDestroyDoDuck(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnAdvise(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
LRESULT OnUnadvise(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& bHandled);
//implementation
void DoMyIToA(DWORD dwNumber, LPTSTR lpszResult);
};
#endif