How do I Hide Toolbar Separators ?
"yarp" <lac-3QW3q7+2X3hWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
Hi, I would like to Hide/Show some Toolbar Separators in a modal Dialog Toolbar.
I have tried this solution:
void HideSeparator(int nIndex, BOOL bHide)
{
TBBUTTONINFO tbi = {0};
tbi.cbSize = sizeof(TBBUTTONINFO);
tbi.dwMask = TBIF_STATE | TBIF_BYINDEX;
tb.GetButtonInfo(nIndex, &tbi);
tbi.dwMask = TBIF_STATE | TBIF_BYINDEX;
if (bHide)
tbi.fsState |= TBSTATE_HIDDEN;
else
tbi.fsState &= ~TBSTATE_HIDDEN;
tb.SetButtonInfo(nIndex, &tbi);
}
And It works, I mean the Separators do Show/Hide along with other buttons.
But unfortunately the Toolbar is resizing itself afterwards (I have some buttons with Text) like if all buttons had text. When I don't Hide/Show the separators the Toolbar size is ok.
How could I tell the Toolbar to resize itself properly (AutoSize changed nothing) ?
Or is there a better way to Hide/Show separators ?
Thanks,
Yarp
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wtl/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/wtl/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/