Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - SetButtonInfo and GetItemRect replacements?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetButtonInfo and GetItemRect replacements?

 Post Reply Post Reply
Author
Message
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Topic: SetButtonInfo and GetItemRect replacements?
    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.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.