• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetIcon函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetIcon函数的典型用法代码示例。如果您正苦于以下问题:C++ GetIcon函数的具体用法?C++ GetIcon怎么用?C++ GetIcon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetIcon函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: RemoveAllItems

void
JXCurrentPathMenu::SetPath
	(
	const JCharacter* path
	)
{
	RemoveAllItems();

	JString p = path;
	JCleanPath(&p);

	JString p1, n;
	while (!JIsRootDirectory(p))
		{
		JStripTrailingDirSeparator(&p);
		JSplitPathAndName(p, &p1, &n);
		PrependItem(n);
		SetItemImage(1, GetIcon(p), kJFalse);
		p = p1;
		}

	PrependItem(p);
	SetItemImage(1, GetIcon(p), kJFalse);

	const JXImage* image = NULL;
	GetItemImage(GetItemCount(), &image);
	SetTitle(GetItemText(GetItemCount()), const_cast<JXImage*>(image), kJFalse);
	SetUpdateAction(kDisableNone);
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:29,代码来源:JXCurrentPathMenu.cpp


示例2: ImageList_AddIcon

void CMLuaOptions::OnInitDialog()
{
	CDlgBase::OnInitDialog();

	m_scripts.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_INFOTIP);

	HIMAGELIST hImageList = m_scripts.CreateImageList(LVSIL_SMALL);
	ImageList_AddIcon(hImageList, GetIcon(IDI_LOADED));
	ImageList_AddIcon(hImageList, GetIcon(IDI_FAILED));
	ImageList_AddIcon(hImageList, GetIcon(IDI_OPEN));
	ImageList_AddIcon(hImageList, GetIcon(IDI_RELOAD));

	TCHAR scriptDir[MAX_PATH], relativeScriptDir[MAX_PATH], header[MAX_PATH + 100];
	FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
	PathToRelativeT(scriptDir, relativeScriptDir, NULL);
	mir_sntprintf(header, _T("%s (%s)"), TranslateT("Common scripts"), relativeScriptDir);

	m_scripts.AddColumn(0, _T("Script"), 380);
	m_scripts.AddColumn(1, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL));
	m_scripts.AddColumn(2, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL));

	LoadScripts();

	isScriptListInit = true;
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:25,代码来源:mlua_options.cpp


示例3: node

BBitmap*
EntryMenuItem::LoadIcon()
{
	BBitmap* icon = NULL;
	BNode node(&fEntry);
	BNodeInfo info(&node);
	char type[B_MIME_TYPE_LENGTH+1];

	// Note: BNodeInfo::GetTrackerIcon does not work as expected!

	// try to get the icon stored in file attribute
	icon = new BBitmap(BRect(0, 0, kIconSize-1, kIconSize-1), B_CMAP8);
	if (info.GetIcon(icon, B_MINI_ICON) == B_OK) {
		return icon;
	} 
	delete icon; icon = NULL;

	// get the icon from type
	if (info.GetType(type) == B_OK) {
		BMimeType mimeType(type);
		BMimeType superType;
		if (mimeType.InitCheck() == B_OK) {
			icon = GetIcon(&mimeType);
			// or super type
			if (icon == NULL && mimeType.GetSupertype(&superType) == B_OK) {
				icon = GetIcon(&superType);
			}
		}
	}

	return icon;
}
开发者ID:Akujiism,项目名称:BePDF,代码行数:32,代码来源:EntryMenuItem.cpp


