 |
|
 |
I try to add string on the button of m_tb, but the string can not be displayed when chevron is clicked.
And I added my implement in the "ShowPopup" fucntion, and my code is as follows:
BOOL CChevDrop::ShowPopup(
CWnd* pMsgReceiver, //mainframe
CToolBar* pToolBar, //toolbar in mainframe
CRect rectDisplayed, //for rebar
CPoint ptScreen ) //menu position
{
...//old code
//The following code is used for adding string for a button on the m_tb.
//Because m_tb is CToolBarCtrl type but not CToolBar type, so I use "SetButtonInfo" function to set the string
//according to MSDN document.
TBBUTTONINFO tbInfo;
memset((char*)&tbInfo, 0, sizeof(TBBUTTONINFO));
tbInfo.cbSize = sizeof(TBBUTTONINFO);
tbInfo.dwMask = TBIF_TEXT;
tbInfo.cchText = strlen("string");
tbInfo.pszText = "string";
BOOL bRet = m_tb.SetButtonInfo(ID_BUTTONCHECK_1,&tbInfo);
...//old code
}
But it seems that above code can not work well, and "string" can not be displayed on the button whose ID=ID_BUTTONCHECK_1.
Can somebody tell me the reason, and how to implement my wanted function?
Thanks.
a good man
|
|
|
|
 |
|
 |
CSize sizeMax(0, 0);
pToolBar->GetToolBarCtrl().GetMaxSize ( &sizeMax );
CRect rectMax(0, 0, 0, 0);
int nCount = pToolBar->GetToolBarCtrl().GetButtonCount();
if ((nCount > 0) && pToolBar->GetToolBarCtrl().GetItemRect(nCount - 1, &rectMax))
{
sizeMax.cx = rectMax.right;
sizeMax.cy = rectMax.bottom;
}
This fix the real size of horizontal toolbar with chevron, but I cannot make it work with vertical tool bars! Does anybody tried that?
|
|
|
|
 |
|
 |
I am having 5 tool bars, when i launch my application only first toolbar is fully visible others are at extreme right end and only drop down arrow's are visible ,and big empty space in between first and other toolbar. How can show all tool bars one after another?
|
|
|
|
 |
|
 |
Hello!
I use 2 additional toolbars in my app. How to assign exactly location of additional toobars docking? By default it dock in a second row next to top of main tb. But I want to be placed it the next of main tb, in column. My code is here:
CToolBar m_wndSBar;
....
m_wndSBar.LoadToolBar (IDR_S_TB);
m_wndSBar.SetWindowText(_T("..."));
m_wndSBar.EnableDocking (CBRS_ALIGN_TOP );
DockControlBar(&m_wndSBar,AFX_IDW_DOCKBAR_TOP);
|
|
|
|
 |
|
 |
Hi,
Can a gripper be inserted into the toolbar to resize a toolbar item left side of the gripper like google toolbar gripper that resizes the search combobox. Please tell the solution if anyone know. Any programming language is welcomed and C# is great plus as required by me. Please make email the solution at rizwan_nuces@yahoo.com
Thanks
Rizwan
|
|
|
|
 |
|
 |
First, let me say this is a greate article and the code it's verry well written.
I've noticed that the IE chevron poped up menu it's not quite keyboard navigation friendly, it's not quite what you would expect from a regular menu which we all know it isn't.
For example if there's a sub menu you can't use left & right keys to go back and forwad.
There are limitations to this fake menu.
I've found that your idea of poping up a toolbar like ui insted of a menu like ui works much better because the user would not be confused.
|
|
|
|
 |
|
|
 |
|
 |
Anybody can help me with this?
thanks,
Marcelo Calado
Do you need develop a Professional Software with low cost? Contact me!
|
|
|
|
 |
|
 |
I set the USER-Key "ToolBandWidth" in "Software\\Microsoft\\Internet Explorer\\CommandBar" to avoid such problems.
Greetings from Germany
|
|
|
|
 |
|
 |
I am using VC 6.0.
When I am trying to compile, I got the following error. Is there any thing missing or to be included.
error C2065: 'NMREBARCHEVRON' : undeclared identifier
Thank you
|
|
|
|
 |
|
 |
Hi,
The code you have shared is awesome. I am having a slight problem. The Chevron button is parially displaying tsome buttons. But if we observe it in internet explorer then it does not display button partially when we resize the explorer. Either the buttons are displayed fully or not at all in the toolbar. So how can we acheive this kind of functionality.
Tushar
|
|
|
|
 |
|
 |
