Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AtlAdviseSinkMap

 

Call this function to advise or unadvise all entries in the object's sink event map.

System_CAPS_importantImportant

This function cannot be used in applications that execute in the Windows Runtime.


      HRESULT AtlAdviseSinkMap(
T* pT,
bool bAdvise 
);

pT

[in] A pointer to the object containing the sink map.

bAdvise

[in] true if all sink entries are to be advised; false if all sink entries are to be unadvised.

A standard HRESULT value.

Example

class CMyDlg : 
   public CAxDialogImpl<CMyDlg>
{
public:
BEGIN_MSG_MAP(CMyDlg)
   MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
   COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
   COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
   CHAIN_MSG_MAP(CAxDialogImpl<CMyDlg>)
END_MSG_MAP()

   LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
   {
      CAxDialogImpl<CMyDlg>::OnInitDialog(uMsg, wParam, lParam, bHandled);

      AtlAdviseSinkMap(this, TRUE);

      bHandled = TRUE;
      return 1;  // Let the system set the focus
   }

   // Remainder of class declaration omitted.

Requirements

Header: atlcom.h

Show: