Add support for TB_GETMETRICS and TB_SETMETRICS messages

Dmitry Timoshkov dmitry at baikal.ru
Sun Mar 7 07:11:24 CST 2004


"Robert Shearman" <R.J.Shearman at warwick.ac.uk> wrote:

> > +    if (lpMetrics->dwMask & TBMF_BUTTONSPACING)
> > +    {
> > + lpMetrics->cxButtonSpacing = infoPtr->szPadding.cx;
> > + lpMetrics->cyButtonSpacing = infoPtr->szPadding.cy;
> 
> I don't think this is quite right. MSDN says that cxButtonSpacing is "Width
> of the space between toolbar buttons", where as padding is "used to create a
> blank area between the edge of the button and the button's image and/or
> text". If experimentation proves that they are the same then a nice comment
> saying MSDN is wrong would be appropriate.

My implementation was based only on MSDN docs. I just compared a raw message list
between latest MSDN and Wine implementation and found that two. So I decided to
add support for them.

A comment for szPadding in Wine says: /* padding values around button */.

Looks like toolbar.c has plenty of similar (and possibly redundant) things:

INT      nHeight;        /* height of the toolbar */
INT      nWidth;         /* width of the toolbar */
RECT     client_rect;
RECT     rcBound;        /* bounding rectangle */

What another field should be used for c[x|y]ButtonSpacing instead?

-- 
Dmitry.




More information about the wine-devel mailing list