Hello... I originally posted this in the Visual C++ forum by mistake, so I'm reposting here in a more appropriate forum. I apologize if you have read this before but I hope I get to the right people this time.
I have recently added a new toolbar to my app -- a list/flat/transparent toolbar control. It is working fine in general, but I have encountered a problem when disabling a button that has longish text to the right of the icon.
It seems that even though the toolbar is accurately remembering the width of my button, it is clipping the text when disabled *only*. Attached is a screenshot that demonstrates the problem.
Though in the screenshot it seems that it gets cut off per letter, my original toolbar had letters cut off halfway.
I have tried setting the draw text flag DT_CLIP and DT_CALCRECT, both seperately and together, but neither have resolved my issue.
Has anybody experienced this before? Does anybody know a solution without customdrawing the toolbar?
Never seen that before but are you allowing the toolbar to size the buttons itself (TB_AUTOSIZE, I think)? If so, what happens if you manually specify the width of the button?
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Manually specifying the width of the button isn't something that would be easily done in my code right now, but I will give it a shot tomorrow. Today's getting late and I have some errands to run.
Thanks again, I'll be back with what happened.
- Richard
I tried setting my first button's size with TB_SETBUTTONINFO, with LPIF_SIZE as dwMask, setting cx to 200. While it does make my button much larger, the disabled text is still clipped at the same position it was before.
I'm really thinking this is a problem with the Windows toolbar...
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.