示例4: AddUrlActions

	void TermTab::handleTermContextMenu (const QPoint& point)
	{
		QMenu menu;

		AddUrlActions (menu, point);

		const auto& selected = Term_->selectedText ();
		AddLocalFileActions (menu, selected);

		const auto itm = CoreProxy_->GetIconThemeManager ();

		const auto copyAct = menu.addAction (itm->GetIcon ("edit-copy"),
				tr ("Copy selected text"),
				Term_,
				SLOT (copyClipboard ()));
		copyAct->setEnabled (!Term_->selectedText ().isEmpty ());

		const auto pasteAct = menu.addAction (itm->GetIcon ("edit-paste"),
				tr ("Paste from clipboard"),
				Term_,
				SLOT (pasteClipboard ()));
		pasteAct->setEnabled (!QApplication::clipboard ()->text (QClipboard::Clipboard).isEmpty ());

		new Util::StdDataFilterMenuCreator { selected, CoreProxy_->GetEntityManager (), &menu };

		menu.exec (Term_->mapToGlobal (point));
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:27,代码来源:termtab.cpp


示例5: CUIStatic

CUIDragItem* CUIWeaponCellItem::CreateDragItem()
{
	CUIDragItem* i		= inherited::CreateDragItem();
	CUIStatic* s		= NULL;

	if(GetIcon(eSilencer))
	{
		s				= new CUIStatic(); s->SetAutoDelete(true);
		s->SetShader	(InventoryUtilities::GetEquipmentIconsShader());
		InitAddon		(s, *object()->GetSilencerName(), m_addon_offset[eSilencer], false);
		s->SetColor		(i->wnd()->GetColor());
		i->wnd			()->AttachChild	(s);
	}
	
	if(GetIcon(eScope))
	{
		s				= new CUIStatic(); s->SetAutoDelete(true);
		s->SetShader	(InventoryUtilities::GetEquipmentIconsShader());
		InitAddon		(s,	*object()->GetScopeName(),		m_addon_offset[eScope], false);
		s->SetColor		(i->wnd()->GetColor());
		i->wnd			()->AttachChild	(s);
	}

	if(GetIcon(eLauncher))
	{
		s				= new CUIStatic(); s->SetAutoDelete(true);
		s->SetShader	(InventoryUtilities::GetEquipmentIconsShader());
		InitAddon		(s, *object()->GetGrenadeLauncherName(),m_addon_offset[eLauncher], false);
		s->SetColor		(i->wnd()->GetColor());
		i->wnd			()->AttachChild	(s);
	}
	return				i;
}
开发者ID:2asoft,项目名称:xray,代码行数:33,代码来源:UICellCustomItems.cpp


示例6: tr

	void RadioWidget::on_StationsView__customContextMenuRequested (const QPoint& point)
	{
		const auto& idx = Ui_.StationsView_->indexAt (point);
		if (!idx.isValid ())
			return;

		const auto type = idx.data (Media::RadioItemRole::ItemType).toInt ();
		const auto parentType = idx.parent ().data (Media::RadioItemRole::ItemType).toInt ();

		const auto iconsMgr = Core::Instance ().GetProxy ()->GetIconThemeManager ();

		QMenu menu;
		menu.addAction (iconsMgr->GetIcon ("view-refresh"),
				tr ("Refresh"),
				this,
				SLOT (handleRefresh ()));

		switch (type)
		{
		case Media::RadioType::CustomAddableStreams:
		{
			menu.addAction (iconsMgr->GetIcon ("list-add"),
					tr ("Add an URL..."),
					this,
					SLOT (handleAddUrl ()));

			const auto& url = Player_->GetSourceObject ()->GetCurrentSource ().ToUrl ();
			if (url.isValid () && !url.isLocalFile ())
				menu.addAction (tr ("Add current stream..."),
						this,
						SLOT (handleAddCurrentUrl ()));
			break;
		}
		case Media::RadioType::TracksList:
		case Media::RadioType::TracksRoot:
		case Media::RadioType::SingleTrack:
		{
			menu.addAction (iconsMgr->GetIcon ("download"),
					tr ("Download tracks..."),
					this,
					SLOT (handleDownloadTracks ()));
			break;
		}
		default:
			break;
		}

		if (parentType == Media::RadioType::CustomAddableStreams)
		{
			menu.addAction (iconsMgr->GetIcon ("list-remove"),
					tr ("Remove this URL"),
					this,
					SLOT (handleRemoveUrl ()));
		}

		menu.exec (Ui_.StationsView_->viewport ()->mapToGlobal (point));
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:57,代码来源:radiowidget.cpp


示例7: info

void OutputWindow::modelModelCodeFiles(const QStringList &sl)
{
    QTreeWidget * tree = ui->treeProject;
    QTreeWidgetItem* root = tree->topLevelItem(0);
    //Remove and return children list
    root->takeChildren();

    for(int i=0; i<sl.size(); ++i) {
        //        QString flabspath = sl.at(i);
        //        QString xlpath = flabspath.left(flabspath.lastIndexOf("/")).replace(modelFolder, tr(""));
        //        QString xlfile = flabspath.right(flabspath.length() -1 - flabspath.lastIndexOf("/") );
        QFileInfo info(sl.at(i));
        QString xlpath = info.absolutePath().replace(modelFolder, tr(""));
        QString xlfile = info.fileName();
        QString flabspath = info.absoluteFilePath();
        if(xlpath.compare("")!=0) {
            bool inserted = false;
            for(int j = 0; j<root->childCount(); ++j) {
                if(root->child(j)->text(0).compare(xlpath, Qt::CaseInsensitive) == 0) {
                    QTreeWidgetItem* item = new QTreeWidgetItem(
                                root->child(j),
                                QStringList(xlfile));
                    item->setIcon(0, GetIcon(xlfile) );
                    item->setData(0, Qt::UserRole, flabspath);
                    //                    item->setIcon(0, style()->standardIcon(QStyle::SP_FileIcon) );
                    inserted= true;
                    break;//for-j
                }
            }
            if(!inserted) {
                QTreeWidgetItem* path = new QTreeWidgetItem(
                            root,
                            QStringList(xlpath) );
                path->setIcon(0, style()->standardIcon(QStyle::SP_DirIcon));
                //path->setIcon(0, QIcon(px.copy(4*px_width,4*px_height,  px_width,px_height)));
                QTreeWidgetItem* item = new QTreeWidgetItem(
                            path,
                            QStringList(xlfile));
                //                item->setIcon(0, style()->standardIcon(QStyle::SP_FileIcon) );
                item->setIcon(0, GetIcon(xlfile) );
                item->setData(0, Qt::UserRole, flabspath );
                //                root->addChild(path);
            }
        } else { //path is empty


            QTreeWidgetItem* item = new QTreeWidgetItem(
                        root,
                        QStringList(xlfile));
            item->setIcon(0, GetIcon(xlfile) );
            item->setData(0, Qt::UserRole, flabspath );
        }
    }
    tree->expandAll();
}
开发者ID:LMiceOrg,项目名称:Modelingtools,代码行数:55,代码来源:outputwindow.cpp


示例8: GetNormalAndSelectedIcons

void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq,
                               LPTV_ITEM lptvitem)
{
   lptvitem -> iImage = GetIcon(lpifq, SHGFI_PIDL |
                              SHGFI_SYSICONINDEX |
                              SHGFI_SMALLICON) ;

   lptvitem -> iSelectedImage = GetIcon(lpifq, SHGFI_PIDL |
                                      SHGFI_SYSICONINDEX |
                                      SHGFI_SMALLICON |
                                      SHGFI_OPENICON) ;
}
开发者ID:tianjigezhu,项目名称:UI-Library,代码行数:12,代码来源:browser.cpp


示例9: CT_ICON

INT_PTR CDialogInstall::OnInitDialog(WPARAM wParam, LPARAM lParam)
{
	static const ControlTemplate::Control s_Controls[] =
	{
		CT_ICON(Id_HeaderIcon, 0,
			10, 10, 24, 24,
			WS_VISIBLE, 0),

		CT_LABEL(Id_HeaderTitleLabel, 2,
			40, 6, 250, 14,
			WS_VISIBLE | SS_ENDELLIPSIS | SS_NOPREFIX, 0),

		CT_LABEL(-1, 3,
			40, 20, 250, 9,
			WS_VISIBLE | SS_ENDELLIPSIS | SS_NOPREFIX, 0),

		CT_BUTTON(Id_InstallButton, 1,
			199, 191, 70, 14,
			WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON, 0),

		CT_BUTTON(Id_CancelButton, 13,
			274, 191, 70, 14,
			WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON, 0),

		CT_TAB(Id_Tab, 0,
			-2, 36, 400, 150,
			WS_VISIBLE | WS_TABSTOP | TCS_FIXEDWIDTH, 0)  // Last for correct tab order.
	};

	CreateControls(s_Controls, _countof(s_Controls), m_Font, GetString);
	
	m_TabContents.Create(m_Window);
	m_TabContents.Activate();

	SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)GetIcon(IDI_APPICON, false));

	HWND item = GetControl(Id_HeaderIcon);
	Static_SetIcon(item, GetIcon(IDI_APPICON, true));
	
	item = GetControl(Id_HeaderTitleLabel);
	SendMessage(item, WM_SETFONT, (WPARAM)m_FontBold, 0);

	item = GetControl(Id_InstallButton);
	SendMessage(m_Window, WM_NEXTDLGCTL, (WPARAM)item, TRUE);
	if (Platform::IsAtLeastWinVista() && !Util::IsProcessUserAdmin())
	{
		Button_SetElevationRequiredState(item, TRUE);
	}

	return TRUE;
}
开发者ID:Crazylemon64,项目名称:rainmeter,代码行数:51,代码来源:DialogInstall.cpp


示例10: GetIcons

int GetIcons()
{
	if (ServiceExists(MS_SKIN2_GETICON))
		{
			//FreeIcons();
//			hiDlgIcon = Get("Dlg");
			hiCheckMenu = GetIcon("MenuCheck");
			hiListMenu = GetIcon("MenuList");
			hiAddBirthdayContact = GetIcon("AddBirthday");
			hiRefreshUserDetails = GetIcon("RefreshUserDetails");
			
			hiImportBirthdays = GetIcon("ImportBirthdays");
			hiExportBirthdays = GetIcon("ExportBirthdays");
			
			int i;
			char buffer[1024];
			for (i = 0; i < cDTB; i++)
				{
					sprintf(buffer, "DTB%d", i);
					hiDTB[i] = GetIcon(buffer);
				}
			hiDTBMore = GetIcon("DTBMore");
		}
	return 0;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:25,代码来源:icons.cpp


示例11: MenuItem

FolderItem::FolderItem(Menu* pSubMenu, const TCHAR* pszTitle, const TCHAR* pszIcon) : MenuItem(pszTitle)
{
	m_nSortPriority = M_SORT_FOLDER;
	m_ItemID = MENUITEM_ID_FOLDER;
	LinkSubmenu(pSubMenu);
	m_phIcon = GetIcon(pszIcon);
}
开发者ID:fin-alice,项目名称:bb4nt,代码行数:7,代码来源:FolderItem.cpp


示例12: GetWindowRect

void CChildWnd::PaintCaption(CDC& dc)
{
	CString strCaption;
	CRect rc, rcWnd;
	
	GetWindowRect( &rcWnd );
	rc.SetRect( 0, 0, rcWnd.Width(), CAPTION_HEIGHT );
	GetWindowText( strCaption );
	
	CDC* pBuffer = CoolInterface.GetBuffer( dc, rc.Size() );
	
	if ( ! CoolInterface.DrawWatermark( pBuffer, &rc, &m_bmPanelMark, 0, 0 ) )
	{
		pBuffer->FillSolidRect( &rc, m_crPanelBack );
	}
	
	int nIconY = rc.Height() / 2 - 8;
	DrawIconEx( pBuffer->GetSafeHdc(), 4, nIconY,
		GetIcon( FALSE ), 16, 16, 0, NULL, DI_NORMAL );
	
	//CFont* pOldFont	= (CFont*)pBuffer->SelectObject( &theApp.m_gdiFont );
	CFont* pOldFont	= (CFont*)pBuffer->SelectObject( &CoolInterface.m_fntCaption );
	CSize szCaption	= pBuffer->GetTextExtent( strCaption );
	
	pBuffer->SetBkMode( TRANSPARENT );
	
	if ( m_crPanelBorder != CLR_NONE )
	{
		pBuffer->SetTextColor( m_crPanelBorder );
		pBuffer->ExtTextOut( 8 + 16 - 1, rc.Height() / 2 - szCaption.cy / 2 - 1,
			ETO_CLIPPED, &rc, strCaption, NULL );
		pBuffer->ExtTextOut( 8 + 16 + 1, rc.Height() / 2 - szCaption.cy / 2 - 1,
			ETO_CLIPPED, &rc, strCaption, NULL );
		pBuffer->ExtTextOut( 8 + 16, rc.Height() / 2 - szCaption.cy / 2 - 1 - 1,
			ETO_CLIPPED, &rc, strCaption, NULL );
		pBuffer->ExtTextOut( 8 + 16, rc.Height() / 2 - szCaption.cy / 2 - 1 + 1,
			ETO_CLIPPED, &rc, strCaption, NULL );
	}
	
	pBuffer->SetTextColor( m_crPanelText );
	pBuffer->ExtTextOut( 8 + 16, rc.Height() / 2 - szCaption.cy / 2 - 1,
		ETO_CLIPPED, &rc, strCaption, NULL );
	
	if ( m_bPanelClose )
	{
		pBuffer->SelectObject( &CoolInterface.m_fntUnder );
		CString strText	= _T("¹Ø±Õ");
		CSize szText	= pBuffer->GetTextExtent( strText );
		
		m_rcClose.SetRect( rc.right - szText.cx - 8, rc.top, rc.right, rc.bottom );
		pBuffer->ExtTextOut( m_rcClose.left + 2,
			( m_rcClose.top + m_rcClose.bottom ) / 2 - szText.cy / 2 - 1,
			ETO_CLIPPED, &m_rcClose, strText, NULL );
		m_rcClose.OffsetRect( rcWnd.left, rcWnd.top );
	}
	
	pBuffer->SelectObject( pOldFont );
	
	dc.BitBlt( rc.left, rc.top, rc.Width(), rc.Height(), pBuffer, 0, 0, SRCCOPY );
}
开发者ID:pics860,项目名称:callcenter,代码行数:60,代码来源:WndChild.cpp


示例13: Q_snprintf

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
CHudTexture *CHud::AddUnsearchableHudIconToList(CHudTexture& texture)
{
    // These names are composed based on the texture file name
    char composedName[512];

    if (texture.bRenderUsingFont)
    {
        Q_snprintf(composedName, sizeof(composedName), "%s_c%i",
            texture.szTextureFile, texture.cCharacterInFont);
    }
    else
    {
        Q_snprintf(composedName, sizeof(composedName), "%s_%i_%i_%i_%i",
            texture.szTextureFile, texture.rc.left, texture.rc.top, texture.rc.right, texture.rc.bottom);
    }

    CHudTexture *icon = GetIcon(composedName);
    if (icon)
    {
        return icon;
    }

    CHudTexture *newTexture = (CHudTexture *) g_HudTextureMemoryPool.Alloc();
    *newTexture = texture;

    SetupNewHudTexture(newTexture);

    int idx = m_Icons.Insert(composedName, newTexture);
    return m_Icons[idx];
}
开发者ID:Yosam02,项目名称:game,代码行数:33,代码来源:hud.cpp


示例14: CRY_ASSERT

//------------------------------------------------------------------------
void CGameRulesKingOfTheHillObjective::UpdateIcon(SHoldEntityDetails * pDetails)
{
	SKotHEntity *pKotHEntity = static_cast<SKotHEntity *>(pDetails->m_pAdditionalData);
	CRY_ASSERT(pKotHEntity);

	const char *pName = NULL;
	const char *pColour = NULL;
	EGameRulesMissionObjectives requestedIcon = GetIcon(pDetails, &pName, &pColour);

	if (requestedIcon != EGRMO_Unknown)
	{
		CCCPOINT(KingOfTheHillObjective_SetNewIcon);

		SHUDEventWrapper::OnNewObjective(pDetails->m_id, requestedIcon, 0.f, 0, pName, pColour);

		pKotHEntity->m_needsIconUpdate = false;

		if(!pKotHEntity->m_isOnRadar)
		{
			SHUDEvent hudevent(eHUDEvent_AddEntity);
			hudevent.AddData(SHUDEventData((int)pDetails->m_id));
			CHUDEventDispatcher::CallEvent(hudevent);
			pKotHEntity->m_isOnRadar = true;
		}
	}
	else if (pKotHEntity->m_currentIcon != EGRMO_Unknown)
	{
		CCCPOINT(KingOfTheHillObjective_RemoveIcon);

		SHUDEventWrapper::OnRemoveObjective(pDetails->m_id, 0);
	}

	pKotHEntity->m_currentIcon = requestedIcon;
}
开发者ID:Xydrel,项目名称:Infected,代码行数:35,代码来源:GameRulesKingOfTheHillObjective.cpp


示例15: FindButtonFromWindow

//This is called everytime a window that has a button closes
void pawsControlWindow::WindowClose(pawsWidget* wnd)
{
    pawsButton* btn = FindButtonFromWindow(wnd->GetName());
    Icon* icon = GetIcon(btn->GetName());
    icon->IsActive = false;
    btn->SetBackground(icon->orgRes.GetData());
}
开发者ID:garinh,项目名称:planeshift,代码行数:8,代码来源:pawscontrolwindow.cpp


示例16: GetWindowRect

void CPanelWnd::PaintCaption(CDC& dc)
{
	CString strCaption;
	CRect rc, rcWnd;

	BITMAP info = { 0, 0, CAPTION_HEIGHT };
	if ( Images.m_bmPanelMark.m_hObject) Images.m_bmPanelMark.GetBitmap( &info );

	GetWindowRect( &rcWnd );
	rc.SetRect( 0, 0, rcWnd.Width(), info.bmHeight );
	GetWindowText( strCaption );

	CSize size = rc.Size();
	CDC* pBuffer = CoolInterface.GetBuffer( dc, size );

	if ( ! CoolInterface.DrawWatermark( pBuffer, &rc, &Images.m_bmPanelMark ) )
		pBuffer->FillSolidRect( &rc, Colors.m_crPanelBack );

	const int nIconY = rc.Height() / 2 - 8;
	DrawIconEx( pBuffer->GetSafeHdc(), 4, nIconY,
		GetIcon( FALSE ), 16, 16, 0, NULL, DI_NORMAL );

	CFont* pOldFont	= (CFont*)pBuffer->SelectObject( &CoolInterface.m_fntCaption );
	CSize szCaption	= pBuffer->GetTextExtent( strCaption );
	const int nTextY = rc.Height() / 2 - szCaption.cy / 2 - 1;

	pBuffer->SetBkMode( TRANSPARENT );

	if ( Colors.m_crPanelBorder != CLR_NONE )
	{
		pBuffer->SetTextColor( Colors.m_crPanelBorder );
		pBuffer->ExtTextOut( 8 + 16 - 1, nTextY, ETO_CLIPPED, &rc, strCaption, NULL );
		pBuffer->ExtTextOut( 8 + 16 + 1, nTextY, ETO_CLIPPED, &rc, strCaption, NULL );
		pBuffer->ExtTextOut( 8 + 16, nTextY - 1, ETO_CLIPPED, &rc, strCaption, NULL );
		pBuffer->ExtTextOut( 8 + 16, nTextY + 1, ETO_CLIPPED, &rc, strCaption, NULL );
	}

	pBuffer->SetTextColor( Colors.m_crPanelText );
	pBuffer->ExtTextOut( 8 + 16, nTextY, ETO_CLIPPED, &rc, strCaption, NULL );

	if ( m_bPanelClose )
	{
		pBuffer->SelectObject( &theApp.m_gdiFont );
		CString strText	= _T("Close");
		CSize szText = pBuffer->GetTextExtent( strText );

		m_rcClose.SetRect( rc.right - szText.cx - 8, rc.top, rc.right, rc.bottom );
		pBuffer->ExtTextOut( m_rcClose.left + 2,
			( m_rcClose.top + m_rcClose.bottom ) / 2 - szText.cy / 2 - 1,
			ETO_CLIPPED, &m_rcClose, strText, NULL );
		m_rcClose.OffsetRect( rcWnd.left, rcWnd.top );
	}

	pBuffer->SelectObject( pOldFont );

	dc.BitBlt( rc.left, rc.top, rc.Width(), rc.Height(), pBuffer, 0, 0, SRCCOPY );

	dc.SelectStockObject( SYSTEM_FONT );	// GDI font leak fix
	dc.SelectStockObject( NULL_BRUSH ); 	// GDI brush leak fix
}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:60,代码来源:WndPanel.cpp


示例17: assert

bool CSlotBuyPrivateStore::IsSelected()
{
	assert( GetIcon() );
	if( s_pSelectedSlot == this )
		return true;
	return false;
}
开发者ID:PurpleYouko,项目名称:Wibble_Wibble,代码行数:7,代码来源:CSlot.cpp


示例18: QDialog

	RemoteDirectorySelectDialog::RemoteDirectorySelectDialog (const QByteArray& accId,
			AccountsManager *am, QWidget *parent)
	: QDialog (parent)
	, AccountId_ (accId)
	, Model_ (new QStandardItemModel (this))
	, ProxyModel_ (new FilesProxyModel (this))
	, AM_ (am)
	{
		Ui_.setupUi (this);

		const auto iconMgr = AM_->GetProxy ()->GetIconThemeManager ();
		auto createDir = new QPushButton (iconMgr->GetIcon ("folder-new"),
				tr ("New directory..."));
		Ui_.ButtonBox_->addButton (createDir, QDialogButtonBox::ActionRole);
		connect (createDir,
				SIGNAL (clicked ()),
				this,
				SLOT (createNewDir ()));

		Model_->setHorizontalHeaderLabels ({ tr ("Directory") });
		ProxyModel_->setSourceModel (Model_);
		Ui_.DirectoriesView_->setModel (ProxyModel_);
		if (auto account = am->GetAccountFromUniqueID (accId))
			if (auto isfl = qobject_cast<ISupportFileListings*> (account->GetQObject ()))
				Util::Sequence (this, isfl->RefreshListing ())
						.MultipleResults ([this] (const ISupportFileListings::RefreshResult_t& result)
								{ HandleGotListing (result); });
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:28,代码来源:remotedirectoryselectdialog.cpp


示例19: switch

/***********************************************************************************
 ** GetItemData
 **
 **
 ***********************************************************************************/
OP_STATUS SearchTemplate::GetItemData(ItemData* item_data)
{
	if (item_data->query_type == COLUMN_QUERY)
	{
		switch(item_data->column_query_data.column)
		{
			case 0:
			{
				if (item_data->flags & FLAG_NO_PAINT)
					break;

				item_data->column_bitmap = GetIcon();

				if (item_data->column_bitmap.IsEmpty())
				{
					item_data->column_query_data.column_image = "Search Web";
				}
				break;
			}
			case 1:
			{
				RETURN_IF_ERROR(GetEngineName(*item_data->column_query_data.column_text));
				break;
			}
			case 2:
			{
				RETURN_IF_ERROR(item_data->column_query_data.column_text->Set(m_key));
				break;
			}
		}
	}
	return OpStatus::OK;
}
开发者ID:prestocore,项目名称:browser,代码行数:38,代码来源:search_net.cpp


示例20: GetShortCutInfo

void CEzShortcutDlg::OnDrawIcon()
{
	CString strShortcutName;
	m_staticShortcutNameContent.GetWindowText(strShortcutName);

	SHORTCUT_INFO* ShortcutInfo = GetShortCutInfo(strShortcutName.GetBuffer());
	if( ShortcutInfo == NULL)
	{
		return;
	}

	CClientDC dc(this);
	light::Icon icon(ShortcutInfo->m_strProgramPath);
	if( icon.Large())
	{
		dc.DrawIcon(ICON_X, ICON_Y, icon.Large());
	}
	else
	{
		if( _tcsncmp(_T("http"), ShortcutInfo->m_strProgramPath.c_str(), 4) == 0)
			dc.DrawIcon(ICON_X, ICON_Y, AfxGetApp()->LoadIcon(IDI_WEB_ICON));
		else if( true == light::FileUtil::is_exist(ShortcutInfo->m_strProgramPath))
			dc.DrawIcon(ICON_X, ICON_Y, GetIcon(TRUE));
		else
			dc.DrawIcon(ICON_X, ICON_Y, AfxGetApp()->LoadIcon(IDI_FOLDER_ICON));
	}
}
开发者ID:elky84,项目名称:ez_shortcut,代码行数:27,代码来源:EzShortcutDlg.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetIconHandle函数代码示例发布时间:2022-05-30
下一篇:
C++ GetISpinner函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap