当前位置: 首页>>代码示例>>C++>>正文


C++ CImageList::Destroy方法代码示例

本文整理汇总了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);

}
开发者ID:mirror,项目名称:hydrairc,代码行数:46,代码来源:Plugin.cpp

示例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)));
	}
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:41,代码来源:nmmenu.cpp


注:本文中的CImageList::Destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。