TBSTYLE_EX_HIDECLIPPEDBUTTONS : don't show partially obscured buttons
|
|
|
|
 |
|
 |
Hi...I have a problem with subclassing the internet explorer main window. I would like to do this in order to catch RBN_CHEVRONPUSHED message. I have made a class derived from CWindowImpl in which I put NOTIFY_CODE_HANDLER(RBN_CHEVRONPUSHED, OnChevronPushed). On the SetSite method:
HWND hWnd;
m_spWebBrowser->get_HWND((long*)&hWnd);
m_myWindow.SubclassWindow(hWnd);
It seems I never receive RBN_CHEVRONPUSHED. What I'm a doing wrong?
|
|
|
|
 |
|
 |
Hello again....I solved the problem....I was subclassing the wrong window...Actually it is not the main internet explorer window who receives RBN_CHEVRONPUSHED but the parent window of the CReBar control which is a worker window. So...first find the CReBar window and the subclass it's parent. Hope this will others in need .
|
|
|
|
 |
|
 |
Hi
can you give me some set of code for Toolbar Subclassing ?
Thanks,
dabara
|
|
|
|
 |
|
 |
Hi.
At first I would like to thank you for the good article, nice work.
I would like to know something about the OnNotify-function. How can I catch with the code, which one of the options ("Sample 1", "Sample 2",etc.) was pressed.
Thank You!
|
|
|
|
 |
|
 |
Dear Rajasekar,
Thanks for the nice code! Do you think its possible to add some nice pictures to the OnNotify function, so that there is not only a plain text like "Sample 1","Sample 2" etc. displayed?
Thanks.
-- modified at 21:37 Sunday 26th November, 2006
|
|
|
|
 |
|
 |
In IE or other APP, when the chevron was clicked twice consecutively without menu tracking, the popup menu/wnd should be closed. That is:
The first click activate the popup.
The second click deactivate the popup and all status come back to normal.
I try to do check in On..Pushed function but failed. How can it be solved.
|
|
|
|
 |
|
 |
it's very good code ,but i want the toolbar can "EnableDocking(CBRS_ALIGN_ANY);",what can i reslove it?? like office 2000 word.
hawhaw
-- modified at 3:32 Wednesday 17th May, 2006
|
|
|
|
 |
|
 |
Is there any way that I can access the Microsoft office Aommandbar chevron by using an addin?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
 |
|
 |
I can't used chevron in Outlook.
Can you help me?
When i click new mail. I have 5 buttons.
It have some events.
If 1 in 5 buttons to hide when i resize window again.
It put to chevron Office.
Then it lost events. I can't to draw chevron.
Can't you help me.
|
|
|
|
 |
|
 |
The buttons on my toolbars contain only text, so no imagelist.
Can someone give me information about how to change this solution without using the imagelist for this.
The problem with the current code resides in the MeasureItem and DrawItem. I tried to remove the imagelist related code, but got errors in other windows classes.
greets,
tim
|
|
|
|
 |
|
 |
Hello,
I have an IE toolband with iconic dropdown buttons. The problem is that icons are not visible in the chevron menu , although they appear on dropdown buttons. I have subclassed IE rebar, so I use standard chevron menu ( I don't display mine ). Can anyone tell me what must I do, to show icons on chevron menu?
|
|
|
|
 |
|
 |
subclassed IE rebar is wrong, because IE Windows process RBN_CHEVRONPUSHED message is not in IE rebar windows. The correct way is subclass IE rebar's parent windows (the IE Worker32W windows), at here, process WM_NOTIFY message and get RBN_CHEVRONPUSHED call, like this:
IEFrame -> Work32W -> ReBarWindows32 -> Your IE ToolBar
(You can use spy++ to inspect IE window)
I'm Guozi
|
|
|
|
 |
|
 |
I'm programming a toolbar for IE. I'm naturally using a toolbar control as a child window. My problem is simple, whatever I do, the chevron is NEVER shown. I've played with all possible combinations of values returned by GetBandInfo. Description of the CONDITION for the chevron to appear in MSDN is rather poor and uncertain (in my opinion). The only thing I've found there is that the containing rebar control must be created with a special flag, but I assume IE does it for me (other toolbars have chevrons). As far as I understand, from the toolbar perspective the only condition is that current size is smaller than the toolbar's ideal size ( ideal size is returned upon pdbi->dwMask & DBIM_ACTUAL ) Please correct me if I'm wrong. Maybe there are some non-trivial conditions which must be fulfilled. Any Ideas? Please, help...
|
|
|
|
 |