mirror of
https://github.com/reactos/reactos.git
synced 2024-06-16 01:21:44 +00:00
[0.4.7][COMCTL32] IP Address ctrl CORE-9853, LVIS-CUT CORE-16722, RC, compiler-warning
This ports back: 0.4.15-dev-7156-g414f3da7a6
[COMCTL32] IP Address control: Fix background drawing (#6133) CORE-9853 0.4.15-dev-6773-g855008d97b
[COMCTL32] Invalidate LVIS_CUT selected items too (#4218) CORE-16722 And port back a few selected RC-improvements. To compensate binary increase, I stripped a few TRACE's and debug-functions in the older branches within listview.c. That fixed the following compiler warning for (GCC) *rls*-configuration: warning: variable 'prev' set but not used [-Wunused-but-set-variable] within the function ranges_assert() comctl32.dll binary therefore shrinks on all branches: comctl32.dll master RosBEWin2.2.2 GCC8.4.0dbg 2.001.408 (0.4.15-dev-7906-g1b85a5f) comctl32.dll 0.4.14rls RosBEWin2.2.2 GCC8.4.0dbg 1.997.824 -> 1.982.976 comctl32.dll 0.4.14rls RosBEWin2.1.6 GCC4.7.2dbg 1.807.360 -> 1.794.560 comctl32.dll 0.4.13rls RosBEWin2.1.6 GCC4.7.2dbg 1.803.264 -> 1.790.464 comctl32.dll 0.4.12rls RosBEWin2.1.6 GCC4.7.2dbg 1.817.088 -> 1.803.264 comctl32.dll 0.4.11rls RosBEWin2.1.6 GCC4.7.2dbg 1.809.408 -> 1.796.096 comctl32.dll 0.4.10rls RosBEWin2.1.6 GCC4.7.2dbg 1.806.848 -> 1.793.536 comctl32.dll 0.4. 9rls RosBEWin2.1.6 GCC4.7.2dbg 1.806.848 -> 1.793.536 comctl32.dll 0.4. 8rls RosBEWin2.1.6 GCC4.7.2dbg 1.632.768 -> 1.618.944 comctl32.dll 0.4. 7rls RosBEWin2.1.6 GCC4.7.2dbg 1.602.048 -> 1.588.224
This commit is contained in:
parent
d708fe0246
commit
0ada4aee18
|
@ -20,16 +20,6 @@
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*
|
|
||||||
* NOTE
|
|
||||||
*
|
|
||||||
* This code was audited for completeness against the documented features
|
|
||||||
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
|
||||||
*
|
|
||||||
* Unless otherwise noted, we believe this code to be complete, as per
|
|
||||||
* the specification mentioned above.
|
|
||||||
* If you discover missing features, or bugs, please note them below.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "comctl32.h"
|
#include "comctl32.h"
|
||||||
|
@ -170,7 +160,15 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
|
||||||
fgCol = comctl32_color.clrGrayText;
|
fgCol = comctl32_color.clrGrayText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
{
|
||||||
|
HBRUSH brush = CreateSolidBrush(bgCol);
|
||||||
|
FillRect(hdc, &rect, brush);
|
||||||
|
DeleteObject(brush);
|
||||||
|
}
|
||||||
|
#else
|
||||||
FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1));
|
FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1));
|
||||||
|
#endif
|
||||||
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
|
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,12 +44,12 @@ STRINGTABLE
|
||||||
|
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
{
|
{
|
||||||
IDS_BUTTON_YES "&Yes"
|
IDS_BUTTON_YES "&Ja"
|
||||||
IDS_BUTTON_NO "&No"
|
IDS_BUTTON_NO "&Nein"
|
||||||
IDS_BUTTON_RETRY "&Retry"
|
IDS_BUTTON_RETRY "&Wiederholen"
|
||||||
IDS_BUTTON_OK "OK"
|
IDS_BUTTON_OK "OK"
|
||||||
IDS_BUTTON_CANCEL "Cancel"
|
IDS_BUTTON_CANCEL "Abbrechen"
|
||||||
IDS_BUTTON_CLOSE "&Close"
|
IDS_BUTTON_CLOSE "&Schließen"
|
||||||
}
|
}
|
||||||
|
|
||||||
IDD_PROPSHEET DIALOG 0, 0, 220, 140
|
IDD_PROPSHEET DIALOG 0, 0, 220, 140
|
||||||
|
|
|
@ -45,7 +45,7 @@ STRINGTABLE
|
||||||
|
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
{
|
{
|
||||||
IDS_BUTTON_YES "&Yes"
|
IDS_BUTTON_YES "&Sí"
|
||||||
IDS_BUTTON_NO "&No"
|
IDS_BUTTON_NO "&No"
|
||||||
IDS_BUTTON_RETRY "&Retry"
|
IDS_BUTTON_RETRY "&Retry"
|
||||||
IDS_BUTTON_OK "OK"
|
IDS_BUTTON_OK "OK"
|
||||||
|
|
|
@ -46,9 +46,9 @@ STRINGTABLE
|
||||||
{
|
{
|
||||||
IDS_BUTTON_YES "&Yes"
|
IDS_BUTTON_YES "&Yes"
|
||||||
IDS_BUTTON_NO "&No"
|
IDS_BUTTON_NO "&No"
|
||||||
IDS_BUTTON_RETRY "&Retry"
|
IDS_BUTTON_RETRY "Ú&jra"
|
||||||
IDS_BUTTON_OK "OK"
|
IDS_BUTTON_OK "OK"
|
||||||
IDS_BUTTON_CANCEL "Cancel"
|
IDS_BUTTON_CANCEL "Mégse"
|
||||||
IDS_BUTTON_CLOSE "&Close"
|
IDS_BUTTON_CLOSE "&Close"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ BEGIN
|
||||||
PUSHBUTTON "&Súgó", IDC_HELP_BTN,320,40,70,14
|
PUSHBUTTON "&Súgó", IDC_HELP_BTN,320,40,70,14
|
||||||
PUSHBUTTON "&Fel", IDC_MOVEUP_BTN,320,74,70,14
|
PUSHBUTTON "&Fel", IDC_MOVEUP_BTN,320,74,70,14
|
||||||
PUSHBUTTON "&Le", IDC_MOVEDN_BTN,320,91,70,14
|
PUSHBUTTON "&Le", IDC_MOVEDN_BTN,320,91,70,14
|
||||||
LTEXT "El&érhető gombok:", -1,4,5,120,10
|
LTEXT "Elé&rhető gombok:", -1,4,5,120,10
|
||||||
LISTBOX IDC_AVAILBTN_LBOX,5,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
LISTBOX IDC_AVAILBTN_LBOX,5,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "&Hozzáad ->", IDOK, 132, 42, 55, 14
|
PUSHBUTTON "&Hozzáad ->", IDOK, 132, 42, 55, 14
|
||||||
PUSHBUTTON "<- El&vesz", IDC_REMOVE_BTN,132,62,55,14
|
PUSHBUTTON "<- El&vesz", IDC_REMOVE_BTN,132,62,55,14
|
||||||
|
|
|
@ -88,13 +88,13 @@ FONT 8, "MS Shell Dlg"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "&Fechar", IDCANCEL,320,6,70,14
|
DEFPUSHBUTTON "&Fechar", IDCANCEL,320,6,70,14
|
||||||
PUSHBUTTON "R&estaurar", IDC_RESET_BTN,320,23,70,14
|
PUSHBUTTON "R&estaurar", IDC_RESET_BTN,320,23,70,14
|
||||||
PUSHBUTTON "&Ajuda", IDC_HELP_BTN,320,40,70,14
|
PUSHBUTTON "Ajuda", IDC_HELP_BTN,320,40,70,14
|
||||||
PUSHBUTTON "A&cima", IDC_MOVEUP_BTN,320,74,70,14
|
PUSHBUTTON "A&cima", IDC_MOVEUP_BTN,320,74,70,14
|
||||||
PUSHBUTTON "A&baixo", IDC_MOVEDN_BTN,320,91,70,14
|
PUSHBUTTON "A&baixo", IDC_MOVEDN_BTN,320,91,70,14
|
||||||
LTEXT "Botões &disponíveis:", -1,4,5,120,10
|
LTEXT "Botões &disponíveis:", -1,4,5,120,10
|
||||||
LISTBOX IDC_AVAILBTN_LBOX,5,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
LISTBOX IDC_AVAILBTN_LBOX,5,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "&Adicionar ->", IDOK, 132, 42, 55, 14
|
PUSHBUTTON "&Adicionar ->", IDOK, 132, 42, 55, 14
|
||||||
PUSHBUTTON "<- &Remover", IDC_REMOVE_BTN,132,62,55,14
|
PUSHBUTTON "<- &Remover", IDC_REMOVE_BTN,132,62,55,14
|
||||||
LTEXT "&Botões da barra de ferramentas:", -1,194,5,120,10
|
LTEXT "Botões da barra de ferramentas:", -1,194,5,120,10
|
||||||
LISTBOX IDC_TOOLBARBTN_LBOX, 194,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
LISTBOX IDC_TOOLBARBTN_LBOX, 194,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||||
END
|
END
|
||||||
|
|
|
@ -46,7 +46,7 @@ STRINGTABLE
|
||||||
|
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
{
|
{
|
||||||
IDS_BUTTON_YES "&Yes"
|
IDS_BUTTON_YES "&Da"
|
||||||
IDS_BUTTON_NO "&No"
|
IDS_BUTTON_NO "&No"
|
||||||
IDS_BUTTON_RETRY "&Retry"
|
IDS_BUTTON_RETRY "&Retry"
|
||||||
IDS_BUTTON_OK "OK"
|
IDS_BUTTON_OK "OK"
|
||||||
|
@ -69,7 +69,7 @@ END
|
||||||
|
|
||||||
IDD_WIZARD DIALOG 0, 0, 290, 159
|
IDD_WIZARD DIALOG 0, 0, 290, 159
|
||||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||||
CAPTION "Asistent"
|
CAPTION "Expert"
|
||||||
FONT 8, "MS Shell Dlg"
|
FONT 8, "MS Shell Dlg"
|
||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "< Înap&oi", IDC_BACK_BUTTON,56,138,55,14
|
PUSHBUTTON "< Înap&oi", IDC_BACK_BUTTON,56,138,55,14
|
||||||
|
@ -89,7 +89,7 @@ CAPTION "Personalizare panou de instrumente"
|
||||||
FONT 8, "MS Shell Dlg"
|
FONT 8, "MS Shell Dlg"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "Î&nchide", IDCANCEL,320,6,70,14
|
DEFPUSHBUTTON "Î&nchide", IDCANCEL,320,6,70,14
|
||||||
PUSHBUTTON "&Reinițiere", IDC_RESET_BTN,320,23,70,14
|
PUSHBUTTON "&Resetare", IDC_RESET_BTN,320,23,70,14
|
||||||
PUSHBUTTON "&Manual…", IDC_HELP_BTN,320,40,70,14
|
PUSHBUTTON "&Manual…", IDC_HELP_BTN,320,40,70,14
|
||||||
PUSHBUTTON "În s&us", IDC_MOVEUP_BTN,320,74,70,14
|
PUSHBUTTON "În s&us", IDC_MOVEUP_BTN,320,74,70,14
|
||||||
PUSHBUTTON "În j&os", IDC_MOVEDN_BTN,320,91,70,14
|
PUSHBUTTON "În j&os", IDC_MOVEDN_BTN,320,91,70,14
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Top level resource file for Common Controls
|
* Top level resource file for Common Controls
|
||||||
*
|
*
|
||||||
* Copyright: 2006 Fatih Aşıcı; 2013-2014 Erdem Ersoy
|
// COPYRIGHT: 2006 Fatih Aşıcı; 2013-2014 Erdem Ersoy
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -47,7 +47,7 @@ STRINGTABLE
|
||||||
IDS_BUTTON_NO "&No"
|
IDS_BUTTON_NO "&No"
|
||||||
IDS_BUTTON_RETRY "&Retry"
|
IDS_BUTTON_RETRY "&Retry"
|
||||||
IDS_BUTTON_OK "OK"
|
IDS_BUTTON_OK "OK"
|
||||||
IDS_BUTTON_CANCEL "Cancel"
|
IDS_BUTTON_CANCEL "İptal"
|
||||||
IDS_BUTTON_CLOSE "&Close"
|
IDS_BUTTON_CLOSE "&Close"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ STRINGTABLE
|
||||||
IDS_BUTTON_NO "&No"
|
IDS_BUTTON_NO "&No"
|
||||||
IDS_BUTTON_RETRY "&Retry"
|
IDS_BUTTON_RETRY "&Retry"
|
||||||
IDS_BUTTON_OK "OK"
|
IDS_BUTTON_OK "OK"
|
||||||
IDS_BUTTON_CANCEL "Cancel"
|
IDS_BUTTON_CANCEL "取消"
|
||||||
IDS_BUTTON_CLOSE "&Close"
|
IDS_BUTTON_CLOSE "&Close"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ STRINGTABLE
|
||||||
IDS_BUTTON_NO "&No"
|
IDS_BUTTON_NO "&No"
|
||||||
IDS_BUTTON_RETRY "&Retry"
|
IDS_BUTTON_RETRY "&Retry"
|
||||||
IDS_BUTTON_OK "OK"
|
IDS_BUTTON_OK "OK"
|
||||||
IDS_BUTTON_CANCEL "Cancel"
|
IDS_BUTTON_CANCEL "取消"
|
||||||
IDS_BUTTON_CLOSE "&Close"
|
IDS_BUTTON_CLOSE "&Close"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -542,179 +542,12 @@ static inline LPCSTR debugtext_tn(LPCWSTR text, BOOL isW, INT n)
|
||||||
return isW ? debugstr_wn(text, n) : debugstr_an((LPCSTR)text, n);
|
return isW ? debugstr_wn(text, n) : debugstr_an((LPCSTR)text, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char* debug_getbuf(void)
|
|
||||||
{
|
|
||||||
static int index = 0;
|
|
||||||
static char buffers[DEBUG_BUFFERS][DEBUG_BUFFER_SIZE];
|
|
||||||
return buffers[index++ % DEBUG_BUFFERS];
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline const char* debugrange(const RANGE *lprng)
|
static inline const char* debugrange(const RANGE *lprng)
|
||||||
{
|
{
|
||||||
if (!lprng) return "(null)";
|
if (!lprng) return "(null)";
|
||||||
return wine_dbg_sprintf("[%d, %d]", lprng->lower, lprng->upper);
|
return wine_dbg_sprintf("[%d, %d]", lprng->lower, lprng->upper);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* debugscrollinfo(const SCROLLINFO *pScrollInfo)
|
|
||||||
{
|
|
||||||
char* buf = debug_getbuf(), *text = buf;
|
|
||||||
int len, size = DEBUG_BUFFER_SIZE;
|
|
||||||
|
|
||||||
if (pScrollInfo == NULL) return "(null)";
|
|
||||||
len = snprintf(buf, size, "{cbSize=%u, ", pScrollInfo->cbSize);
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (pScrollInfo->fMask & SIF_RANGE)
|
|
||||||
len = snprintf(buf, size, "nMin=%d, nMax=%d, ", pScrollInfo->nMin, pScrollInfo->nMax);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (pScrollInfo->fMask & SIF_PAGE)
|
|
||||||
len = snprintf(buf, size, "nPage=%u, ", pScrollInfo->nPage);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (pScrollInfo->fMask & SIF_POS)
|
|
||||||
len = snprintf(buf, size, "nPos=%d, ", pScrollInfo->nPos);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (pScrollInfo->fMask & SIF_TRACKPOS)
|
|
||||||
len = snprintf(buf, size, "nTrackPos=%d, ", pScrollInfo->nTrackPos);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len;
|
|
||||||
goto undo;
|
|
||||||
end:
|
|
||||||
buf = text + strlen(text);
|
|
||||||
undo:
|
|
||||||
if (buf - text > 2) { buf[-2] = '}'; buf[-1] = 0; }
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* debugnmlistview(const NMLISTVIEW *plvnm)
|
|
||||||
{
|
|
||||||
if (!plvnm) return "(null)";
|
|
||||||
return wine_dbg_sprintf("iItem=%d, iSubItem=%d, uNewState=0x%x,"
|
|
||||||
" uOldState=0x%x, uChanged=0x%x, ptAction=%s, lParam=%ld",
|
|
||||||
plvnm->iItem, plvnm->iSubItem, plvnm->uNewState, plvnm->uOldState,
|
|
||||||
plvnm->uChanged, wine_dbgstr_point(&plvnm->ptAction), plvnm->lParam);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* debuglvitem_t(const LVITEMW *lpLVItem, BOOL isW)
|
|
||||||
{
|
|
||||||
char* buf = debug_getbuf(), *text = buf;
|
|
||||||
int len, size = DEBUG_BUFFER_SIZE;
|
|
||||||
|
|
||||||
if (lpLVItem == NULL) return "(null)";
|
|
||||||
len = snprintf(buf, size, "{iItem=%d, iSubItem=%d, ", lpLVItem->iItem, lpLVItem->iSubItem);
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpLVItem->mask & LVIF_STATE)
|
|
||||||
len = snprintf(buf, size, "state=%x, stateMask=%x, ", lpLVItem->state, lpLVItem->stateMask);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpLVItem->mask & LVIF_TEXT)
|
|
||||||
len = snprintf(buf, size, "pszText=%s, cchTextMax=%d, ", debugtext_tn(lpLVItem->pszText, isW, 80), lpLVItem->cchTextMax);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpLVItem->mask & LVIF_IMAGE)
|
|
||||||
len = snprintf(buf, size, "iImage=%d, ", lpLVItem->iImage);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpLVItem->mask & LVIF_PARAM)
|
|
||||||
len = snprintf(buf, size, "lParam=%lx, ", lpLVItem->lParam);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpLVItem->mask & LVIF_INDENT)
|
|
||||||
len = snprintf(buf, size, "iIndent=%d, ", lpLVItem->iIndent);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len;
|
|
||||||
goto undo;
|
|
||||||
end:
|
|
||||||
buf = text + strlen(text);
|
|
||||||
undo:
|
|
||||||
if (buf - text > 2) { buf[-2] = '}'; buf[-1] = 0; }
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* debuglvcolumn_t(const LVCOLUMNW *lpColumn, BOOL isW)
|
|
||||||
{
|
|
||||||
char* buf = debug_getbuf(), *text = buf;
|
|
||||||
int len, size = DEBUG_BUFFER_SIZE;
|
|
||||||
|
|
||||||
if (lpColumn == NULL) return "(null)";
|
|
||||||
len = snprintf(buf, size, "{");
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpColumn->mask & LVCF_SUBITEM)
|
|
||||||
len = snprintf(buf, size, "iSubItem=%d, ", lpColumn->iSubItem);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpColumn->mask & LVCF_FMT)
|
|
||||||
len = snprintf(buf, size, "fmt=%x, ", lpColumn->fmt);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpColumn->mask & LVCF_WIDTH)
|
|
||||||
len = snprintf(buf, size, "cx=%d, ", lpColumn->cx);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpColumn->mask & LVCF_TEXT)
|
|
||||||
len = snprintf(buf, size, "pszText=%s, cchTextMax=%d, ", debugtext_tn(lpColumn->pszText, isW, 80), lpColumn->cchTextMax);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpColumn->mask & LVCF_IMAGE)
|
|
||||||
len = snprintf(buf, size, "iImage=%d, ", lpColumn->iImage);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len; size -= len;
|
|
||||||
if (lpColumn->mask & LVCF_ORDER)
|
|
||||||
len = snprintf(buf, size, "iOrder=%d, ", lpColumn->iOrder);
|
|
||||||
else len = 0;
|
|
||||||
if (len == -1) goto end;
|
|
||||||
buf += len;
|
|
||||||
goto undo;
|
|
||||||
end:
|
|
||||||
buf = text + strlen(text);
|
|
||||||
undo:
|
|
||||||
if (buf - text > 2) { buf[-2] = '}'; buf[-1] = 0; }
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* debuglvhittestinfo(const LVHITTESTINFO *lpht)
|
|
||||||
{
|
|
||||||
if (!lpht) return "(null)";
|
|
||||||
|
|
||||||
return wine_dbg_sprintf("{pt=%s, flags=0x%x, iItem=%d, iSubItem=%d}",
|
|
||||||
wine_dbgstr_point(&lpht->pt), lpht->flags, lpht->iItem, lpht->iSubItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return the corresponding text for a given scroll value */
|
|
||||||
static inline LPCSTR debugscrollcode(int nScrollCode)
|
|
||||||
{
|
|
||||||
switch(nScrollCode)
|
|
||||||
{
|
|
||||||
case SB_LINELEFT: return "SB_LINELEFT";
|
|
||||||
case SB_LINERIGHT: return "SB_LINERIGHT";
|
|
||||||
case SB_PAGELEFT: return "SB_PAGELEFT";
|
|
||||||
case SB_PAGERIGHT: return "SB_PAGERIGHT";
|
|
||||||
case SB_THUMBPOSITION: return "SB_THUMBPOSITION";
|
|
||||||
case SB_THUMBTRACK: return "SB_THUMBTRACK";
|
|
||||||
case SB_ENDSCROLL: return "SB_ENDSCROLL";
|
|
||||||
case SB_INTERNAL: return "SB_INTERNAL";
|
|
||||||
default: return "unknown";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******** Notification functions ************************************/
|
/******** Notification functions ************************************/
|
||||||
|
|
||||||
|
@ -865,7 +698,6 @@ static inline void notify_itemactivate(const LISTVIEW_INFO *infoPtr, const LVHIT
|
||||||
|
|
||||||
static inline LRESULT notify_listview(const LISTVIEW_INFO *infoPtr, INT code, LPNMLISTVIEW plvnm)
|
static inline LRESULT notify_listview(const LISTVIEW_INFO *infoPtr, INT code, LPNMLISTVIEW plvnm)
|
||||||
{
|
{
|
||||||
TRACE("(code=%d, plvnm=%s)\n", code, debugnmlistview(plvnm));
|
|
||||||
return notify_hdr(infoPtr, code, (LPNMHDR)plvnm);
|
return notify_hdr(infoPtr, code, (LPNMHDR)plvnm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -877,7 +709,6 @@ static BOOL notify_click(const LISTVIEW_INFO *infoPtr, INT code, const LVHITTEST
|
||||||
HWND hwnd = infoPtr->hwndSelf;
|
HWND hwnd = infoPtr->hwndSelf;
|
||||||
LRESULT ret;
|
LRESULT ret;
|
||||||
|
|
||||||
TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht));
|
|
||||||
ZeroMemory(&nmia, sizeof(nmia));
|
ZeroMemory(&nmia, sizeof(nmia));
|
||||||
nmia.iItem = lvht->iItem;
|
nmia.iItem = lvht->iItem;
|
||||||
nmia.iSubItem = lvht->iSubItem;
|
nmia.iSubItem = lvht->iSubItem;
|
||||||
|
@ -962,7 +793,6 @@ static BOOL notify_dispinfoT(const LISTVIEW_INFO *infoPtr, UINT code, LPNMLVDISP
|
||||||
if (infoPtr->notifyFormat == NFR_ANSI)
|
if (infoPtr->notifyFormat == NFR_ANSI)
|
||||||
code = get_ansi_notification(code);
|
code = get_ansi_notification(code);
|
||||||
|
|
||||||
TRACE(" pdi->item=%s\n", debuglvitem_t(&pdi->item, infoPtr->notifyFormat != NFR_ANSI));
|
|
||||||
ret = notify_hdr(infoPtr, code, &pdi->hdr);
|
ret = notify_hdr(infoPtr, code, &pdi->hdr);
|
||||||
TRACE(" resulting code=%d\n", pdi->hdr.code);
|
TRACE(" resulting code=%d\n", pdi->hdr.code);
|
||||||
|
|
||||||
|
@ -1112,7 +942,6 @@ static RANGES ranges_create(int count);
|
||||||
static void ranges_destroy(RANGES ranges);
|
static void ranges_destroy(RANGES ranges);
|
||||||
static BOOL ranges_add(RANGES ranges, RANGE range);
|
static BOOL ranges_add(RANGES ranges, RANGE range);
|
||||||
static BOOL ranges_del(RANGES ranges, RANGE range);
|
static BOOL ranges_del(RANGES ranges, RANGE range);
|
||||||
static void ranges_dump(RANGES ranges);
|
|
||||||
|
|
||||||
static inline BOOL ranges_additem(RANGES ranges, INT nItem)
|
static inline BOOL ranges_additem(RANGES ranges, INT nItem)
|
||||||
{
|
{
|
||||||
|
@ -2062,7 +1891,6 @@ static INT LISTVIEW_UpdateHScroll(LISTVIEW_INFO *infoPtr)
|
||||||
#endif
|
#endif
|
||||||
dx = GetScrollPos(infoPtr->hwndSelf, SB_HORZ);
|
dx = GetScrollPos(infoPtr->hwndSelf, SB_HORZ);
|
||||||
dx -= SetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &horzInfo, TRUE);
|
dx -= SetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &horzInfo, TRUE);
|
||||||
TRACE("horzInfo=%s\n", debugscrollinfo(&horzInfo));
|
|
||||||
|
|
||||||
/* Update the Header Control */
|
/* Update the Header Control */
|
||||||
if (infoPtr->hwndHeader)
|
if (infoPtr->hwndHeader)
|
||||||
|
@ -2084,7 +1912,7 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr)
|
||||||
ZeroMemory(&vertInfo, sizeof(SCROLLINFO));
|
ZeroMemory(&vertInfo, sizeof(SCROLLINFO));
|
||||||
vertInfo.cbSize = sizeof(SCROLLINFO);
|
vertInfo.cbSize = sizeof(SCROLLINFO);
|
||||||
#ifdef __REACTOS__ /* CORE-16466 part 2 of 4 */
|
#ifdef __REACTOS__ /* CORE-16466 part 2 of 4 */
|
||||||
vertInfo.nPage = max((infoPtr->rcList.bottom - infoPtr->rcList.top), 0);
|
vertInfo.nPage = max(0, infoPtr->rcList.bottom - infoPtr->rcList.top);
|
||||||
#else
|
#else
|
||||||
vertInfo.nPage = infoPtr->rcList.bottom - infoPtr->rcList.top;
|
vertInfo.nPage = infoPtr->rcList.bottom - infoPtr->rcList.top;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2128,7 +1956,6 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr)
|
||||||
#endif
|
#endif
|
||||||
dy = GetScrollPos(infoPtr->hwndSelf, SB_VERT);
|
dy = GetScrollPos(infoPtr->hwndSelf, SB_VERT);
|
||||||
dy -= SetScrollInfo(infoPtr->hwndSelf, SB_VERT, &vertInfo, TRUE);
|
dy -= SetScrollInfo(infoPtr->hwndSelf, SB_VERT, &vertInfo, TRUE);
|
||||||
TRACE("vertInfo=%s\n", debugscrollinfo(&vertInfo));
|
|
||||||
|
|
||||||
LISTVIEW_UpdateSize(infoPtr);
|
LISTVIEW_UpdateSize(infoPtr);
|
||||||
return dy;
|
return dy;
|
||||||
|
@ -2252,7 +2079,11 @@ static void LISTVIEW_InvalidateSelectedItems(const LISTVIEW_INFO *infoPtr)
|
||||||
iterator_frameditems(&i, infoPtr, &infoPtr->rcList);
|
iterator_frameditems(&i, infoPtr, &infoPtr->rcList);
|
||||||
while(iterator_next(&i))
|
while(iterator_next(&i))
|
||||||
{
|
{
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED | LVIS_CUT))
|
||||||
|
#else
|
||||||
if (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED))
|
if (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED))
|
||||||
|
#endif
|
||||||
LISTVIEW_InvalidateItem(infoPtr, i.nItem);
|
LISTVIEW_InvalidateItem(infoPtr, i.nItem);
|
||||||
}
|
}
|
||||||
iterator_destroy(&i);
|
iterator_destroy(&i);
|
||||||
|
@ -2352,8 +2183,6 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW
|
||||||
COLUMN_INFO *lpColumnInfo = NULL;
|
COLUMN_INFO *lpColumnInfo = NULL;
|
||||||
SIZE labelSize = { 0, 0 };
|
SIZE labelSize = { 0, 0 };
|
||||||
|
|
||||||
TRACE("(lpLVItem=%s)\n", debuglvitem_t(lpLVItem, TRUE));
|
|
||||||
|
|
||||||
/* Be smart and try to figure out the minimum we have to do */
|
/* Be smart and try to figure out the minimum we have to do */
|
||||||
if (lpLVItem->iSubItem) assert(infoPtr->uView == LV_VIEW_DETAILS);
|
if (lpLVItem->iSubItem) assert(infoPtr->uView == LV_VIEW_DETAILS);
|
||||||
if (infoPtr->uView == LV_VIEW_ICON && (lprcBox || lprcLabel))
|
if (infoPtr->uView == LV_VIEW_ICON && (lprcBox || lprcLabel))
|
||||||
|
@ -3108,32 +2937,6 @@ static INT CALLBACK ranges_cmp(LPVOID range1, LPVOID range2, LPARAM flags)
|
||||||
return cmp;
|
return cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ranges_check(ranges, desc) if (TRACE_ON(listview)) ranges_assert(ranges, desc, __FILE__, __LINE__)
|
|
||||||
|
|
||||||
static void ranges_assert(RANGES ranges, LPCSTR desc, const char *file, int line)
|
|
||||||
{
|
|
||||||
INT i;
|
|
||||||
RANGE *prev, *curr;
|
|
||||||
|
|
||||||
TRACE("*** Checking %s:%d:%s ***\n", file, line, desc);
|
|
||||||
assert (ranges);
|
|
||||||
assert (DPA_GetPtrCount(ranges->hdpa) >= 0);
|
|
||||||
ranges_dump(ranges);
|
|
||||||
if (DPA_GetPtrCount(ranges->hdpa) > 0)
|
|
||||||
{
|
|
||||||
prev = DPA_GetPtr(ranges->hdpa, 0);
|
|
||||||
assert (prev->lower >= 0 && prev->lower < prev->upper);
|
|
||||||
for (i = 1; i < DPA_GetPtrCount(ranges->hdpa); i++)
|
|
||||||
{
|
|
||||||
curr = DPA_GetPtr(ranges->hdpa, i);
|
|
||||||
assert (prev->upper <= curr->lower);
|
|
||||||
assert (curr->lower < curr->upper);
|
|
||||||
prev = curr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TRACE("--- Done checking---\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static RANGES ranges_create(int count)
|
static RANGES ranges_create(int count)
|
||||||
{
|
{
|
||||||
RANGES ranges = Alloc(sizeof(struct tagRANGES));
|
RANGES ranges = Alloc(sizeof(struct tagRANGES));
|
||||||
|
@ -3198,20 +3001,11 @@ static RANGES ranges_diff(RANGES ranges, RANGES sub)
|
||||||
return ranges;
|
return ranges;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ranges_dump(RANGES ranges)
|
|
||||||
{
|
|
||||||
INT i;
|
|
||||||
|
|
||||||
for (i = 0; i < DPA_GetPtrCount(ranges->hdpa); i++)
|
|
||||||
TRACE(" %s\n", debugrange(DPA_GetPtr(ranges->hdpa, i)));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline BOOL ranges_contain(RANGES ranges, INT nItem)
|
static inline BOOL ranges_contain(RANGES ranges, INT nItem)
|
||||||
{
|
{
|
||||||
RANGE srchrng = { nItem, nItem + 1 };
|
RANGE srchrng = { nItem, nItem + 1 };
|
||||||
|
|
||||||
TRACE("(nItem=%d)\n", nItem);
|
TRACE("(nItem=%d)\n", nItem);
|
||||||
ranges_check(ranges, "before contain");
|
|
||||||
return DPA_Search(ranges->hdpa, &srchrng, 0, ranges_cmp, 0, DPAS_SORTED) != -1;
|
return DPA_Search(ranges->hdpa, &srchrng, 0, ranges_cmp, 0, DPAS_SORTED) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3253,7 +3047,6 @@ static BOOL ranges_add(RANGES ranges, RANGE range)
|
||||||
INT index;
|
INT index;
|
||||||
|
|
||||||
TRACE("(%s)\n", debugrange(&range));
|
TRACE("(%s)\n", debugrange(&range));
|
||||||
ranges_check(ranges, "before add");
|
|
||||||
|
|
||||||
/* try find overlapping regions first */
|
/* try find overlapping regions first */
|
||||||
srchrgn.lower = range.lower - 1;
|
srchrgn.lower = range.lower - 1;
|
||||||
|
@ -3322,11 +3115,9 @@ static BOOL ranges_add(RANGES ranges, RANGE range)
|
||||||
} while(1);
|
} while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ranges_check(ranges, "after add");
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
ranges_check(ranges, "failed add");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3336,7 +3127,6 @@ static BOOL ranges_del(RANGES ranges, RANGE range)
|
||||||
INT index;
|
INT index;
|
||||||
|
|
||||||
TRACE("(%s)\n", debugrange(&range));
|
TRACE("(%s)\n", debugrange(&range));
|
||||||
ranges_check(ranges, "before del");
|
|
||||||
|
|
||||||
/* we don't use DPAS_SORTED here, since we need *
|
/* we don't use DPAS_SORTED here, since we need *
|
||||||
* to find the first overlapping range */
|
* to find the first overlapping range */
|
||||||
|
@ -3395,11 +3185,9 @@ static BOOL ranges_del(RANGES ranges, RANGE range)
|
||||||
index = DPA_Search(ranges->hdpa, &range, index, ranges_cmp, 0, 0);
|
index = DPA_Search(ranges->hdpa, &range, index, ranges_cmp, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ranges_check(ranges, "after del");
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
ranges_check(ranges, "failed del");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3740,7 +3528,6 @@ static BOOL LISTVIEW_KeySelection(LISTVIEW_INFO *infoPtr, INT nItem, BOOL space)
|
||||||
WORD wCtrl = GetKeyState(VK_CONTROL) & 0x8000;
|
WORD wCtrl = GetKeyState(VK_CONTROL) & 0x8000;
|
||||||
BOOL bResult = FALSE;
|
BOOL bResult = FALSE;
|
||||||
|
|
||||||
TRACE("nItem=%d, wShift=%d, wCtrl=%d\n", nItem, wShift, wCtrl);
|
|
||||||
if ((nItem >= 0) && (nItem < infoPtr->nItemCount))
|
if ((nItem >= 0) && (nItem < infoPtr->nItemCount))
|
||||||
{
|
{
|
||||||
bResult = TRUE;
|
bResult = TRUE;
|
||||||
|
@ -4493,8 +4280,6 @@ static BOOL LISTVIEW_SetItemT(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem, BOOL is
|
||||||
BOOL bResult, bChanged = FALSE;
|
BOOL bResult, bChanged = FALSE;
|
||||||
RECT oldItemArea;
|
RECT oldItemArea;
|
||||||
|
|
||||||
TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
|
|
||||||
|
|
||||||
if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount)
|
if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -4774,8 +4559,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||||
NMLVCUSTOMDRAW nmlvcd;
|
NMLVCUSTOMDRAW nmlvcd;
|
||||||
LVITEMW lvItem;
|
LVITEMW lvItem;
|
||||||
|
|
||||||
TRACE("(hdc=%p, nItem=%d, subitems=%p, pos=%s)\n", hdc, nItem, subitems, wine_dbgstr_point(&pos));
|
|
||||||
|
|
||||||
/* get information needed for drawing the item */
|
/* get information needed for drawing the item */
|
||||||
lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM | LVIF_STATE;
|
lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM | LVIF_STATE;
|
||||||
if (infoPtr->uView == LV_VIEW_DETAILS) lvItem.mask |= LVIF_INDENT;
|
if (infoPtr->uView == LV_VIEW_DETAILS) lvItem.mask |= LVIF_INDENT;
|
||||||
|
@ -4788,7 +4571,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||||
lvItem.pszText = szDispText;
|
lvItem.pszText = szDispText;
|
||||||
if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE;
|
if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE;
|
||||||
if (lvItem.pszText == LPSTR_TEXTCALLBACKW) lvItem.pszText = callbackW;
|
if (lvItem.pszText == LPSTR_TEXTCALLBACKW) lvItem.pszText = callbackW;
|
||||||
TRACE(" lvItem=%s\n", debuglvitem_t(&lvItem, TRUE));
|
|
||||||
|
|
||||||
/* now check if we need to update the focus rectangle */
|
/* now check if we need to update the focus rectangle */
|
||||||
focus = infoPtr->bFocus && (lvItem.state & LVIS_FOCUSED) ? &infoPtr->rcFocus : 0;
|
focus = infoPtr->bFocus && (lvItem.state & LVIS_FOCUSED) ? &infoPtr->rcFocus : 0;
|
||||||
|
@ -4840,7 +4622,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||||
if (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)
|
if (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)
|
||||||
lvItem.state = LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED);
|
lvItem.state = LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED);
|
||||||
if (lvItem.pszText == LPSTR_TEXTCALLBACKW) lvItem.pszText = callbackW;
|
if (lvItem.pszText == LPSTR_TEXTCALLBACKW) lvItem.pszText = callbackW;
|
||||||
TRACE(" lvItem=%s\n", debuglvitem_t(&lvItem, TRUE));
|
|
||||||
|
|
||||||
/* update custom draw data */
|
/* update custom draw data */
|
||||||
LISTVIEW_GetItemMetrics(infoPtr, &lvItem, &nmlvcd.nmcd.rc, NULL, NULL, NULL, NULL);
|
LISTVIEW_GetItemMetrics(infoPtr, &lvItem, &nmlvcd.nmcd.rc, NULL, NULL, NULL, NULL);
|
||||||
|
@ -4933,8 +4714,6 @@ static void LISTVIEW_RefreshOwnerDraw(const LISTVIEW_INFO *infoPtr, ITERATOR *i,
|
||||||
dis.rcItem.bottom = dis.rcItem.top + infoPtr->nItemHeight;
|
dis.rcItem.bottom = dis.rcItem.top + infoPtr->nItemHeight;
|
||||||
dis.itemData = item.lParam;
|
dis.itemData = item.lParam;
|
||||||
|
|
||||||
TRACE("item=%s, rcItem=%s\n", debuglvitem_t(&item, TRUE), wine_dbgstr_rect(&dis.rcItem));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Even if we do not send the CDRF_NOTIFYITEMDRAW we need to fill the nmlvcd
|
* Even if we do not send the CDRF_NOTIFYITEMDRAW we need to fill the nmlvcd
|
||||||
* structure for the rest. of the paint cycle
|
* structure for the rest. of the paint cycle
|
||||||
|
@ -6710,8 +6489,6 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
|
||||||
HDPA hdpaSubItems;
|
HDPA hdpaSubItems;
|
||||||
INT isubitem;
|
INT isubitem;
|
||||||
|
|
||||||
TRACE("(item=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
|
|
||||||
|
|
||||||
if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount)
|
if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -6727,10 +6504,10 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
|
||||||
if ( (lpLVItem->mask == LVIF_STATE) && (lpLVItem->stateMask == LVIS_FOCUSED) &&
|
if ( (lpLVItem->mask == LVIF_STATE) && (lpLVItem->stateMask == LVIS_FOCUSED) &&
|
||||||
!(infoPtr->uCallbackMask & LVIS_FOCUSED) )
|
!(infoPtr->uCallbackMask & LVIS_FOCUSED) )
|
||||||
{
|
{
|
||||||
lpLVItem->state = 0;
|
lpLVItem->state = 0;
|
||||||
if (infoPtr->nFocusedItem == lpLVItem->iItem)
|
if (infoPtr->nFocusedItem == lpLVItem->iItem)
|
||||||
lpLVItem->state |= LVIS_FOCUSED;
|
lpLVItem->state |= LVIS_FOCUSED;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZeroMemory(&dispInfo, sizeof(dispInfo));
|
ZeroMemory(&dispInfo, sizeof(dispInfo));
|
||||||
|
@ -6785,7 +6562,6 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
|
||||||
memcpy(lpLVItem, &dispInfo.item, offsetof( LVITEMW, iIndent ));
|
memcpy(lpLVItem, &dispInfo.item, offsetof( LVITEMW, iIndent ));
|
||||||
}
|
}
|
||||||
lpLVItem->mask = mask;
|
lpLVItem->mask = mask;
|
||||||
TRACE(" getdispinfo(1):lpLVItem=%s\n", debuglvitem_t(lpLVItem, isW));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6877,7 +6653,6 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
|
||||||
dispInfo.item.iSubItem = lpLVItem->iSubItem; /* yes: the original subitem */
|
dispInfo.item.iSubItem = lpLVItem->iSubItem; /* yes: the original subitem */
|
||||||
dispInfo.item.lParam = lpItem->lParam;
|
dispInfo.item.lParam = lpItem->lParam;
|
||||||
notify_dispinfoT(infoPtr, LVN_GETDISPINFOW, &dispInfo, isW);
|
notify_dispinfoT(infoPtr, LVN_GETDISPINFOW, &dispInfo, isW);
|
||||||
TRACE(" getdispinfo(2):item=%s\n", debuglvitem_t(&dispInfo.item, isW));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we should not store values for subitems */
|
/* we should not store values for subitems */
|
||||||
|
@ -7834,8 +7609,6 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
|
||||||
LVITEMW item;
|
LVITEMW item;
|
||||||
HWND hwndSelf = infoPtr->hwndSelf;
|
HWND hwndSelf = infoPtr->hwndSelf;
|
||||||
|
|
||||||
TRACE("(item=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
|
|
||||||
|
|
||||||
if (infoPtr->dwStyle & LVS_OWNERDATA) return infoPtr->nItemCount++;
|
if (infoPtr->dwStyle & LVS_OWNERDATA) return infoPtr->nItemCount++;
|
||||||
|
|
||||||
/* make sure it's an item, and not a subitem; cannot insert a subitem */
|
/* make sure it's an item, and not a subitem; cannot insert a subitem */
|
||||||
|
@ -8217,8 +7990,6 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
|
||||||
INT nNewColumn;
|
INT nNewColumn;
|
||||||
HDITEMW hdi;
|
HDITEMW hdi;
|
||||||
|
|
||||||
TRACE("(nColumn=%d, lpColumn=%s, isW=%d)\n", nColumn, debuglvcolumn_t(lpColumn, isW), isW);
|
|
||||||
|
|
||||||
if (!lpColumn || nColumn < 0) return -1;
|
if (!lpColumn || nColumn < 0) return -1;
|
||||||
nColumn = min(nColumn, DPA_GetPtrCount(infoPtr->hdpaColumns));
|
nColumn = min(nColumn, DPA_GetPtrCount(infoPtr->hdpaColumns));
|
||||||
|
|
||||||
|
@ -8334,8 +8105,6 @@ static BOOL LISTVIEW_SetColumnT(const LISTVIEW_INFO *infoPtr, INT nColumn,
|
||||||
HDITEMW hdi, hdiget;
|
HDITEMW hdi, hdiget;
|
||||||
BOOL bResult;
|
BOOL bResult;
|
||||||
|
|
||||||
TRACE("(nColumn=%d, lpColumn=%s, isW=%d)\n", nColumn, debuglvcolumn_t(lpColumn, isW), isW);
|
|
||||||
|
|
||||||
if (!lpColumn || nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE;
|
if (!lpColumn || nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE;
|
||||||
|
|
||||||
ZeroMemory(&hdi, sizeof(HDITEMW));
|
ZeroMemory(&hdi, sizeof(HDITEMW));
|
||||||
|
@ -9014,7 +8783,6 @@ static BOOL LISTVIEW_SetItemState(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE
|
||||||
lvItem.mask = LVIF_STATE;
|
lvItem.mask = LVIF_STATE;
|
||||||
lvItem.state = item->state;
|
lvItem.state = item->state;
|
||||||
lvItem.stateMask = item->stateMask;
|
lvItem.stateMask = item->stateMask;
|
||||||
TRACE("item=%s\n", debuglvitem_t(&lvItem, TRUE));
|
|
||||||
|
|
||||||
if (nItem == -1)
|
if (nItem == -1)
|
||||||
{
|
{
|
||||||
|
@ -9094,8 +8862,6 @@ static BOOL LISTVIEW_SetItemTextT(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE
|
||||||
lvItem.mask = LVIF_TEXT;
|
lvItem.mask = LVIF_TEXT;
|
||||||
lvItem.pszText = lpLVItem->pszText;
|
lvItem.pszText = lpLVItem->pszText;
|
||||||
lvItem.cchTextMax = lpLVItem->cchTextMax;
|
lvItem.cchTextMax = lpLVItem->cchTextMax;
|
||||||
|
|
||||||
TRACE("(nItem=%d, lpLVItem=%s, isW=%d)\n", nItem, debuglvitem_t(&lvItem, isW), isW);
|
|
||||||
|
|
||||||
return LISTVIEW_SetItemT(infoPtr, &lvItem, isW);
|
return LISTVIEW_SetItemT(infoPtr, &lvItem, isW);
|
||||||
}
|
}
|
||||||
|
@ -9756,9 +9522,6 @@ static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode,
|
||||||
SCROLLINFO scrollInfo;
|
SCROLLINFO scrollInfo;
|
||||||
BOOL is_an_icon;
|
BOOL is_an_icon;
|
||||||
|
|
||||||
TRACE("(nScrollCode=%d(%s), nScrollDiff=%d)\n", nScrollCode,
|
|
||||||
debugscrollcode(nScrollCode), nScrollDiff);
|
|
||||||
|
|
||||||
if (infoPtr->hwndEdit) SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
|
if (infoPtr->hwndEdit) SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
|
||||||
|
|
||||||
scrollInfo.cbSize = sizeof(SCROLLINFO);
|
scrollInfo.cbSize = sizeof(SCROLLINFO);
|
||||||
|
@ -9860,9 +9623,6 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode,
|
||||||
SCROLLINFO scrollInfo;
|
SCROLLINFO scrollInfo;
|
||||||
BOOL is_an_icon;
|
BOOL is_an_icon;
|
||||||
|
|
||||||
TRACE("(nScrollCode=%d(%s), nScrollDiff=%d)\n", nScrollCode,
|
|
||||||
debugscrollcode(nScrollCode), nScrollDiff);
|
|
||||||
|
|
||||||
if (infoPtr->hwndEdit) SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
|
if (infoPtr->hwndEdit) SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
|
||||||
|
|
||||||
scrollInfo.cbSize = sizeof(SCROLLINFO);
|
scrollInfo.cbSize = sizeof(SCROLLINFO);
|
||||||
|
@ -10727,8 +10487,6 @@ static LRESULT LISTVIEW_NotifyFormat(LISTVIEW_INFO *infoPtr, HWND hwndFrom, INT
|
||||||
*/
|
*/
|
||||||
static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc)
|
static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc)
|
||||||
{
|
{
|
||||||
TRACE("(hdc=%p)\n", hdc);
|
|
||||||
|
|
||||||
if (infoPtr->bNoItemMetrics && infoPtr->nItemCount)
|
if (infoPtr->bNoItemMetrics && infoPtr->nItemCount)
|
||||||
{
|
{
|
||||||
infoPtr->bNoItemMetrics = FALSE;
|
infoPtr->bNoItemMetrics = FALSE;
|
||||||
|
@ -10768,8 +10526,6 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc)
|
||||||
*/
|
*/
|
||||||
static inline LRESULT LISTVIEW_WMPaint(LISTVIEW_INFO *infoPtr, HDC hdc)
|
static inline LRESULT LISTVIEW_WMPaint(LISTVIEW_INFO *infoPtr, HDC hdc)
|
||||||
{
|
{
|
||||||
TRACE("(hdc=%p)\n", hdc);
|
|
||||||
|
|
||||||
if (!is_redrawing(infoPtr))
|
if (!is_redrawing(infoPtr))
|
||||||
return DefWindowProcW (infoPtr->hwndSelf, WM_PAINT, (WPARAM)hdc, 0);
|
return DefWindowProcW (infoPtr->hwndSelf, WM_PAINT, (WPARAM)hdc, 0);
|
||||||
|
|
||||||
|
@ -11029,8 +10785,6 @@ static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedra
|
||||||
*/
|
*/
|
||||||
static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL redraw)
|
static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL redraw)
|
||||||
{
|
{
|
||||||
TRACE("old=%d, new=%d\n", infoPtr->redraw, redraw);
|
|
||||||
|
|
||||||
if (infoPtr->redraw == !!redraw)
|
if (infoPtr->redraw == !!redraw)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -11099,8 +10853,6 @@ static LRESULT LISTVIEW_Size(LISTVIEW_INFO *infoPtr, int Width, int Height)
|
||||||
*/
|
*/
|
||||||
static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
|
static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
TRACE("uView=%d, rcList(old)=%s\n", infoPtr->uView, wine_dbgstr_rect(&infoPtr->rcList));
|
|
||||||
|
|
||||||
GetClientRect(infoPtr->hwndSelf, &infoPtr->rcList);
|
GetClientRect(infoPtr->hwndSelf, &infoPtr->rcList);
|
||||||
|
|
||||||
if (infoPtr->uView == LV_VIEW_LIST)
|
if (infoPtr->uView == LV_VIEW_LIST)
|
||||||
|
@ -11359,8 +11111,6 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
|
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
|
||||||
|
|
||||||
TRACE("(hwnd=%p uMsg=%x wParam=%lx lParam=%lx)\n", hwnd, uMsg, wParam, lParam);
|
|
||||||
|
|
||||||
if (!infoPtr && (uMsg != WM_NCCREATE))
|
if (!infoPtr && (uMsg != WM_NCCREATE))
|
||||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
|
|
||||||
|
@ -11918,9 +11668,6 @@ void LISTVIEW_Unregister(void)
|
||||||
*/
|
*/
|
||||||
static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
|
||||||
TRACE("(%p %x %x %lx)\n", infoPtr, HIWORD(wParam), LOWORD(wParam), lParam);
|
|
||||||
|
|
||||||
if (!infoPtr->hwndEdit) return 0;
|
if (!infoPtr->hwndEdit) return 0;
|
||||||
|
|
||||||
switch (HIWORD(wParam))
|
switch (HIWORD(wParam))
|
||||||
|
|
Loading…
Reference in a new issue