Print Page | Close Window

SetButtonInfo and GetItemRect replacements?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7782
Printed Date: 03 March 2025 at 5:33am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SetButtonInfo and GetItemRect replacements?
Posted By: prashant
Subject: SetButtonInfo and GetItemRect replacements?
Date Posted: 13 August 2007 at 4:17am
Hi,

Can anybody tell me what are the replacement functions in Codejock 10.4.2 for SetButtonInfo and GetItemRect ?

Previously I am deriving my class from CXTToolBar and as per present implementation I am deriving my class from CXTPToolBar.

My requirement is to display combo box on Toolbar.
My previous code is as follows:-

    int nID=ID_PRIMARY_VIEW_COMBO;
    int nDropHeight=150;

  
    //SetButtonInfo(nIndex, nID, TBBS_SEPARATOR, w);

    CRect rect;
    //GetItemRect(nIndex, &rect);
    rect.top = 0;
    rect.bottom = rect.top + nDropHeight;
    if (!m_MasterViewListCombo.Create(                                 CBS_DROPDOWNLIST|CBS_AUTOHSCROLL|
WS_VISIBLE|WS_TABSTOP|WS_VSCROLL|WS_HSCROLL,
        rect, this, nID))
    {
        TRACE("Failed to create combo-box\n");
        return FALSE;
    }

Thanks in advance.




Replies:
Posted By: Oleg
Date Posted: 13 August 2007 at 8:51am
Hello,
 
to add separator call
 
pToolBar->GetControl(i)->SetBeginGroup(TRUE);
 
to get rect call
 
pToolBar->GetControl(i)->GetRect();
 
Please check our samples. Better use our CXTPControlComboBox to use current theme for combo.
 
 
\Samples\CommandBars\CommonControls shows how to add standard combos to toolbar
\Samples\CommandBars\CustomThemes how to add themed combos.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net