Article ID: 190530
Article Last Modified on 12/10/2003
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
{
// Calls IConnectionPoint::Advise() for each control on the dialog
// box with sink map entry.
AtlAdviseSinkMap(this, TRUE);
return 1; // Let the system set the focus.
}
Also, make sure IConnectionPoint::Unadvise() is called for all controls for
which IConnectionPoint::Advise() was called. This is done by calling
AtlAdviseSinkMap() with the value FALSE for last parameter:
LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
{
// Calls IConnectionPoint::Unadvise() for each control on the dialog
// box with sink map entry.
AtlAdviseSinkMap(this, FALSE);
return 0;
}
Additional query words: kbATL300 kbATL300bug kbATL kbVC600 kbVC600bug
Keywords: kbbug kbfix kbnoupdate kbconnpts kbdlg kbctrl KB190530