*
*/
-#include <stdarg.h>
-#include <string.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winreg.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <wine/unicode.h>
-#include <winnls.h>
-#include <commctrl.h>
#include "comctl32.h"
-#include <uxtheme.h>
-#include <vssym32.h>
-#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(toolbar);
/* Used to find undocumented extended styles */
#define TBSTYLE_EX_ALL (TBSTYLE_EX_DRAWDDARROWS | \
- TBSTYLE_EX_UNDOC1 | \
+ TBSTYLE_EX_VERTICAL | \
TBSTYLE_EX_MIXEDBUTTONS | \
TBSTYLE_EX_DOUBLEBUFFER | \
TBSTYLE_EX_HIDECLIPPEDBUTTONS)
tbcd.clrHighlightHotTrack = 0;
tbcd.nStringBkMode = TRANSPARENT;
tbcd.nHLStringBkMode = OPAQUE;
- /* MSDN says that this is the text rectangle.
- * But (why always a but) tracing of v5.7 of native shows
- * that this is really a *relative* rectangle based on the
- * the nmcd.rc. Also the left and top are always 0 ignoring
- * any bitmap that might be present. */
tbcd.rcText.left = 0;
tbcd.rcText.top = 0;
tbcd.rcText.right = rcText.right - rc.left;
* the toolbar wrapping on its own, it can use the TBSTYLE_WRAPABLE
* flag, and set the TBSTATE_WRAP flags manually on the appropriate items.
*
-* Note: TBSTYLE_WRAPABLE or TBSTYLE_EX_UNDOC1 can be used also to allow
+* Note: TBSTYLE_WRAPABLE or TBSTYLE_EX_VERTICAL can be used also to allow
* vertical toolbar lists.
*/
/* no layout is necessary. Applications may use this style */
/* to perform their own layout on the toolbar. */
if( !(infoPtr->dwStyle & TBSTYLE_WRAPABLE) &&
- !(infoPtr->dwExStyle & TBSTYLE_EX_UNDOC1) ) return;
+ !(infoPtr->dwExStyle & TBSTYLE_EX_VERTICAL) ) return;
btnPtr = infoPtr->buttons;
x = infoPtr->nIndent;
cy = TOP_BORDER + infoPtr->nRows * infoPtr->nButtonHeight + BOTTOM_BORDER;
cx = parent_rect.right - parent_rect.left;
- if ((infoPtr->dwStyle & TBSTYLE_WRAPABLE) || (infoPtr->dwExStyle & TBSTYLE_EX_UNDOC1))
+ if ((infoPtr->dwStyle & TBSTYLE_WRAPABLE) || (infoPtr->dwExStyle & TBSTYLE_EX_VERTICAL))
{
TOOLBAR_LayoutToolbar(infoPtr);
InvalidateRect( infoPtr->hwndSelf, NULL, TRUE );
if (lpTbInfo == NULL)
return -1;
- /* MSDN documents a iImageLabel field added in Vista but it is not present in
+ /* MSDN documents an iImageLabel field added in Vista but it is not present in
* the headers and tests shows that even with comctl 6 Vista accepts only the
* original TBBUTTONINFO size
*/
{
/* separator */
nmtbr.tbButton.fsStyle = TBSTYLE_SEP;
- /* when inserting separators, iBitmap controls it's size.
+ /* when inserting separators, iBitmap controls its size.
0 sets default size (width) */
nmtbr.tbButton.iBitmap = 0;
}
switch(wParam) {
case 0:
if (lpsize->cx == -1) {
- /* **** this is wrong, native measures each button and sets it */
lpsize->cx = infoPtr->rcBound.right - infoPtr->rcBound.left;
}
else if(HIWORD(lpsize->cx)) {
btnPtr->bDropDownPressed = FALSE;
InvalidateRect(infoPtr->hwndSelf, &btnPtr->rect, TRUE);
- /* find and set hot item
- * NOTE: native doesn't do this, but that is a bug */
+ /* find and set hot item */
GetCursorPos(&pt);
ScreenToClient(infoPtr->hwndSelf, &pt);
nHit = TOOLBAR_InternalHitTest(infoPtr, &pt, &button);
TOOLBAR_SendNotify (&hdr, infoPtr,
NM_RELEASEDCAPTURE);
- /* native issues TBN_ENDDRAG here, if _LBUTTONDOWN issued the
- * TBN_BEGINDRAG
- */
memset(&nmtb, 0, sizeof(nmtb));
nmtb.iItem = btnPtr->idCommand;
TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr,
SetWindowLongPtrW (hwnd, GWLP_HINSTANCE, (LONG_PTR)hInst);
}
- /* native control does:
- * Get a lot of colors and brushes
- * WM_NOTIFYFORMAT
- * SystemParametersInfoW(0x1f, 0x3c, adr1, 0)
- * CreateFontIndirectW(adr1)
- * CreateBitmap(0x27, 0x24, 1, 1, 0)
- * hdc = GetDC(toolbar)
- * GetSystemMetrics(0x48)
- * fnt2=CreateFontW(0xe, 0, 0, 0, 0x190, 0, 0, 0, 0, 2,
- * 0, 0, 0, 0, "MARLETT")
- * oldfnt = SelectObject(hdc, fnt2)
- * GetCharWidthW(hdc, 0x36, 0x36, adr2)
- * GetTextMetricsW(hdc, adr3)
- * SelectObject(hdc, oldfnt)
- * DeleteObject(fnt2)
- * ReleaseDC(hdc)
- * InvalidateRect(toolbar, 0, 1)
- * SetWindowLongW(toolbar, 0, addr)
- * SetWindowLongW(toolbar, -16, xxx) **sometimes**
- * WM_STYLECHANGING
- * CallWinEx old new
- * ie 1 0x56000a4c 0x46000a4c 0x56008a4d
- * ie 2 0x4600094c 0x4600094c 0x4600894d
- * ie 3 0x56000b4c 0x46000b4c 0x56008b4d
- * rebar 0x50008844 0x40008844 0x50008845
- * pager 0x50000844 0x40000844 0x50008845
- * IC35mgr 0x5400084e **nochange**
- * on entry to _NCCREATE 0x5400084e
- * rowlist 0x5400004e **nochange**
- * on entry to _NCCREATE 0x5400004e
- *
- */
-
/* I think the code below is a bug, but it is the way that the native
* controls seem to work. The effect is that if the user of TBSTYLE_FLAT
* forgets to specify TBSTYLE_TRANSPARENT but does specify either