Commit 110a6048 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

comctl32/tab: Return default tab width in TCM_SETMINTABWIDTH if lParam is a negative value.

parent 7981d6c7
......@@ -2662,7 +2662,10 @@ static inline LRESULT TAB_SetMinTabWidth (TAB_INFO *infoPtr, INT cx)
TRACE("(%p,%d)\n", infoPtr, cx);
oldcx = infoPtr->tabMinWidth;
if (infoPtr->tabMinWidth < 0)
oldcx = DEFAULT_MIN_TAB_WIDTH;
else
oldcx = infoPtr->tabMinWidth;
infoPtr->tabMinWidth = cx;
TAB_SetItemBounds(infoPtr);
return oldcx;
......
......@@ -509,6 +509,9 @@ static void test_tab(INT nMinTabWidth)
hwTab = create_tabcontrol(TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE);
SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth);
/* Get System default MinTabWidth */
if (nMinTabWidth < 0)
nMinTabWidth = SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth);
hdc = GetDC(hwTab);
dpi = GetDeviceCaps(hdc, LOGPIXELSX);
......@@ -663,10 +666,7 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
"Parent after sequence, adding tab control to parent", TRUE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
todo_wine{
expect(DEFAULT_MIN_TAB_WIDTH, (int)SendMessage(hTab, TCM_SETMINTABWIDTH, 0, -1));
}
ok_sequence(sequences, TAB_SEQ_INDEX, set_min_tab_width_seq, "Set minTabWidth test sequence", FALSE);
ok(SendMessage(hTab, TCM_SETMINTABWIDTH, 0, -1) > 0,"TCM_SETMINTABWIDTH returned < 0\n");
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Set minTabWidth test parent sequence", FALSE);
/* Testing GetItemCount */
......
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