comctl32: Simplify fifteen functions by removing unused parameters.
This commit is contained in:
parent
94c620cf95
commit
6bdcdc4232
|
@ -495,7 +495,7 @@ TOOLBAR_DrawFlatSeparator (const RECT *lpRect, HDC hdc, const TOOLBAR_INFO *info
|
||||||
* FIXME: It is possible that the height of each line is really SM_CYBORDER.
|
* FIXME: It is possible that the height of each line is really SM_CYBORDER.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
TOOLBAR_DrawDDFlatSeparator (const RECT *lpRect, HDC hdc, const TBUTTON_INFO *btnPtr,
|
TOOLBAR_DrawDDFlatSeparator (const RECT *lpRect, HDC hdc,
|
||||||
const TOOLBAR_INFO *infoPtr)
|
const TOOLBAR_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
RECT myrect;
|
RECT myrect;
|
||||||
|
@ -848,7 +848,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr
|
||||||
/* 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 & BTNS_DROPDOWN)
|
if (btnPtr->fsStyle & BTNS_DROPDOWN)
|
||||||
TOOLBAR_DrawDDFlatSeparator (&rc, hdc, btnPtr, infoPtr);
|
TOOLBAR_DrawDDFlatSeparator (&rc, hdc, infoPtr);
|
||||||
else
|
else
|
||||||
TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr);
|
TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr);
|
||||||
}
|
}
|
||||||
|
@ -3060,7 +3060,7 @@ TOOLBAR_AutoSize (HWND hwnd)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_ButtonCount (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_ButtonCount (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -3069,7 +3069,7 @@ TOOLBAR_ButtonCount (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_ButtonStructSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_ButtonStructSize (HWND hwnd, WPARAM wParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -3151,7 +3151,7 @@ TOOLBAR_CheckButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_CommandToIndex (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_CommandToIndex (HWND hwnd, WPARAM wParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -3197,7 +3197,7 @@ TOOLBAR_Customize (HWND hwnd)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
INT nIndex = (INT)wParam;
|
INT nIndex = (INT)wParam;
|
||||||
|
@ -3296,7 +3296,7 @@ TOOLBAR_GetAnchorHighlight (HWND hwnd)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetBitmap (HWND hwnd, WPARAM wParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
INT nIndex;
|
INT nIndex;
|
||||||
|
@ -3310,7 +3310,7 @@ TOOLBAR_GetBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static inline LRESULT
|
static inline LRESULT
|
||||||
TOOLBAR_GetBitmapFlags (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetBitmapFlags (HWND hwnd)
|
||||||
{
|
{
|
||||||
return (GetDeviceCaps (0, LOGPIXELSX) >= 120) ? TBBF_LARGE : 0;
|
return (GetDeviceCaps (0, LOGPIXELSX) >= 120) ? TBBF_LARGE : 0;
|
||||||
}
|
}
|
||||||
|
@ -3512,7 +3512,7 @@ TOOLBAR_GetDefImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetInsertMark (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetInsertMark (HWND hwnd, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
TBINSERTMARK *lptbim = (TBINSERTMARK*)lParam;
|
TBINSERTMARK *lptbim = (TBINSERTMARK*)lParam;
|
||||||
|
@ -3526,7 +3526,7 @@ TOOLBAR_GetInsertMark (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetInsertMarkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetInsertMarkColor (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -3564,7 +3564,7 @@ TOOLBAR_GetItemRect (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetMaxSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetMaxSize (HWND hwnd, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
LPSIZE lpSize = (LPSIZE)lParam;
|
LPSIZE lpSize = (LPSIZE)lParam;
|
||||||
|
@ -3623,7 +3623,7 @@ TOOLBAR_GetRect (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetRows (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetRows (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -3632,7 +3632,7 @@ TOOLBAR_GetRows (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetState (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetState (HWND hwnd, WPARAM wParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
INT nIndex;
|
INT nIndex;
|
||||||
|
@ -3646,14 +3646,14 @@ TOOLBAR_GetState (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetStyle (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetStyle (HWND hwnd)
|
||||||
{
|
{
|
||||||
return GetWindowLongW(hwnd, GWL_STYLE);
|
return GetWindowLongW(hwnd, GWL_STYLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetTextRows (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetTextRows (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -3662,7 +3662,7 @@ TOOLBAR_GetTextRows (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetToolTips (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -3673,7 +3673,7 @@ TOOLBAR_GetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_GetUnicodeFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_GetUnicodeFormat (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
@ -4287,7 +4287,7 @@ TOOLBAR_Restore(TOOLBAR_INFO *infoPtr, const TBSAVEPARAMSW *lpSave)
|
||||||
* delete */
|
* delete */
|
||||||
for (i = infoPtr->nNumButtons - 1; i >= 0; i--)
|
for (i = infoPtr->nNumButtons - 1; i >= 0; i--)
|
||||||
if (infoPtr->buttons[i].iBitmap == -1)
|
if (infoPtr->buttons[i].iBitmap == -1)
|
||||||
TOOLBAR_DeleteButton(infoPtr->hwndSelf, i, 0);
|
TOOLBAR_DeleteButton(infoPtr->hwndSelf, i);
|
||||||
|
|
||||||
/* only indicate success if at least one button survived */
|
/* only indicate success if at least one button survived */
|
||||||
if (infoPtr->nNumButtons > 0) ret = TRUE;
|
if (infoPtr->nNumButtons > 0) ret = TRUE;
|
||||||
|
@ -5826,7 +5826,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (pt.x < (btnPtr->rect.left + (btnPtr->rect.right - btnPtr->rect.left)/2))
|
if (pt.x < (btnPtr->rect.left + (btnPtr->rect.right - btnPtr->rect.left)/2))
|
||||||
{
|
{
|
||||||
if ((nButton > 0) && (infoPtr->buttons[nButton-1].fsStyle & BTNS_SEP))
|
if ((nButton > 0) && (infoPtr->buttons[nButton-1].fsStyle & BTNS_SEP))
|
||||||
TOOLBAR_DeleteButton(hwnd, nButton - 1, 0);
|
TOOLBAR_DeleteButton(hwnd, nButton - 1);
|
||||||
}
|
}
|
||||||
else /* else insert a separator before the dragged button */
|
else /* else insert a separator before the dragged button */
|
||||||
{
|
{
|
||||||
|
@ -5853,7 +5853,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE("button %d dragged out of toolbar\n", infoPtr->nButtonDrag);
|
TRACE("button %d dragged out of toolbar\n", infoPtr->nButtonDrag);
|
||||||
TOOLBAR_DeleteButton(hwnd, (WPARAM)infoPtr->nButtonDrag, 0);
|
TOOLBAR_DeleteButton(hwnd, (WPARAM)infoPtr->nButtonDrag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* button under cursor changed so need to re-set hot item */
|
/* button under cursor changed so need to re-set hot item */
|
||||||
|
@ -6676,10 +6676,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return TOOLBAR_AutoSize (hwnd);
|
return TOOLBAR_AutoSize (hwnd);
|
||||||
|
|
||||||
case TB_BUTTONCOUNT:
|
case TB_BUTTONCOUNT:
|
||||||
return TOOLBAR_ButtonCount (hwnd, wParam, lParam);
|
return TOOLBAR_ButtonCount (hwnd);
|
||||||
|
|
||||||
case TB_BUTTONSTRUCTSIZE:
|
case TB_BUTTONSTRUCTSIZE:
|
||||||
return TOOLBAR_ButtonStructSize (hwnd, wParam, lParam);
|
return TOOLBAR_ButtonStructSize (hwnd, wParam);
|
||||||
|
|
||||||
case TB_CHANGEBITMAP:
|
case TB_CHANGEBITMAP:
|
||||||
return TOOLBAR_ChangeBitmap (hwnd, wParam, lParam);
|
return TOOLBAR_ChangeBitmap (hwnd, wParam, lParam);
|
||||||
|
@ -6688,13 +6688,13 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return TOOLBAR_CheckButton (hwnd, wParam, lParam);
|
return TOOLBAR_CheckButton (hwnd, wParam, lParam);
|
||||||
|
|
||||||
case TB_COMMANDTOINDEX:
|
case TB_COMMANDTOINDEX:
|
||||||
return TOOLBAR_CommandToIndex (hwnd, wParam, lParam);
|
return TOOLBAR_CommandToIndex (hwnd, wParam);
|
||||||
|
|
||||||
case TB_CUSTOMIZE:
|
case TB_CUSTOMIZE:
|
||||||
return TOOLBAR_Customize (hwnd);
|
return TOOLBAR_Customize (hwnd);
|
||||||
|
|
||||||
case TB_DELETEBUTTON:
|
case TB_DELETEBUTTON:
|
||||||
return TOOLBAR_DeleteButton (hwnd, wParam, lParam);
|
return TOOLBAR_DeleteButton (hwnd, wParam);
|
||||||
|
|
||||||
case TB_ENABLEBUTTON:
|
case TB_ENABLEBUTTON:
|
||||||
return TOOLBAR_EnableButton (hwnd, wParam, lParam);
|
return TOOLBAR_EnableButton (hwnd, wParam, lParam);
|
||||||
|
@ -6703,10 +6703,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return TOOLBAR_GetAnchorHighlight (hwnd);
|
return TOOLBAR_GetAnchorHighlight (hwnd);
|
||||||
|
|
||||||
case TB_GETBITMAP:
|
case TB_GETBITMAP:
|
||||||
return TOOLBAR_GetBitmap (hwnd, wParam, lParam);
|
return TOOLBAR_GetBitmap (hwnd, wParam);
|
||||||
|
|
||||||
case TB_GETBITMAPFLAGS:
|
case TB_GETBITMAPFLAGS:
|
||||||
return TOOLBAR_GetBitmapFlags (hwnd, wParam, lParam);
|
return TOOLBAR_GetBitmapFlags (hwnd);
|
||||||
|
|
||||||
case TB_GETBUTTON:
|
case TB_GETBUTTON:
|
||||||
return TOOLBAR_GetButton (hwnd, wParam, lParam);
|
return TOOLBAR_GetButton (hwnd, wParam, lParam);
|
||||||
|
@ -6742,16 +6742,16 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return TOOLBAR_GetDefImageList (hwnd, wParam, lParam);
|
return TOOLBAR_GetDefImageList (hwnd, wParam, lParam);
|
||||||
|
|
||||||
case TB_GETINSERTMARK:
|
case TB_GETINSERTMARK:
|
||||||
return TOOLBAR_GetInsertMark (hwnd, wParam, lParam);
|
return TOOLBAR_GetInsertMark (hwnd, lParam);
|
||||||
|
|
||||||
case TB_GETINSERTMARKCOLOR:
|
case TB_GETINSERTMARKCOLOR:
|
||||||
return TOOLBAR_GetInsertMarkColor (hwnd, wParam, lParam);
|
return TOOLBAR_GetInsertMarkColor (hwnd);
|
||||||
|
|
||||||
case TB_GETITEMRECT:
|
case TB_GETITEMRECT:
|
||||||
return TOOLBAR_GetItemRect (hwnd, wParam, lParam);
|
return TOOLBAR_GetItemRect (hwnd, wParam, lParam);
|
||||||
|
|
||||||
case TB_GETMAXSIZE:
|
case TB_GETMAXSIZE:
|
||||||
return TOOLBAR_GetMaxSize (hwnd, wParam, lParam);
|
return TOOLBAR_GetMaxSize (hwnd, lParam);
|
||||||
|
|
||||||
/* case TB_GETOBJECT: */ /* 4.71 */
|
/* case TB_GETOBJECT: */ /* 4.71 */
|
||||||
|
|
||||||
|
@ -6762,10 +6762,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return TOOLBAR_GetRect (hwnd, wParam, lParam);
|
return TOOLBAR_GetRect (hwnd, wParam, lParam);
|
||||||
|
|
||||||
case TB_GETROWS:
|
case TB_GETROWS:
|
||||||
return TOOLBAR_GetRows (hwnd, wParam, lParam);
|
return TOOLBAR_GetRows (hwnd);
|
||||||
|
|
||||||
case TB_GETSTATE:
|
case TB_GETSTATE:
|
||||||
return TOOLBAR_GetState (hwnd, wParam, lParam);
|
return TOOLBAR_GetState (hwnd, wParam);
|
||||||
|
|
||||||
case TB_GETSTRINGA:
|
case TB_GETSTRINGA:
|
||||||
return TOOLBAR_GetStringA (hwnd, wParam, lParam);
|
return TOOLBAR_GetStringA (hwnd, wParam, lParam);
|
||||||
|
@ -6774,16 +6774,16 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return TOOLBAR_GetStringW (hwnd, wParam, lParam);
|
return TOOLBAR_GetStringW (hwnd, wParam, lParam);
|
||||||
|
|
||||||
case TB_GETSTYLE:
|
case TB_GETSTYLE:
|
||||||
return TOOLBAR_GetStyle (hwnd, wParam, lParam);
|
return TOOLBAR_GetStyle (hwnd);
|
||||||
|
|
||||||
case TB_GETTEXTROWS:
|
case TB_GETTEXTROWS:
|
||||||
return TOOLBAR_GetTextRows (hwnd, wParam, lParam);
|
return TOOLBAR_GetTextRows (hwnd);
|
||||||
|
|
||||||
case TB_GETTOOLTIPS:
|
case TB_GETTOOLTIPS:
|
||||||
return TOOLBAR_GetToolTips (hwnd, wParam, lParam);
|
return TOOLBAR_GetToolTips (hwnd);
|
||||||
|
|
||||||
case TB_GETUNICODEFORMAT:
|
case TB_GETUNICODEFORMAT:
|
||||||
return TOOLBAR_GetUnicodeFormat (hwnd, wParam, lParam);
|
return TOOLBAR_GetUnicodeFormat (hwnd);
|
||||||
|
|
||||||
case TB_HIDEBUTTON:
|
case TB_HIDEBUTTON:
|
||||||
return TOOLBAR_HideButton (hwnd, wParam, lParam);
|
return TOOLBAR_HideButton (hwnd, wParam, lParam);
|
||||||
|
|
Loading…
Reference in New Issue