本文整理汇总了C++中CComQIPtr::AddEventHandler方法的典型用法代码示例。如果您正苦于以下问题:C++ CComQIPtr::AddEventHandler方法的具体用法?C++ CComQIPtr::AddEventHandler怎么用?C++ CComQIPtr::AddEventHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComQIPtr
的用法示例。
在下文中一共展示了CComQIPtr::AddEventHandler方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInitDialog
LRESULT CImageColorDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
GetDlgControl(IDC_COLOR_CHANNELSLIDER0, IID_IUIColorSlider, (void**)&m_slider[0]);
GetDlgControl(IDC_COLOR_CHANNELSLIDER1, IID_IUIColorSlider, (void**)&m_slider[1]);
GetDlgControl(IDC_COLOR_CHANNELSLIDER2, IID_IUIColorSlider, (void**)&m_slider[2]);
IDispEventImpl<1, CImageColorDlg, &DIID__IUIColorSliderEvents, &LIBID_UILib, 1, 0>::DispEventAdvise(m_slider[0]);
IDispEventImpl<2, CImageColorDlg, &DIID__IUIColorSliderEvents, &LIBID_UILib, 1, 0>::DispEventAdvise(m_slider[1]);
IDispEventImpl<3, CImageColorDlg, &DIID__IUIColorSliderEvents, &LIBID_UILib, 1, 0>::DispEventAdvise(m_slider[2]);
int i;
for (i = 0; i < 3; i++)
{
m_slider[i]->put_channel(i);
m_slider[i]->put_colorMode(2);
}
for (i = 0; i < 3; i++)
{
m_slider[i]->put_Enabled(FALSE);
::EnableWindow(GetDlgItem(IDC_SWATCH_CHANNELVALUE0+i), FALSE);
SetDlgItemText(IDC_SWATCH_CHANNELVALUE0+i, _T(""));
}
m_fillrc = CRect(6, 6, 6+18, 6+18);
m_strokerc = CRect(6+9, 6+9, 6+18+9, 6+18+9);
#if 0
CComQIPtr<IUIManager> uiManager = gIFrame;
uiManager->AddEventHandler(this);
#endif
return 0;
}
示例2: OnInitDialog
LRESULT CTabsDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
GetDlgControl(IDC_TABS, IID_ITabsControl, (void**)&m_tabsCtl);
IDispEventImpl<1, CTabsDlg, &DIID__ITabsControlEvents, &LIBID_PAGEDESIGNERLib, 1, 0>::DispEventAdvise(m_tabsCtl);
m_hButtonBitmap[0] = CreateMappedBitmap(_Module.GetResourceInstance(), IDB_TABS_ALIGNLEFT, 0, NULL, 0);
m_hButtonBitmap[1] = CreateMappedBitmap(_Module.GetResourceInstance(), IDB_TABS_ALIGNCENTER, 0, NULL, 0);
m_hButtonBitmap[2] = CreateMappedBitmap(_Module.GetResourceInstance(), IDB_TABS_ALIGNRIGHT, 0, NULL, 0);
m_hButtonBitmap[3] = CreateMappedBitmap(_Module.GetResourceInstance(), IDB_TABS_ALIGNDECIMAL, 0, NULL, 0);
m_hButtonBitmap[4] = CreateMappedBitmap(_Module.GetResourceInstance(), IDB_TABS_POSITIONABOVEFRAME, 0, NULL, 0);
::SendMessage(GetDlgItem(IDC_TABS_ALIGNLEFT), BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)m_hButtonBitmap[0]);
::SendMessage(GetDlgItem(IDC_TABS_ALIGNCENTER), BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)m_hButtonBitmap[1]);
::SendMessage(GetDlgItem(IDC_TABS_ALIGNRIGHT), BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)m_hButtonBitmap[2]);
::SendMessage(GetDlgItem(IDC_TABS_ALIGNDECIMAL), BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)m_hButtonBitmap[3]);
::SendMessage(GetDlgItem(IDC_TABS_POSITIONABOVEFRAME), BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)m_hButtonBitmap[4]);
CComQIPtr<IUIManager> uiManager = gIFrame;
uiManager->AddEventHandler(this);
::EnableWindow(GetDlgItem(IDC_TABS_X), FALSE/*selected != 0*/);
return 0;
}
示例3: OnCreate
LRESULT CImageLayersDlg::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
CComQIPtr<IUIActiveManager> uiActiveManager = m_app;
uiActiveManager->AddEventHandler(this);
return 0;
}