Commit 89ef25e2 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Use the BTNS_* toolbar button style defines rather than the outdated

TBSTYLE_*.
parent 932a102d
...@@ -497,7 +497,7 @@ TOOLBAR_DrawFlatSeparator (LPRECT lpRect, HDC hdc, TOOLBAR_INFO *infoPtr) ...@@ -497,7 +497,7 @@ TOOLBAR_DrawFlatSeparator (LPRECT lpRect, HDC hdc, TOOLBAR_INFO *infoPtr)
/*********************************************************************** /***********************************************************************
* TOOLBAR_DrawDDFlatSeparator * TOOLBAR_DrawDDFlatSeparator
* *
* This function draws the separator that was flaged as TBSTYLE_DROPDOWN. * This function draws the separator that was flaged as BTNS_DROPDOWN.
* In this case, the separator is a pixel high line of COLOR_BTNSHADOW, * In this case, the separator is a pixel high line of COLOR_BTNSHADOW,
* followed by a pixel high line of COLOR_BTNHIGHLIGHT. These separators * followed by a pixel high line of COLOR_BTNHIGHLIGHT. These separators
* are horizontal as opposed to the vertical separators for not dropdown * are horizontal as opposed to the vertical separators for not dropdown
...@@ -685,7 +685,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc) ...@@ -685,7 +685,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
DWORD dwStyle = GetWindowLongA (hwnd, GWL_STYLE); DWORD dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
BOOL hasDropDownArrow = TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) && BOOL hasDropDownArrow = TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) &&
(btnPtr->fsStyle & TBSTYLE_DROPDOWN); (btnPtr->fsStyle & BTNS_DROPDOWN);
RECT rc, rcArrow, rcBitmap, rcText, rcFill; RECT rc, rcArrow, rcBitmap, rcText, rcFill;
LPWSTR lpText = NULL; LPWSTR lpText = NULL;
NMTBCUSTOMDRAW tbcd; NMTBCUSTOMDRAW tbcd;
...@@ -745,7 +745,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc) ...@@ -745,7 +745,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
* I changed it. IE4 "Links" toolbar would not * I changed it. IE4 "Links" toolbar would not
* draw correctly with the original code. - GA 8/01 * draw correctly with the original code. - GA 8/01
* ((dwStyle & TBSTYLE_LIST) && * ((dwStyle & TBSTYLE_LIST) &&
* ((btnPtr->fsStyle & TBSTYLE_AUTOSIZE) == 0) && * ((btnPtr->fsStyle & BTNS_AUTOSIZE) == 0) &&
* (btnPtr->iBitmap != I_IMAGENONE)) * (btnPtr->iBitmap != I_IMAGENONE))
*/ */
if (dwStyle & TBSTYLE_LIST) { if (dwStyle & TBSTYLE_LIST) {
...@@ -822,19 +822,19 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc) ...@@ -822,19 +822,19 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
FillRect( hdc, &rcFill, GetSysColorBrush(COLOR_BTNFACE)); FillRect( hdc, &rcFill, GetSysColorBrush(COLOR_BTNFACE));
/* separator */ /* separator */
if (btnPtr->fsStyle & TBSTYLE_SEP) { if (btnPtr->fsStyle & BTNS_SEP) {
/* with the FLAT style, iBitmap is the width and has already */ /* with the FLAT style, iBitmap is the width and has already */
/* been taken into consideration in calculating the width */ /* been taken into consideration in calculating the width */
/* so now we need to draw the vertical separator */ /* so now we need to draw the vertical separator */
/* empirical tests show that iBitmap can/will be non-zero */ /* empirical tests show that iBitmap can/will be non-zero */
/* when drawing the vertical bar... */ /* when drawing the vertical bar... */
if ((dwStyle & TBSTYLE_FLAT) /* && (btnPtr->iBitmap == 0) */) { if ((dwStyle & TBSTYLE_FLAT) /* && (btnPtr->iBitmap == 0) */) {
if (btnPtr->fsStyle & TBSTYLE_DROPDOWN) if (btnPtr->fsStyle & BTNS_DROPDOWN)
TOOLBAR_DrawDDFlatSeparator (&rc, hdc, btnPtr, infoPtr); TOOLBAR_DrawDDFlatSeparator (&rc, hdc, btnPtr, infoPtr);
else else
TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr); TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr);
} }
else if (btnPtr->fsStyle != TBSTYLE_SEP) { else if (btnPtr->fsStyle != BTNS_SEP) {
FIXME("Draw some kind of separator: fsStyle=%x\n", FIXME("Draw some kind of separator: fsStyle=%x\n",
btnPtr->fsStyle); btnPtr->fsStyle);
} }
...@@ -891,7 +891,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc) ...@@ -891,7 +891,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
goto FINALNOTIFY; goto FINALNOTIFY;
} }
/* pressed TBSTYLE_BUTTON */ /* pressed BTNS_BUTTON */
if (tbcd.nmcd.uItemState & CDIS_SELECTED) { if (tbcd.nmcd.uItemState & CDIS_SELECTED) {
offset = (infoPtr->dwItemCDFlag & TBCDRF_NOOFFSET) ? 0 : 1; offset = (infoPtr->dwItemCDFlag & TBCDRF_NOOFFSET) ? 0 : 1;
if (!(infoPtr->dwItemCDFlag & TBCDRF_NOEDGES)) if (!(infoPtr->dwItemCDFlag & TBCDRF_NOEDGES))
...@@ -922,9 +922,9 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc) ...@@ -922,9 +922,9 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
goto FINALNOTIFY; goto FINALNOTIFY;
} }
/* checked TBSTYLE_CHECK */ /* checked BTNS_CHECK */
if ((tbcd.nmcd.uItemState & CDIS_CHECKED) && if ((tbcd.nmcd.uItemState & CDIS_CHECKED) &&
(btnPtr->fsStyle & TBSTYLE_CHECK)) { (btnPtr->fsStyle & BTNS_CHECK)) {
if (!(infoPtr->dwItemCDFlag & TBCDRF_NOEDGES)) if (!(infoPtr->dwItemCDFlag & TBCDRF_NOEDGES))
{ {
if (dwStyle & TBSTYLE_FLAT) if (dwStyle & TBSTYLE_FLAT)
...@@ -1096,7 +1096,7 @@ TOOLBAR_Refresh (HWND hwnd, HDC hdc, PAINTSTRUCT* ps) ...@@ -1096,7 +1096,7 @@ TOOLBAR_Refresh (HWND hwnd, HDC hdc, PAINTSTRUCT* ps)
* prefix characters as M$ likes to call them). The prefix character * prefix characters as M$ likes to call them). The prefix character
* indicates where the underline goes, except for the string "&&" which * indicates where the underline goes, except for the string "&&" which
* is reduced to a single "&". GetTextExtentPoint does not process these * is reduced to a single "&". GetTextExtentPoint does not process these
* only DrawText does. Note that the TBSTYLE_NOPREFIX is handled here. * only DrawText does. Note that the BTNS_NOPREFIX is handled here.
*/ */
static void static void
TOOLBAR_MeasureString(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, TOOLBAR_MeasureString(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
...@@ -1124,7 +1124,7 @@ TOOLBAR_MeasureString(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, ...@@ -1124,7 +1124,7 @@ TOOLBAR_MeasureString(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
/* Use DrawText to get true size as drawn (less pesky "&") */ /* Use DrawText to get true size as drawn (less pesky "&") */
DrawTextW (hdc, lpText, -1, &myrect, DT_VCENTER | DT_SINGLELINE | DrawTextW (hdc, lpText, -1, &myrect, DT_VCENTER | DT_SINGLELINE |
DT_CALCRECT | ((btnPtr->fsStyle & TBSTYLE_NOPREFIX) ? DT_CALCRECT | ((btnPtr->fsStyle & BTNS_NOPREFIX) ?
DT_NOPREFIX : 0)); DT_NOPREFIX : 0));
/* feed back to caller */ /* feed back to caller */
...@@ -1233,10 +1233,10 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle ) ...@@ -1233,10 +1233,10 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
/* it is the actual width of the separator. This is used for */ /* it is the actual width of the separator. This is used for */
/* custom controls in toolbars. */ /* custom controls in toolbars. */
/* */ /* */
/* TBSTYLE_DROPDOWN separators are treated as buttons for */ /* BTNS_DROPDOWN separators are treated as buttons for */
/* width. - GA 8/01 */ /* width. - GA 8/01 */
if ((btnPtr[i].fsStyle & TBSTYLE_SEP) && if ((btnPtr[i].fsStyle & BTNS_SEP) &&
!(btnPtr[i].fsStyle & TBSTYLE_DROPDOWN)) !(btnPtr[i].fsStyle & BTNS_DROPDOWN))
cx = (btnPtr[i].iBitmap > 0) ? cx = (btnPtr[i].iBitmap > 0) ?
btnPtr[i].iBitmap : SEPARATOR_WIDTH; btnPtr[i].iBitmap : SEPARATOR_WIDTH;
else else
...@@ -1246,9 +1246,9 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle ) ...@@ -1246,9 +1246,9 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
/* The first separator in a group should be wrapped to the */ /* The first separator in a group should be wrapped to the */
/* next row if the previous wrapping is on a button. */ /* next row if the previous wrapping is on a button. */
if( bButtonWrap && if( bButtonWrap &&
(btnPtr[i].fsStyle & TBSTYLE_SEP) && (btnPtr[i].fsStyle & BTNS_SEP) &&
(i + 1 < infoPtr->nNumButtons ) && (i + 1 < infoPtr->nNumButtons ) &&
(btnPtr[i + 1].fsStyle & TBSTYLE_SEP) ) (btnPtr[i + 1].fsStyle & BTNS_SEP) )
{ {
TRACE("wrap point 1 btn %d style %02x\n", i, btnPtr[i].fsStyle); TRACE("wrap point 1 btn %d style %02x\n", i, btnPtr[i].fsStyle);
btnPtr[i].fsState |= TBSTATE_WRAP; btnPtr[i].fsState |= TBSTATE_WRAP;
...@@ -1270,8 +1270,8 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle ) ...@@ -1270,8 +1270,8 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
/* If the current button is a separator and not hidden, */ /* If the current button is a separator and not hidden, */
/* go to the next until it reaches a non separator. */ /* go to the next until it reaches a non separator. */
/* Wrap the last separator if it is before a button. */ /* Wrap the last separator if it is before a button. */
while( ( ((btnPtr[i].fsStyle & TBSTYLE_SEP) && while( ( ((btnPtr[i].fsStyle & BTNS_SEP) &&
!(btnPtr[i].fsStyle & TBSTYLE_DROPDOWN)) || !(btnPtr[i].fsStyle & BTNS_DROPDOWN)) ||
(btnPtr[i].fsState & TBSTATE_HIDDEN) ) && (btnPtr[i].fsState & TBSTATE_HIDDEN) ) &&
i < infoPtr->nNumButtons ) i < infoPtr->nNumButtons )
{ {
...@@ -1296,7 +1296,7 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle ) ...@@ -1296,7 +1296,7 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
/* separator and wrap it. */ /* separator and wrap it. */
for ( j = i - 1; j >= 0 && !(btnPtr[j].fsState & TBSTATE_WRAP); j--) for ( j = i - 1; j >= 0 && !(btnPtr[j].fsState & TBSTATE_WRAP); j--)
{ {
if ((btnPtr[j].fsStyle & TBSTYLE_SEP) && if ((btnPtr[j].fsStyle & BTNS_SEP) &&
!(btnPtr[j].fsState & TBSTATE_HIDDEN)) !(btnPtr[j].fsState & TBSTATE_HIDDEN))
{ {
bFound = TRUE; bFound = TRUE;
...@@ -1339,7 +1339,7 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle ) ...@@ -1339,7 +1339,7 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
btnPtr[i].fsState |= TBSTATE_WRAP; btnPtr[i].fsState |= TBSTATE_WRAP;
bFound = TRUE; bFound = TRUE;
x = infoPtr->nIndent; x = infoPtr->nIndent;
if (btnPtr[i].fsStyle & TBSTYLE_SEP ) if (btnPtr[i].fsStyle & BTNS_SEP )
bButtonWrap = FALSE; bButtonWrap = FALSE;
else else
bButtonWrap = TRUE; bButtonWrap = TRUE;
...@@ -1476,8 +1476,8 @@ TOOLBAR_CalcToolbar (HWND hwnd) ...@@ -1476,8 +1476,8 @@ TOOLBAR_CalcToolbar (HWND hwnd)
/* UNDOCUMENTED: If a separator has a non zero bitmap index, */ /* UNDOCUMENTED: If a separator has a non zero bitmap index, */
/* it is the actual width of the separator. This is used for */ /* it is the actual width of the separator. This is used for */
/* custom controls in toolbars. */ /* custom controls in toolbars. */
if (btnPtr->fsStyle & TBSTYLE_SEP) { if (btnPtr->fsStyle & BTNS_SEP) {
if (btnPtr->fsStyle & TBSTYLE_DROPDOWN) { if (btnPtr->fsStyle & BTNS_DROPDOWN) {
cy = (btnPtr->iBitmap > 0) ? cy = (btnPtr->iBitmap > 0) ?
btnPtr->iBitmap : SEPARATOR_WIDTH; btnPtr->iBitmap : SEPARATOR_WIDTH;
cx = infoPtr->nButtonWidth; cx = infoPtr->nButtonWidth;
...@@ -1489,7 +1489,7 @@ TOOLBAR_CalcToolbar (HWND hwnd) ...@@ -1489,7 +1489,7 @@ TOOLBAR_CalcToolbar (HWND hwnd)
else else
{ {
if ((infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) || if ((infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) ||
(btnPtr->fsStyle & TBSTYLE_AUTOSIZE)) (btnPtr->fsStyle & BTNS_AUTOSIZE))
{ {
SIZE sz; SIZE sz;
HDC hdc; HDC hdc;
...@@ -1519,7 +1519,7 @@ TOOLBAR_CalcToolbar (HWND hwnd) ...@@ -1519,7 +1519,7 @@ TOOLBAR_CalcToolbar (HWND hwnd)
else else
cx = infoPtr->nButtonWidth; cx = infoPtr->nButtonWidth;
if (hasDropDownArrows && (btnPtr->fsStyle & TBSTYLE_DROPDOWN)) if (hasDropDownArrows && (btnPtr->fsStyle & BTNS_DROPDOWN))
cx += DDARROW_WIDTH; cx += DDARROW_WIDTH;
} }
if (btnPtr->fsState & TBSTATE_WRAP ) if (btnPtr->fsState & TBSTATE_WRAP )
...@@ -1535,7 +1535,7 @@ TOOLBAR_CalcToolbar (HWND hwnd) ...@@ -1535,7 +1535,7 @@ TOOLBAR_CalcToolbar (HWND hwnd)
infoPtr->rcBound.bottom = y + cy; infoPtr->rcBound.bottom = y + cy;
/* Set the toolTip only for non-hidden, non-separator button */ /* Set the toolTip only for non-hidden, non-separator button */
if (infoPtr->hwndToolTip && !(btnPtr->fsStyle & TBSTYLE_SEP )) if (infoPtr->hwndToolTip && !(btnPtr->fsStyle & BTNS_SEP ))
{ {
TTTOOLINFOA ti; TTTOOLINFOA ti;
...@@ -1558,14 +1558,14 @@ TOOLBAR_CalcToolbar (HWND hwnd) ...@@ -1558,14 +1558,14 @@ TOOLBAR_CalcToolbar (HWND hwnd)
if( bWrap ) if( bWrap )
{ {
if ( !(btnPtr->fsStyle & TBSTYLE_SEP) ) if ( !(btnPtr->fsStyle & BTNS_SEP) )
y += cy; y += cy;
else else
{ {
/* UNDOCUMENTED: If a separator has a non zero bitmap index, */ /* UNDOCUMENTED: If a separator has a non zero bitmap index, */
/* it is the actual width of the separator. This is used for */ /* it is the actual width of the separator. This is used for */
/* custom controls in toolbars. */ /* custom controls in toolbars. */
if ( !(btnPtr->fsStyle & TBSTYLE_DROPDOWN)) if ( !(btnPtr->fsStyle & BTNS_DROPDOWN))
y += cy + ( (btnPtr->iBitmap > 0 ) ? y += cy + ( (btnPtr->iBitmap > 0 ) ?
btnPtr->iBitmap : SEPARATOR_WIDTH) * 2 /3; btnPtr->iBitmap : SEPARATOR_WIDTH) * 2 /3;
else else
...@@ -1625,7 +1625,7 @@ TOOLBAR_InternalHitTest (HWND hwnd, LPPOINT lpPt) ...@@ -1625,7 +1625,7 @@ TOOLBAR_InternalHitTest (HWND hwnd, LPPOINT lpPt)
if (btnPtr->fsState & TBSTATE_HIDDEN) if (btnPtr->fsState & TBSTATE_HIDDEN)
continue; continue;
if (btnPtr->fsStyle & TBSTYLE_SEP) { if (btnPtr->fsStyle & BTNS_SEP) {
if (PtInRect (&btnPtr->rect, *lpPt)) { if (PtInRect (&btnPtr->rect, *lpPt)) {
TRACE(" ON SEPARATOR %d!\n", i); TRACE(" ON SEPARATOR %d!\n", i);
return -i; return -i;
...@@ -1678,7 +1678,7 @@ TOOLBAR_GetCheckedGroupButtonIndex (TOOLBAR_INFO *infoPtr, INT nIndex) ...@@ -1678,7 +1678,7 @@ TOOLBAR_GetCheckedGroupButtonIndex (TOOLBAR_INFO *infoPtr, INT nIndex)
/* check index button */ /* check index button */
btnPtr = &infoPtr->buttons[nIndex]; btnPtr = &infoPtr->buttons[nIndex];
if ((btnPtr->fsStyle & TBSTYLE_CHECKGROUP) == TBSTYLE_CHECKGROUP) { if ((btnPtr->fsStyle & BTNS_CHECKGROUP) == BTNS_CHECKGROUP) {
if (btnPtr->fsState & TBSTATE_CHECKED) if (btnPtr->fsState & TBSTATE_CHECKED)
return nIndex; return nIndex;
} }
...@@ -1687,7 +1687,7 @@ TOOLBAR_GetCheckedGroupButtonIndex (TOOLBAR_INFO *infoPtr, INT nIndex) ...@@ -1687,7 +1687,7 @@ TOOLBAR_GetCheckedGroupButtonIndex (TOOLBAR_INFO *infoPtr, INT nIndex)
nRunIndex = nIndex - 1; nRunIndex = nIndex - 1;
while (nRunIndex >= 0) { while (nRunIndex >= 0) {
btnPtr = &infoPtr->buttons[nRunIndex]; btnPtr = &infoPtr->buttons[nRunIndex];
if ((btnPtr->fsStyle & TBSTYLE_CHECKGROUP) == TBSTYLE_CHECKGROUP) { if ((btnPtr->fsStyle & BTNS_CHECKGROUP) == BTNS_CHECKGROUP) {
if (btnPtr->fsState & TBSTATE_CHECKED) if (btnPtr->fsState & TBSTATE_CHECKED)
return nRunIndex; return nRunIndex;
} }
...@@ -1700,7 +1700,7 @@ TOOLBAR_GetCheckedGroupButtonIndex (TOOLBAR_INFO *infoPtr, INT nIndex) ...@@ -1700,7 +1700,7 @@ TOOLBAR_GetCheckedGroupButtonIndex (TOOLBAR_INFO *infoPtr, INT nIndex)
nRunIndex = nIndex + 1; nRunIndex = nIndex + 1;
while (nRunIndex < infoPtr->nNumButtons) { while (nRunIndex < infoPtr->nNumButtons) {
btnPtr = &infoPtr->buttons[nRunIndex]; btnPtr = &infoPtr->buttons[nRunIndex];
if ((btnPtr->fsStyle & TBSTYLE_CHECKGROUP) == TBSTYLE_CHECKGROUP) { if ((btnPtr->fsStyle & BTNS_CHECKGROUP) == BTNS_CHECKGROUP) {
if (btnPtr->fsState & TBSTATE_CHECKED) if (btnPtr->fsState & TBSTATE_CHECKED)
return nRunIndex; return nRunIndex;
} }
...@@ -1778,7 +1778,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -1778,7 +1778,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
btnInfo = (PCUSTOMBUTTON)Alloc(sizeof(CUSTOMBUTTON)); btnInfo = (PCUSTOMBUTTON)Alloc(sizeof(CUSTOMBUTTON));
memset (&btnInfo->btn, 0, sizeof(TBBUTTON)); memset (&btnInfo->btn, 0, sizeof(TBBUTTON));
btnInfo->btn.fsStyle = TBSTYLE_SEP; btnInfo->btn.fsStyle = BTNS_SEP;
btnInfo->bVirtual = FALSE; btnInfo->bVirtual = FALSE;
LoadStringW (COMCTL32_hModule, IDS_SEPARATOR, btnInfo->text, 64); LoadStringW (COMCTL32_hModule, IDS_SEPARATOR, btnInfo->text, 64);
...@@ -1792,7 +1792,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -1792,7 +1792,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* insert separator button into 'available buttons' list */ /* insert separator button into 'available buttons' list */
btnInfo = (PCUSTOMBUTTON)Alloc(sizeof(CUSTOMBUTTON)); btnInfo = (PCUSTOMBUTTON)Alloc(sizeof(CUSTOMBUTTON));
memset (&btnInfo->btn, 0, sizeof(TBBUTTON)); memset (&btnInfo->btn, 0, sizeof(TBBUTTON));
btnInfo->btn.fsStyle = TBSTYLE_SEP; btnInfo->btn.fsStyle = BTNS_SEP;
btnInfo->bVirtual = FALSE; btnInfo->bVirtual = FALSE;
btnInfo->bRemovable = TRUE; btnInfo->bRemovable = TRUE;
LoadStringW (COMCTL32_hModule, IDS_SEPARATOR, btnInfo->text, 64); LoadStringW (COMCTL32_hModule, IDS_SEPARATOR, btnInfo->text, 64);
...@@ -1840,7 +1840,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -1840,7 +1840,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
memcpy (&btnInfo->btn, &nmtb.tbButton, sizeof(TBBUTTON)); memcpy (&btnInfo->btn, &nmtb.tbButton, sizeof(TBBUTTON));
if (!(nmtb.tbButton.fsStyle & TBSTYLE_SEP)) if (!(nmtb.tbButton.fsStyle & BTNS_SEP))
{ {
if (lstrlenW(nmtb.pszText)) if (lstrlenW(nmtb.pszText))
lstrcpyW(btnInfo->text, nmtb.pszText); lstrcpyW(btnInfo->text, nmtb.pszText);
...@@ -1859,7 +1859,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -1859,7 +1859,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* append 'virtual' separator button to the 'toolbar buttons' list */ /* append 'virtual' separator button to the 'toolbar buttons' list */
btnInfo = (PCUSTOMBUTTON)Alloc(sizeof(CUSTOMBUTTON)); btnInfo = (PCUSTOMBUTTON)Alloc(sizeof(CUSTOMBUTTON));
memset (&btnInfo->btn, 0, sizeof(TBBUTTON)); memset (&btnInfo->btn, 0, sizeof(TBBUTTON));
btnInfo->btn.fsStyle = TBSTYLE_SEP; btnInfo->btn.fsStyle = BTNS_SEP;
btnInfo->bVirtual = TRUE; btnInfo->bVirtual = TRUE;
btnInfo->bRemovable = FALSE; btnInfo->bRemovable = FALSE;
LoadStringW (COMCTL32_hModule, IDS_SEPARATOR, btnInfo->text, 64); LoadStringW (COMCTL32_hModule, IDS_SEPARATOR, btnInfo->text, 64);
...@@ -2029,7 +2029,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -2029,7 +2029,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessageA (custInfo->tbHwnd, TB_DELETEBUTTON, index, 0); SendMessageA (custInfo->tbHwnd, TB_DELETEBUTTON, index, 0);
/* insert into 'available button' list */ /* insert into 'available button' list */
if (!(btnInfo->btn.fsStyle & TBSTYLE_SEP)) if (!(btnInfo->btn.fsStyle & BTNS_SEP))
{ {
index = (int)SendDlgItemMessageA (hwnd, IDC_AVAILBTN_LBOX, LB_ADDSTRING, 0, 0); index = (int)SendDlgItemMessageA (hwnd, IDC_AVAILBTN_LBOX, LB_ADDSTRING, 0, 0);
SendDlgItemMessageA (hwnd, IDC_AVAILBTN_LBOX, LB_SETITEMDATA, index, (LPARAM)btnInfo); SendDlgItemMessageA (hwnd, IDC_AVAILBTN_LBOX, LB_SETITEMDATA, index, (LPARAM)btnInfo);
...@@ -2176,7 +2176,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -2176,7 +2176,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
DrawEdge (lpdis->hDC, &rcButton, EDGE_RAISED, BF_RECT|BF_MIDDLE|BF_SOFT); DrawEdge (lpdis->hDC, &rcButton, EDGE_RAISED, BF_RECT|BF_MIDDLE|BF_SOFT);
/* draw image and text */ /* draw image and text */
if ((btnInfo->btn.fsStyle & TBSTYLE_SEP) == 0) { if ((btnInfo->btn.fsStyle & BTNS_SEP) == 0) {
HIMAGELIST himl = GETDEFIMAGELIST(infoPtr, GETHIMLID(infoPtr, HIMAGELIST himl = GETDEFIMAGELIST(infoPtr, GETHIMLID(infoPtr,
btnInfo->btn.iBitmap)); btnInfo->btn.iBitmap));
ImageList_Draw (himl, GETIBITMAP(infoPtr, btnInfo->btn.iBitmap), ImageList_Draw (himl, GETIBITMAP(infoPtr, btnInfo->btn.iBitmap),
...@@ -2476,7 +2476,7 @@ TOOLBAR_AddButtonsA (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2476,7 +2476,7 @@ TOOLBAR_AddButtonsA (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr->iString = lpTbb[nCount].iString; btnPtr->iString = lpTbb[nCount].iString;
btnPtr->bHot = FALSE; btnPtr->bHot = FALSE;
if ((infoPtr->hwndToolTip) && !(btnPtr->fsStyle & TBSTYLE_SEP)) { if ((infoPtr->hwndToolTip) && !(btnPtr->fsStyle & BTNS_SEP)) {
TTTOOLINFOA ti; TTTOOLINFOA ti;
ZeroMemory (&ti, sizeof(TTTOOLINFOA)); ZeroMemory (&ti, sizeof(TTTOOLINFOA));
...@@ -2540,7 +2540,7 @@ TOOLBAR_AddButtonsW (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2540,7 +2540,7 @@ TOOLBAR_AddButtonsW (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr->iString = lpTbb[nCount].iString; btnPtr->iString = lpTbb[nCount].iString;
btnPtr->bHot = FALSE; btnPtr->bHot = FALSE;
if ((infoPtr->hwndToolTip) && !(btnPtr->fsStyle & TBSTYLE_SEP)) { if ((infoPtr->hwndToolTip) && !(btnPtr->fsStyle & BTNS_SEP)) {
TTTOOLINFOW ti; TTTOOLINFOW ti;
ZeroMemory (&ti, sizeof(TTTOOLINFOW)); ZeroMemory (&ti, sizeof(TTTOOLINFOW));
...@@ -2881,7 +2881,7 @@ TOOLBAR_CheckButton (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2881,7 +2881,7 @@ TOOLBAR_CheckButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr = &infoPtr->buttons[nIndex]; btnPtr = &infoPtr->buttons[nIndex];
if (!(btnPtr->fsStyle & TBSTYLE_CHECK)) if (!(btnPtr->fsStyle & BTNS_CHECK))
return FALSE; return FALSE;
bChecked = (btnPtr->fsState & TBSTATE_CHECKED) ? TRUE : FALSE; bChecked = (btnPtr->fsState & TBSTATE_CHECKED) ? TRUE : FALSE;
...@@ -2889,7 +2889,7 @@ TOOLBAR_CheckButton (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2889,7 +2889,7 @@ TOOLBAR_CheckButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
if (LOWORD(lParam) == FALSE) if (LOWORD(lParam) == FALSE)
btnPtr->fsState &= ~TBSTATE_CHECKED; btnPtr->fsState &= ~TBSTATE_CHECKED;
else { else {
if (btnPtr->fsStyle & TBSTYLE_GROUP) { if (btnPtr->fsStyle & BTNS_GROUP) {
nOldIndex = nOldIndex =
TOOLBAR_GetCheckedGroupButtonIndex (infoPtr, nIndex); TOOLBAR_GetCheckedGroupButtonIndex (infoPtr, nIndex);
if (nOldIndex == nIndex) if (nOldIndex == nIndex)
...@@ -2974,7 +2974,7 @@ TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2974,7 +2974,7 @@ TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
return FALSE; return FALSE;
if ((infoPtr->hwndToolTip) && if ((infoPtr->hwndToolTip) &&
!(infoPtr->buttons[nIndex].fsStyle & TBSTYLE_SEP)) { !(infoPtr->buttons[nIndex].fsStyle & BTNS_SEP)) {
TTTOOLINFOA ti; TTTOOLINFOA ti;
ZeroMemory (&ti, sizeof(TTTOOLINFOA)); ZeroMemory (&ti, sizeof(TTTOOLINFOA));
...@@ -3608,7 +3608,7 @@ TOOLBAR_InsertButtonA (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -3608,7 +3608,7 @@ TOOLBAR_InsertButtonA (HWND hwnd, WPARAM wParam, LPARAM lParam)
else else
infoPtr->buttons[nIndex].iString = lpTbb->iString; infoPtr->buttons[nIndex].iString = lpTbb->iString;
if ((infoPtr->hwndToolTip) && !(lpTbb->fsStyle & TBSTYLE_SEP)) { if ((infoPtr->hwndToolTip) && !(lpTbb->fsStyle & BTNS_SEP)) {
TTTOOLINFOA ti; TTTOOLINFOA ti;
ZeroMemory (&ti, sizeof(TTTOOLINFOA)); ZeroMemory (&ti, sizeof(TTTOOLINFOA));
...@@ -3708,7 +3708,7 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -3708,7 +3708,7 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam)
else else
infoPtr->buttons[nIndex].iString = lpTbb->iString; infoPtr->buttons[nIndex].iString = lpTbb->iString;
if ((infoPtr->hwndToolTip) && !(lpTbb->fsStyle & TBSTYLE_SEP)) { if ((infoPtr->hwndToolTip) && !(lpTbb->fsStyle & BTNS_SEP)) {
TTTOOLINFOW ti; TTTOOLINFOW ti;
ZeroMemory (&ti, sizeof(TTTOOLINFOW)); ZeroMemory (&ti, sizeof(TTTOOLINFOW));
...@@ -4975,7 +4975,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -4975,7 +4975,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
arrowRect.left = max(btnPtr->rect.left, btnPtr->rect.right - DDARROW_WIDTH); arrowRect.left = max(btnPtr->rect.left, btnPtr->rect.right - DDARROW_WIDTH);
/* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */ /* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */
if ((btnPtr->fsState & TBSTATE_ENABLED) && (btnPtr->fsStyle & TBSTYLE_DROPDOWN) && if ((btnPtr->fsState & TBSTATE_ENABLED) && (btnPtr->fsStyle & BTNS_DROPDOWN) &&
((TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) && PtInRect(&arrowRect, pt)) || ((TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) && PtInRect(&arrowRect, pt)) ||
(!TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle)))) (!TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle))))
{ {
...@@ -5058,8 +5058,8 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -5058,8 +5058,8 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr = &infoPtr->buttons[infoPtr->nButtonDown]; btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
btnPtr->fsState &= ~TBSTATE_PRESSED; btnPtr->fsState &= ~TBSTATE_PRESSED;
if (btnPtr->fsStyle & TBSTYLE_CHECK) { if (btnPtr->fsStyle & BTNS_CHECK) {
if (btnPtr->fsStyle & TBSTYLE_GROUP) { if (btnPtr->fsStyle & BTNS_GROUP) {
nOldIndex = TOOLBAR_GetCheckedGroupButtonIndex (infoPtr, nOldIndex = TOOLBAR_GetCheckedGroupButtonIndex (infoPtr,
nHit); nHit);
if (nOldIndex == nHit) if (nOldIndex == nHit)
......
...@@ -1017,15 +1017,15 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd) ...@@ -1017,15 +1017,15 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
TBBUTTON tbb[] = TBBUTTON tbb[] =
{ {
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0, 0}, 0, 0 }, {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0 },
{VIEW_PARENTFOLDER, FCIDM_TB_UPFOLDER, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, {VIEW_PARENTFOLDER, FCIDM_TB_UPFOLDER, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0, 0}, 0, 0 }, {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0 },
{VIEW_NEWFOLDER+1, FCIDM_TB_DESKTOP, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, {VIEW_NEWFOLDER+1, FCIDM_TB_DESKTOP, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0, 0}, 0, 0 }, {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0 },
{VIEW_NEWFOLDER, FCIDM_TB_NEWFOLDER, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, {VIEW_NEWFOLDER, FCIDM_TB_NEWFOLDER, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0, 0}, 0, 0 }, {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0 },
{VIEW_LIST, FCIDM_TB_SMALLICON, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, {VIEW_LIST, FCIDM_TB_SMALLICON, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
{VIEW_DETAILS, FCIDM_TB_REPORTVIEW, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, {VIEW_DETAILS, FCIDM_TB_REPORTVIEW, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
}; };
TBADDBITMAP tba[2]; TBADDBITMAP tba[2];
RECT rectTB; RECT rectTB;
......
...@@ -149,10 +149,10 @@ typedef struct ...@@ -149,10 +149,10 @@ typedef struct
MYTOOLINFO Tools[] = MYTOOLINFO Tools[] =
{ {
{ FCIDM_SHVIEW_BIGICON, 0, 0, IDS_VIEW_LARGE, TBSTATE_ENABLED, TBSTYLE_BUTTON }, { FCIDM_SHVIEW_BIGICON, 0, 0, IDS_VIEW_LARGE, TBSTATE_ENABLED, BTNS_BUTTON },
{ FCIDM_SHVIEW_SMALLICON, 0, 0, IDS_VIEW_SMALL, TBSTATE_ENABLED, TBSTYLE_BUTTON }, { FCIDM_SHVIEW_SMALLICON, 0, 0, IDS_VIEW_SMALL, TBSTATE_ENABLED, BTNS_BUTTON },
{ FCIDM_SHVIEW_LISTVIEW, 0, 0, IDS_VIEW_LIST, TBSTATE_ENABLED, TBSTYLE_BUTTON }, { FCIDM_SHVIEW_LISTVIEW, 0, 0, IDS_VIEW_LIST, TBSTATE_ENABLED, BTNS_BUTTON },
{ FCIDM_SHVIEW_REPORTVIEW, 0, 0, IDS_VIEW_DETAILS, TBSTATE_ENABLED, TBSTYLE_BUTTON }, { FCIDM_SHVIEW_REPORTVIEW, 0, 0, IDS_VIEW_DETAILS, TBSTATE_ENABLED, BTNS_BUTTON },
{ -1, 0, 0, 0, 0, 0} { -1, 0, 0, 0, 0, 0}
}; };
...@@ -710,7 +710,7 @@ static HMENU ShellView_BuildFileMenu(IShellViewImpl * This) ...@@ -710,7 +710,7 @@ static HMENU ShellView_BuildFileMenu(IShellViewImpl * This)
mii.cbSize = sizeof(mii); mii.cbSize = sizeof(mii);
mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE;
if(TBSTYLE_SEP != Tools[i].bStyle) /* no separator*/ if(BTNS_SEP != Tools[i].bStyle) /* no separator*/
{ {
mii.fType = MFT_STRING; mii.fType = MFT_STRING;
mii.fState = MFS_ENABLED; mii.fState = MFS_ENABLED;
......
...@@ -3560,7 +3560,7 @@ void show_frame(HWND hwndParent, int cmdshow) ...@@ -3560,7 +3560,7 @@ void show_frame(HWND hwndParent, int cmdshow)
{ {
TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0, 0}, 0, 0}; TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0};
int btn = 1; int btn = 1;
PTSTR p; PTSTR p;
...@@ -3571,7 +3571,7 @@ void show_frame(HWND hwndParent, int cmdshow) ...@@ -3571,7 +3571,7 @@ void show_frame(HWND hwndParent, int cmdshow)
GetLogicalDriveStrings(BUFFER_LEN, Globals.drives); GetLogicalDriveStrings(BUFFER_LEN, Globals.drives);
drivebarBtn.fsStyle = TBSTYLE_BUTTON; drivebarBtn.fsStyle = BTNS_BUTTON;
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
#ifdef __WINE__ #ifdef __WINE__
...@@ -3621,14 +3621,14 @@ void show_frame(HWND hwndParent, int cmdshow) ...@@ -3621,14 +3621,14 @@ void show_frame(HWND hwndParent, int cmdshow)
{ {
TBBUTTON toolbarBtns[] = { TBBUTTON toolbarBtns[] = {
{0, 0, 0, TBSTYLE_SEP, {0, 0}, 0, 0}, {0, 0, 0, BTNS_SEP, {0, 0}, 0, 0},
{0, ID_WINDOW_NEW, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0}, {0, ID_WINDOW_NEW, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
{1, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0}, {1, ID_WINDOW_CASCADE, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
{2, ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0}, {2, ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
{3, ID_WINDOW_TILE_VERT, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0}, {3, ID_WINDOW_TILE_VERT, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
/*TODO /*TODO
{4, ID_... , TBSTATE_ENABLED, TBSTYLE_BUTTON}, {4, ID_... , TBSTATE_ENABLED, BTNS_BUTTON},
{5, ID_... , TBSTATE_ENABLED, TBSTYLE_BUTTON}, {5, ID_... , TBSTATE_ENABLED, BTNS_BUTTON},
*/ }; */ };
Globals.htoolbar = CreateToolbarEx(Globals.hMainWnd, WS_CHILD|WS_VISIBLE, Globals.htoolbar = CreateToolbarEx(Globals.hMainWnd, WS_CHILD|WS_VISIBLE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment