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

C++ GetToolBarCtrl函数代码示例

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

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



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

示例1: LoadString

void CMyToolBar::InsertLabel(int nPos, UINT nID, CFont* pFont)
{
	Label label;
	label.nID = nID;
	label.strText = LoadString(nID);
	label.pFont = pFont;
	m_labels.push_back(label);

	CScreenDC dcScreen;
	CFont* pOldFont = dcScreen.SelectObject(pFont);
	int nWidth = dcScreen.GetTextExtent(label.strText).cx + 3;
	dcScreen.SelectObject(pOldFont);

	TBBUTTON btn;
	ZeroMemory(&btn, sizeof(btn));
	btn.idCommand = nID;
	btn.fsStyle = TBSTYLE_BUTTON;

	TBBUTTONINFO info;
	ZeroMemory(&info, sizeof(info));
	info.cbSize = sizeof(info);
	info.dwMask = TBIF_SIZE;
	info.cx = nWidth;

	GetToolBarCtrl().InsertButton(nPos, &btn);
	GetToolBarCtrl().SetButtonInfo(nID, &info);
}
开发者ID:ijprest,项目名称:WinDjVu,代码行数:27,代码来源:MyToolBar.cpp


示例2: ASSERT_VALID

CWnd* CToolBarEx::InsertControl(CWnd* pCtrl, RECT& rect, UINT nID)
{
	ASSERT_VALID(pCtrl);
	// make sure the id is valid, and set the button style for a seperator.
	int nState, nIndex = CommandToIndex(nID);
	if (nIndex > -1)
	{
		ASSERT(nIndex >= 0);
		SetButtonInfo(nIndex, nID, TBBS_SEPARATOR, rect.right - rect.left);
		// insert the control into the toolbar.
		GetItemRect(nIndex, &rect);				
		pCtrl->SetWindowPos(0, rect.left, rect.top, 0, 0, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOCOPYBITS);
		pCtrl->SetFont(GetFont());

		BOOL bVert = (m_dwStyle & CBRS_ORIENT_VERT) != 0;
		if (bVert)
		{
		   	nState = GetToolBarCtrl().GetState(nIndex);
		   	GetToolBarCtrl().SetState(nID,(nState | TBSTATE_HIDDEN));
			pCtrl->ShowWindow(SW_HIDE);
		}
		else
		{
		   	nState = GetToolBarCtrl().GetState(nIndex);
		   	GetToolBarCtrl().SetState(nIndex,(nState & ~TBSTATE_HIDDEN));
			pCtrl->ShowWindow(SW_SHOW);
		}
	}
	else pCtrl->ShowWindow(SW_HIDE);	
	return pCtrl;	
}
开发者ID:BlackMoon,项目名称:logread,代码行数:31,代码来源:ctrl.cpp


示例3: GetDlgCtrlID

void CFormatBar::SyncToView()
{
	// get the current font from the view and update
	CHARHDR fh;
	CHARFORMAT& cf = fh.cf;
	cf.dwMask = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_FACE | CFM_SIZE;
	fh.hwndFrom = m_hWnd;
	fh.idFrom = GetDlgCtrlID();
	fh.code = FN_GETFORMAT;
	CWnd *pWnd = GetOwner();
	VERIFY(GetOwner()->SendMessage(WM_NOTIFY, fh.idFrom, (LPARAM)&fh));

	GetToolBarCtrl().CheckButton(ID_CHAR_BOLD, cf.dwEffects & CFE_BOLD);
	GetToolBarCtrl().CheckButton(ID_CHAR_ITALIC, cf.dwEffects & CFE_ITALIC);
	GetToolBarCtrl().CheckButton(ID_CHAR_UNDERLINE, cf.dwEffects & CFE_UNDERLINE);		

	// the selection must be same font and charset to display correctly
	if ((cf.dwMask & (CFM_FACE|CFM_CHARSET)) == (CFM_FACE|CFM_CHARSET))
		m_comboFontName.MatchFont(cf.szFaceName, cf.bCharSet);
	else
		m_comboFontName.SetTheText(_T(""));

	// SetTwipSize only updates if different
	// -1 means selection is not a single point size
	m_comboFontSize.SetTwipSize( (cf.dwMask & CFM_SIZE) ? cf.yHeight : -1);
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:26,代码来源:FormatBar.cpp


示例4: GetToolBarCtrl

BOOL CToolBarEx::ShowGroup(int iGrp, int iWhere)
{
	if (iGrp >= m_vGroups.size ())
		return FALSE;

	fs::list <fsTBInfo> *pGroup = &m_vGroups [iGrp];

	for (int i = 0; i < pGroup->size (); i++)
	{
		fsTBInfo *tb = &pGroup->at (i);
		TBBUTTON btn;

		
		btn.dwData = iGrp;
		btn.fsState = TBSTATE_ENABLED;
		btn.fsStyle = tb->bStyle;
		
		btn.iBitmap = tb->iImage;
		btn.idCommand = tb->idCommand;
		btn.iString = tb->iName;

		GetToolBarCtrl ().InsertButton (iWhere++, &btn);
	}

	GetToolBarCtrl().AutoSize();

	UpdateSize ();

	return TRUE;
}
开发者ID:pedia,项目名称:raidget,代码行数:30,代码来源:toolbarex.cpp


示例5: ZeroMemory

void CDkToolBar::UpdateButtonImage()
{
	TBBUTTONINFO tbbi;
	ZeroMemory(&tbbi, sizeof(TBBUTTONINFO));
	tbbi.cbSize = sizeof(TBBUTTONINFO);
	tbbi.dwMask = TBIF_IMAGE;
	GetToolBarCtrl().GetButtonInfo(ID_CONV_FORMAT_USER, &tbbi);
	tbbi.iImage = nDyImageIndex + g_nUserConvFormatType;
	GetToolBarCtrl().SetButtonInfo(ID_CONV_FORMAT_USER, &tbbi);
}
开发者ID:leiqunni,项目名称:STEP_Unicode,代码行数:10,代码来源:DkToolBar.cpp


示例6: DefWindowProc

CSize CToolBarXP::CalcDynamicLayout (int nLength, DWORD dwMode)
{
    bool bHideControls = (dwMode & LM_VERTDOCK) == LM_VERTDOCK;
    m_bCheckVisibility = (BYTE)(bHideControls ? 1 : 2);
    CSize size = CToolBar::CalcDynamicLayout (nLength, dwMode);
    m_bCheckVisibility = false;

    if ( dwMode & LM_COMMIT )
    {
        TBBUTTON tbbutton;
        int nCount = DefWindowProc (TB_BUTTONCOUNT, 0, 0);

        for ( int i = 0; i < nCount; i++ )
        {
            VERIFY(DefWindowProc (TB_GETBUTTON, i, (LPARAM)&tbbutton));

            if ( !IS_CONTROL(tbbutton) )
            {
                continue;
            }
            CWnd* pWnd = GetDlgItem (tbbutton.idCommand);

            if ( pWnd == NULL )
            {
                continue;
            }
            if ( bHideControls )
            {
                GetToolBarCtrl().HideButton (tbbutton.idCommand, true);
                pWnd->ShowWindow (SW_HIDE);
            }
            else
            {
                GetToolBarCtrl().HideButton (tbbutton.idCommand, false);

                // Update control position
                CRect rcControl;

                VERIFY (DefWindowProc (TB_GETITEMRECT, i, (LPARAM)&rcControl));
                rcControl.DeflateRect (1, 1);
                
                CWindowRect rcCtrl (pWnd);
                int         nNoSize = 0;

                if ( rcControl.Width() == rcCtrl.Width() )
                {
                    nNoSize = SWP_NOSIZE;
                }
                pWnd->SetWindowPos (NULL, rcControl.left, rcControl.top, rcControl.Width(), rcControl.Height(),
                                    nNoSize|SWP_NOACTIVATE|SWP_NOZORDER|SWP_SHOWWINDOW);
            }
        }
    }
    return size;
}
开发者ID:likebeta,项目名称:code-snippets,代码行数:55,代码来源:ToolBarXP.cpp


示例7: GetToolBarCtrl

int CSearchBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CToolBar::OnCreate(lpCreateStruct) == -1)
		return -1;

	GetToolBarCtrl().SetBitmapSize(CSize(16, 16));

	LPCTSTR cls_name;
	if (riched20)
		cls_name = "RichEdit20A";
	else
		cls_name = "EDIT";

	hedit = CreateWindowEx(WS_EX_CLIENTEDGE, cls_name, NULL, ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE,
						   0, 0, 0, 0, m_hWnd, NULL, AfxGetInstanceHandle(), NULL);

	if (riched20)
	{
		::SendMessage(hedit, EM_SETTEXTMODE, TM_PLAINTEXT | TM_MULTICODEPAGE, 0);
		::SendMessage(hedit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELPARAM(2, 2));
		::SendMessage(hedit, EM_SETUNDOLIMIT, 1, 0);
	}

	old_search_bar_proc = (WNDPROC)::GetWindowLong(hedit, GWL_WNDPROC);
	::SetWindowLong(hedit, GWL_WNDPROC, (LONG)EditProc);
	::SetWindowLong(hedit, GWL_USERDATA, (LONG)this);

	CToolBarCtrl& toolbar = GetToolBarCtrl();

	toolbar.AddButtons(1, searchbar_btns);
	toolbar.SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS);
	toolbar.SetIndent(100);
	toolbar.AutoSize();

	int n = SearchPluginCollection.GetCount();
	if (n > 0)
	{
		for (int i = 0; i < n; ++i)
		{
			HBITMAP hbmp = SearchPluginCollection.GetImage(i);
			if (hbmp)
			{
				TBADDBITMAP tbab;
				tbab.hInst = NULL;
				tbab.nID = (UINT)hbmp;
				::SendMessage(toolbar.m_hWnd, TB_ADDBITMAP, 1, (LPARAM)&tbab);
			}
		}
	}

	UpdateBtn();
	EnableToolTips();
	return 0;
}
开发者ID:Kerlifw,项目名称:pcman-windows,代码行数:54,代码来源:SearchBar.cpp


示例8: GetToolBarCtrl

void CRRECToolBar::OnSize(UINT nType, int cx, int cy)
{
    GetToolBarCtrl().SetButtonSize(m_sizeButton);

    CEnToolBar::OnSize(nType, cx, cy);

    CSize size(GetToolBarCtrl().GetButtonSize());

    if (m_font.GetSafeHwnd())
    {
        CRect rDiv;

        // calc length after which we want to start shortening ctrls
        GetItemRect(1, &rDiv); // divider
        const int DEFCTRLSWIDTH = FONT_COMBO_WIDTH + SIZE_COMBO_WIDTH +
                                  (5 * rDiv.Width()) / 2; // 2.5 separators

        // if the toolbar length is less than the default
        // width of the embedded widgets we reduce the
        // font combo as far as we can.
        TBBUTTONINFO tbi;
        tbi.cbSize = sizeof( TBBUTTONINFO );
        tbi.dwMask = TBIF_SIZE;  // By index

        CRect rect;
        GetItemRect( FONT_NAME_POS, &rect );

        rect.left++;
        rect.top++;
        rect.bottom += COMBO_HEIGHT;

        int nNewWidth = FONT_COMBO_WIDTH - max(0, DEFCTRLSWIDTH - cx);
        nNewWidth = max(nNewWidth, MIN_FONT_COMBO_WIDTH);

        if (nNewWidth != rect.Width())
        {
            rect.right = rect.left + nNewWidth;
            rect.bottom += COMBO_HEIGHT;
            m_font.MoveWindow(rect);

            // update toolbar item size also
            tbi.cx = (WORD)rect.Width();
            GetToolBarCtrl().SetButtonInfo(FONT_NAME_ID, &tbi);

            // move the other two items to suit their toolbar rects
            GetItemRect(FONT_SIZE_POS, &rect);
            rect.top++;
            rect.bottom += COMBO_HEIGHT;
            m_size.MoveWindow(rect);
        }
    }
}
开发者ID:jithuin,项目名称:infogeezer,代码行数:52,代码来源:RRECToolbar.cpp


示例9: GetToolBarCtrl

int CMainToolBar::HitTestButton(CPoint &pt) {
  int index = GetToolBarCtrl().HitTest(&pt);
  if (index >= 0)
    return GetItemID(index);

  return index;
}
开发者ID:avrionov,项目名称:explorerxp,代码行数:7,代码来源:MainToolBar.cpp


示例10: AFX_MANAGE_STATE

HRESULT CTRiASToolBar::DeleteItem (int iIndex)
{
	AFX_MANAGE_STATE(AfxGetModuleState());
    ASSERT_VALID(this);
    ASSERT(::IsWindow(m_hWnd));

TBBUTTON button;

	_GetButtonEx (iIndex, &button);

	if (0 != button.idCommand && !m_Owners.erase (button.idCommand))
		return E_FAIL;

#if !defined(_USE_SEC_CLASSES)
CToolBarCtrl &rTB = GetToolBarCtrl();
HRESULT hr = rTB.DeleteButton (iIndex) ? NOERROR : S_FALSE;
#else
HRESULT hr = m_pMainFrm -> DeleteButton (this, iIndex);
#endif // _USE_SEC_CLASSES
	
	if (S_OK == hr && IsWindowVisible())
		m_pMainFrm -> DelayRecalcLayout();

	return hr;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:25,代码来源:TRiASToolBar.cpp


示例11: GetToolBarCtrl

void CPWFindToolBar::ChangeImages(const int toolbarMode)
{
  CToolBarCtrl& tbCtrl = GetToolBarCtrl();
  m_toolbarMode = toolbarMode;
  const int nImageListNum = (m_toolbarMode == ID_MENUITEM_OLD_TOOLBAR) ? 0 : m_bitmode;
  tbCtrl.SetImageList(&m_ImageLists[nImageListNum]);
}
开发者ID:pwsafe,项目名称:pwsafe,代码行数:7,代码来源:PWFindToolBar.cpp


示例12: GetToolBarCtrl

void CToolBarEx::OnReset( NMHDR* /*pNMHDR*/, LRESULT* pResult )
{
    // Delete all buttons
    CToolBarCtrl& tbCtrl = GetToolBarCtrl();
    while ( tbCtrl.DeleteButton( 0 ) );

    // Load buttons from internal cache
    for ( int nIndex = 0; nIndex <= m_aButtons.GetUpperBound(); nIndex++ )
    {
        if ( m_aButtons[ nIndex ].bInitiallyVisible )
        {
            VERIFY( tbCtrl.AddButtons( 1, &m_aButtons[ nIndex ].tbinfo ) );
        }
    }

    // Set default text & icon options
    SetIconOptions( m_eIconOptionsDefault, false );
    SetTextOptions( m_eTextOptionsDefault, false );
    ReloadButtons();
    UpdateParentBandInfo();

    // Synchronize with Customize dialog
    ASSERT( m_pCustomizeDlg != 0 );
    m_pCustomizeDlg->SetTextOptions( m_eTextOptions, true );
    m_pCustomizeDlg->SetIconOptions( m_eIconOptions, true );

    *pResult = 0;
}
开发者ID:moodboom,项目名称:Reusable,代码行数:28,代码来源:ToolBarEx.cpp


示例13: GetToolBarCtrl

BOOL CPlayerToolBar::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult)
{
    TOOLTIPTEXT* pTTT = (TOOLTIPTEXT*)pNMHDR;

    UINT_PTR nID = pNMHDR->idFrom;
    if (pTTT->uFlags & TTF_IDISHWND) {
        nID = ::GetDlgCtrlID((HWND)nID);
    }

    if (nID != ID_VOLUME_MUTE) {
        return FALSE;
    }

    CToolBarCtrl& tb = GetToolBarCtrl();
    TBBUTTONINFO bi;
    bi.cbSize = sizeof(bi);
    bi.dwMask = TBIF_IMAGE;
    tb.GetButtonInfo(ID_VOLUME_MUTE, &bi);

    static CString strTipText;
    if (bi.iImage == 12) {
        strTipText.LoadString(ID_VOLUME_MUTE);
    } else if (bi.iImage == 13) {
        strTipText.LoadString(ID_VOLUME_MUTE_ON);
    } else if (bi.iImage == 14) {
        strTipText.LoadString(ID_VOLUME_MUTE_DISABLED);
    } else {
        return FALSE;
    }
    pTTT->lpszText = (LPWSTR)(LPCWSTR)strTipText;

    *pResult = 0;

    return TRUE;    // message was handled
}
开发者ID:KyleSanderson,项目名称:mpc-hc,代码行数:35,代码来源:PlayerToolBar.cpp


示例14: GetCursorPos

xpr_bool_t BookmarkToolBar::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
    NMHDR *pnmhdr = (NMHDR *)lParam;

    if (pnmhdr->code == TTN_GETDISPINFO)
    {
        if (gOpt->mConfig.mBookmarkTooltip == XPR_TRUE)
        {
            LPNMTTDISPINFO sNmTtDispInfo = (LPNMTTDISPINFO)pnmhdr;

            CPoint sPoint;
            GetCursorPos(&sPoint);
            ScreenToClient(&sPoint);

            xpr_sint_t sIndex = GetToolBarCtrl().HitTest(&sPoint);

            BookmarkItem *sBookmarkItem = BookmarkMgr::instance().getBookmark(sIndex);
            if (sBookmarkItem == XPR_NULL)
                return XPR_FALSE;

            sBookmarkItem->getTooltip(mToolTipText, !gOpt->mMain.mBookmarkBarText, XPR_TRUE);

            sNmTtDispInfo->lpszText = mToolTipText;
        }
    }

    return super::OnNotify(wParam, lParam, pResult);
}
开发者ID:fxfile,项目名称:fxfile,代码行数:28,代码来源:bookmark_toolbar.cpp


示例15: GetToolBarCtrl

void CDynToolBar::ChangeButtonIDS(UINT ID1, UINT ID2, UINT IDRQD)
  {
  if (bCanConfigure)
    {
    CToolBarCtrl& bc = GetToolBarCtrl();
    int Cnt = bc.GetButtonCount();
    BOOL Chngd = FALSE;
    UINT* NewIDs = new UINT[Cnt];
    Strng Item;
    for (int i=0; i<Cnt; i++)
      {
      TBBUTTON B;
      bc.GetButton(i, &B);
      NewIDs[i]=B.idCommand;
      if (B.idCommand==(int)ID1 || B.idCommand==(int)ID2)
        {
        Chngd=true;
        NewIDs[i]=IDRQD;
        }
      }
    if (Chngd)
      ChangeButtons(NewIDs, Cnt);
    delete []NewIDs;
    }
  // the toolbar has changed
  }
开发者ID:ChrisMoreton,项目名称:Test3,代码行数:26,代码来源:Toolbars.cpp


示例16: GetToolBarCtrl

void BookmarkToolBar::setBookmark(void)
{
    if (mInit == XPR_FALSE)
        return;

    if (mImgList.m_hImageList != XPR_NULL)
        mImgList.DeleteImageList();

    mImgList.Create(16, 16, ILC_COLOR32 | ILC_MASK, -1, -1);
    GetToolBarCtrl().SetImageList(&mImgList);

    BookmarkMgr &sBookmarkMgr = BookmarkMgr::instance();

    xpr_sint_t sCount = sBookmarkMgr.getCount();
    if (sCount > 0)
    {
        sBookmarkMgr.getAllIcon();

        xpr_sint_t i;
        for (i = 0; i < sCount; ++i)
            addBookmarkButton(i, sBookmarkMgr.getBookmark(i));
    }

    UpdateToolbarSize();
}
开发者ID:fxfile,项目名称:fxfile,代码行数:25,代码来源:bookmark_toolbar.cpp


示例17: Create

BOOL CToolBarEx::Create(CWnd* pParent)
{
	if (!CreateEx (pParent, TBSTYLE_FLAT | TBSTYLE_TRANSPARENT
			,
			WS_CHILD | WS_VISIBLE | CBRS_TOOLTIPS | CBRS_ALIGN_TOP)
			)
		return FALSE;

	m_bar = &GetToolBarCtrl ();

	m_bar->SetBitmapSize (CSize (_TB_SIZE_X, _TB_SIZE_Y));

	SetSizes (CSize (_TB_SIZE_X+7, _TB_SIZE_Y+7),
		CSize (_TB_SIZE_X, _TB_SIZE_Y));

 	if (!m_images.Create (_TB_SIZE_X, _TB_SIZE_Y, ILC_COLOR32 | ILC_MASK, 30, 5))
		return FALSE;

	m_dimages.Create (_TB_SIZE_X, _TB_SIZE_Y, ILC_COLOR32 | ILC_MASK, 30, 5);

	m_bar->SetImageList (&m_images);
	m_bar->SetDisabledImageList (&m_dimages);

	return TRUE;
}
开发者ID:pedia,项目名称:raidget,代码行数:25,代码来源:toolbarex.cpp


示例18: ASSERT

void CToolBarEx::SetIconOptions( EIconOptions eIconOptions, bool bUpdate /*=true*/ )
{
    ASSERT( ::IsWindow( m_hWnd ) );
    ASSERT( IsIconOptionAvailable( eIconOptions ) );

    m_eIconOptions = eIconOptions;

    // Set image list(s) and icon size for selected icon options
    CToolBarCtrl& tbCtrl = GetToolBarCtrl();
    tbCtrl.SetImageList( 0 );
    tbCtrl.SetHotImageList( 0 );
    tbCtrl.SetDisabledImageList( 0 );

    CSize szIcon = ( eIconOptions == ioSmallIcons ) ? m_szImageSmall : m_szImageLarge;
	 VERIFY( tbCtrl.SetBitmapSize( szIcon ) );

    UINT nIDCold     = ( eIconOptions == ioSmallIcons ) ? m_nIDSmallCold     : m_nIDLargeCold;
    UINT nIDHot      = ( eIconOptions == ioSmallIcons ) ? m_nIDSmallHot      : m_nIDLargeHot;
    UINT nIDDisabled = ( eIconOptions == ioSmallIcons ) ? m_nIDSmallDisabled : m_nIDLargeDisabled;
    ASSERT( nIDCold != ( UINT )-1 );    // at least there must be "cold" imagelist

    LPCTSTR lpResName = MAKEINTRESOURCE( nIDCold );
    HINSTANCE hInst = AfxFindResourceHandle( lpResName, RT_BITMAP );

    m_imageListCold.DeleteImageList();
    VERIFY( m_imageListCold.Attach( ImageList_LoadImage( hInst, lpResName,
        szIcon.cx, 0, m_clrMask, IMAGE_BITMAP, LR_CREATEDIBSECTION ) ) );
    tbCtrl.SetImageList( &m_imageListCold );

    if ( nIDHot != ( UINT )-1 ) // "hot" imagelist is optional
    {
        lpResName = MAKEINTRESOURCE( nIDHot );
        hInst = AfxFindResourceHandle( lpResName, RT_BITMAP );

        m_imageListHot.DeleteImageList();
        VERIFY( m_imageListHot.Attach( ImageList_LoadImage( hInst, lpResName,
            szIcon.cx, 0, m_clrMask, IMAGE_BITMAP, LR_CREATEDIBSECTION ) ) );
        tbCtrl.SetHotImageList( &m_imageListHot );
    }

    if ( nIDDisabled != ( UINT )-1 ) // "disabled" imagelist is optional
    {
        lpResName = MAKEINTRESOURCE( nIDDisabled );
        hInst = AfxFindResourceHandle( lpResName, RT_BITMAP );

        m_imageListDisabled.DeleteImageList();
        VERIFY( m_imageListDisabled.Attach( ImageList_LoadImage( hInst, lpResName,
            szIcon.cx, 0, m_clrMask, IMAGE_BITMAP, LR_CREATEDIBSECTION ) ) );
        tbCtrl.SetDisabledImageList( &m_imageListDisabled );
    }

    // If requested, reflect changes immediately
    if ( bUpdate )
    {
        ReloadButtons();
        UpdateParentBandInfo();
    }
}
开发者ID:moodboom,项目名称:Reusable,代码行数:58,代码来源:ToolBarEx.cpp


示例19: while

void CDkToolBar::UpdatePluginButton()
{
	int nPos = 0;
	while (TRUE) {
		CPluginToolBarInfo* button = FindPluginToolBarInfo(nPos);
		if (button == NULL) break;
		if (button->nPos < 0) {
			button->nIndex = -2;
			continue;
		}
		int nIndex = GetToolBarCtrl().GetButtonCount();
		GetToolBarCtrl().InsertButton(nIndex, &button->tbButton);
		if (nIndex != button->nPos) {
			GetToolBarCtrl().MoveButton(nIndex, button->nPos);
		}
		button->nIndex = nIndex;
	}
}
开发者ID:leiqunni,项目名称:STEP_Unicode,代码行数:18,代码来源:DkToolBar.cpp


示例20: GetItemRect

void CSearchBar::OnSize(UINT nType, int cx, int cy)
{
	CToolBar::OnSize(nType, cx, cy);
	CRect rc;
	GetItemRect(0, rc);

	::MoveWindow(hedit, 1, 1, cx - rc.Width() - 6, cy - 2, TRUE);
	GetToolBarCtrl().SetIndent(cx - rc.Width() - 4);
}
开发者ID:Kerlifw,项目名称:pcman-windows,代码行数:9,代码来源:SearchBar.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetToolId函数代码示例发布时间:2022-05-30
下一篇:
C++ GetToolBar函数代码示例发布时间: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