comctl32/tests: toolbar button text length and validity
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 22 Apr 2009 20:21:24 +0000 (22:21 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 7 May 2009 08:54:07 +0000 (10:54 +0200)
commit431325b04c5df7b1a748233af80f49df19d25307
tree8c3104f33cab35687b4064e87c015a955c228925
parentf6f2f9346eb2dc1b5ce076572664f008559e31a8
comctl32/tests: toolbar button text length and validity

Windows API documentation suggests sending the TB_GETBUTTONTEXT message
with a NULL destination pointer to get the button text length. This is
currently not implemented properly in Wine.

Additionally, Windows ignores the iString field for separators, so even
if programs forget to initialize it and its bit pattern is an invalid
pointer, no crashes or failures can be seen. An uninitialized iString
field resembling an invalid pointer currently crashes Wine.

Older Windows versions (up to Windows 2003 inclusive) will not complain
if a non-separator button with an invalid pointer iString pointer is
added to a toolbar, although subsequently trying to access the button
text might cause a crash. In some versions of Vista the SendMessage will
fail but the program will not crash. In other versions of Vista, and in
Windows 2008, the program will crash on insertion.
dlls/comctl32/tests/toolbar.c