comctl32[2/2]: toolbar: fix the layout of TBUTTON_INFO on Win64

Alexandre Julliard julliard at winehq.org
Sun Jan 25 09:39:23 CST 2009


Mikołaj Zalewski <mikolaj at zalewski.pl> writes:

> Dmitry Timoshkov wrote:
>
>> "Mikołaj Zalewski" <mikolaj at zalewski.pl> wrote:
>>>  The bHot and bDropDownPressed would then be called bReserved[0] and 
>>> bReserved[1] so this could make more harm than good.
>>
>> You can make a union for that case, with an appropriate comment.
>>
>  TBBUTTON is an official Windows API structure. Adding a union inside 
> and doing it just because of some internals of our toolbar 
> implementation is IMHO not the best idea.

If there is evidence that Windows really uses the reserved fields to
store bHot and bDropDownPressed then the code should be using
bReserved[0] and bReserved[1], wrapped with appropriate accessor
functions if necessary. Otherwise they should be moved somewhere else
and the bReserved fields left alone. Either way, if we need the correct
TBBUTTON layout we should be using a TBBUTTON structure.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list