本文整理汇总了C++中CImageList::Destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ CImageList::Destroy方法的具体用法?C++ CImageList::Destroy怎么用?C++ CImageList::Destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CImageList
的用法示例。
在下文中一共展示了CImageList::Destroy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnDeactivate
void CPlugin::OnDeactivate( void )
{
OutputDebugString("CPlugin::OnDeactivate() called\n");
sys_Printf(BIC_INFO,"%s Plugin by %s Deactivated\n", m_Name, m_Author);
// do de-activation code here
int i;
/*
if (g_hToolbarImageList)
{
int i = g_LastImage;
int count = 0;
while (i >= g_FirstImage)
{
count++;
g_ToolbarImageList.Remove(i--);
}
g_ToolbarImageList.Detach();
}
*/
if (g_hToolBarWnd)
{
g_ToolbarImageList.Destroy();
// remove the buttons (remembering that other buttons may have been added
// or removed since we started, so we can't do it by remember the indexes when
// we add the buttons...
if (g_ButtonsAdded)
{
for (i = 0 ; i < TOOLBAR_BUTTON_COUNT; i ++)
g_Toolbar.DeleteButton(g_Toolbar.CommandToIndex(ToolbarIDs[i]));
}
g_Rebar.Detach();
}
for (i = 0 ; i < TOOLBAR_BUTTON_COUNT; i ++)
HydraIRC_ReleaseToolbarID(ToolbarIDs[i]);
HydraIRC_ReleaseImageListID(g_ImageListID);
}
示例2: pLoadStatusIndicatorImageList
void
CNdasDeviceMenu::CreateDeviceMenuItem(
__in ndas::DevicePtr pDevice,
__inout MENUITEMINFO& mii)
{
static BOOL requireVistaMenuBitmapBugWorkaround =
RequireVistaMenuBitmapBugWorkaround();
mii.fMask =
MIIM_BITMAP | MIIM_DATA | MIIM_FTYPE | /* MIIM_ID | */
MIIM_STATE | MIIM_STRING | MIIM_SUBMENU;
mii.fType = MFT_STRING;
mii.fState = MFS_ENABLED;
mii.dwItemData; /* see next */
mii.dwTypeData = const_cast<LPTSTR>(pDevice->GetName());
//
// As we don't want to invert the color of the status indicator
// we cannot simply create a bitmap here. We should draw it from the callback.
//
// Vista 5384 does not accept HBMMENU_CALLBACK
// (Seems like a bug)
//
if (requireVistaMenuBitmapBugWorkaround)
{
CImageList imageList = pLoadStatusIndicatorImageList();
NDSI_DATA ndsiData;
ATLVERIFY( mii.hSubMenu = CreateDeviceSubMenu(pDevice, &ndsiData) );
mii.hbmpItem = pCreateStatusIndicatorBitmap(m_wnd, imageList, &ndsiData);
ATLVERIFY( imageList.Destroy() );
}
else
{
mii.hbmpItem = HBMMENU_CALLBACK;
ATLVERIFY(mii.hSubMenu =
CreateDeviceSubMenu(
pDevice,
reinterpret_cast<PNDSI_DATA>(&mii.dwItemData)));
}
}