Microsoft Chat Server Development Guide |
---|
// MsgFilterPP.h : Declaration of the CMsgFilterPP
#ifndef __MSGFILTERPP_H_
#define __MSGFILTERPP_H_
#include "resource.h" // main symbols
#include "MsgFilter.h"
EXTERN_C const CLSID CLSID_MsgFilterPP;
/////////////////////////////////////////////////////////////////////////////
// CMsgFilterPP
class ATL_NO_VTABLE CMsgFilterPP :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CMsgFilterPP, &CLSID_MsgFilterPP>,
public IPropertyPageImpl<CMsgFilterPP>,
public CDialogImpl<CMsgFilterPP>
{
public:
CMsgFilterPP()
{
m_dwTitleID = IDS_TITLEMsgFilterPP;
m_dwHelpFileID = IDS_HELPFILEMsgFilterPP;
m_dwDocStringID = IDS_DOCSTRINGMsgFilterPP;
}
enum {IDD = IDD_MSGFILTERPP};
DECLARE_REGISTRY_RESOURCEID(IDR_MSGFILTERPP)
DECLARE_NOT_AGGREGATABLE(CMsgFilterPP)
BEGIN_COM_MAP(CMsgFilterPP)
COM_INTERFACE_ENTRY_IMPL(IPropertyPage)
END_COM_MAP()
BEGIN_MSG_MAP(CMsgFilterPP)
// CHATSDK: Add command handlers for the pages controls
COMMAND_HANDLER(IDC_ADD_BUTTON, BN_CLICKED, OnAddClick)
CHAIN_MSG_MAP(IPropertyPageImpl<CMsgFilterPP>)
END_MSG_MAP()
STDMETHOD(Apply)(void)
{
ATLTRACE(_T("CMsgFilterPP::Apply\n"));
for (UINT i = 0; i < m_nObjects; i++)
{
// CHATSDK: Update the settings in the extension
}
m_bDirty = FALSE;
return S_OK;
}
// CHATSDK: override Activate to be able to initialize our page
STDMETHOD(Activate)(HWND hWndParent, LPCRECT pRect , BOOL bModal);
// CHATSDK: Add command handlers
LRESULT OnAddClick(WORD wNotify, WORD wID, HWND hWnd, BOOL& bHandled);
private:
// CHATSDK: Holds a reference to the instance of our extension
// running on the chat server. Allow us to access the admin methods
CComPtr<IChatMsgFilter> m_pMyExtension;
};
#endif //__MSGFILTERPP_H_
© 1998 Microsoft Corporation. All rights reserved.