IE bar

new topic     » topic index » view thread      » older message » newer message

Hi All,

Today, i was coding an IE explorer bar. and tried to do something the 
hard-way
and found out their was a much easier/dirty way to do it. so i'm 
confused on which
to use or which is more reliable.

Here goes, have you noticed when using IE you have an option of having 
Text Labels
on the toolbar buttons ie when you toggle on text labels, the Toolbar 
resizes and
adds text to all buttons and when you "untoggle" the Toolbar text the 
Toolbar
shrinks and so do the buttons?

Adding Text to an already - made Toolbar buttons without text is not a 
problem. I do this by looping through a sequence containing my button 
identifiers. While filling
a TBBUTTONINFO structure specifying pszText member as the pointer to the 
text. Then 
pass on the Structure pointer to the lParam of the TB_SETBUTTONINFO 
message
Doing this automatically resizes the toolbar & its buttons since the 
sizes depend on
button text.

The hard part is removing the button text. I can manage removing the 
button text
by filling the TBBUTTONINFO 
cbSize,dwMask(TBIF_TEXT) and specifying the text member as -1 the only 
problem is that the buttons
do not shrink.

Anyway, i later found out i would call TB_SETBUTTONSIZE to resize the 
buttons but Doing
this doesn't resize the toolbar.

As you can see, what i have told you does the job, but it is not elegant 
at all,
could some one give me a better technique.

jordah 
aka Sir LoJiK

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu