Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- v2: Supersede 151653,151654.
dlls/comctl32/pager.c | 36 ++++++++++++++++++++++++++++++++++++ dlls/comctl32/tests/pager.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+)
diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c index 605141b9ab..8a061e3149 100644 --- a/dlls/comctl32/pager.c +++ b/dlls/comctl32/pager.c @@ -1051,6 +1051,14 @@ static UINT PAGER_GetAnsiNtfCode(UINT code) case DTN_FORMATQUERYW: return DTN_FORMATQUERYA; case DTN_USERSTRINGW: return DTN_USERSTRINGA; case DTN_WMKEYDOWNW: return DTN_WMKEYDOWNA; + /* List View */ + case LVN_BEGINLABELEDITW: return LVN_BEGINLABELEDITA; + case LVN_ENDLABELEDITW: return LVN_ENDLABELEDITA; + case LVN_GETDISPINFOW: return LVN_GETDISPINFOA; + case LVN_GETINFOTIPW: return LVN_GETINFOTIPA; + case LVN_INCREMENTALSEARCHW: return LVN_INCREMENTALSEARCHA; + case LVN_ODFINDITEMW: return LVN_ODFINDITEMA; + case LVN_SETDISPINFOW: return LVN_SETDISPINFOA; /* Toolbar */ case TBN_GETBUTTONINFOW: return TBN_GETBUTTONINFOA; case TBN_GETINFOTIPW: return TBN_GETINFOTIPA; @@ -1231,6 +1239,34 @@ static LRESULT PAGER_Notify(PAGER_INFO *infoPtr, NMHDR *hdr) NMDATETIMESTRINGW *nmdts = (NMDATETIMESTRINGW *)hdr; return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, (WCHAR **)&nmdts->pszUserString, NULL, CONVERT_SEND); } + /* List View */ + case LVN_BEGINLABELEDITW: + case LVN_ENDLABELEDITW: + case LVN_SETDISPINFOW: + { + NMLVDISPINFOW *nmlvdi = (NMLVDISPINFOW *)hdr; + return PAGER_SendConvertedNotify(infoPtr, hdr, &nmlvdi->item.mask, LVIF_TEXT, &nmlvdi->item.pszText, + &nmlvdi->item.cchTextMax, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE); + } + case LVN_GETDISPINFOW: + { + NMLVDISPINFOW *nmlvdi = (NMLVDISPINFOW *)hdr; + return PAGER_SendConvertedNotify(infoPtr, hdr, &nmlvdi->item.mask, LVIF_TEXT, &nmlvdi->item.pszText, + &nmlvdi->item.cchTextMax, CONVERT_RECEIVE); + } + case LVN_GETINFOTIPW: + { + NMLVGETINFOTIPW *nmlvgit = (NMLVGETINFOTIPW *)hdr; + return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, &nmlvgit->pszText, &nmlvgit->cchTextMax, + CONVERT_SEND | CONVERT_RECEIVE); + } + case LVN_INCREMENTALSEARCHW: + case LVN_ODFINDITEMW: + { + NMLVFINDITEMW *nmlvfi = (NMLVFINDITEMW *)hdr; + return PAGER_SendConvertedNotify(infoPtr, hdr, &nmlvfi->lvfi.flags, LVFI_STRING | LVFI_SUBSTRING, + (WCHAR **)&nmlvfi->lvfi.psz, NULL, CONVERT_SEND); + } /* Toolbar */ case TBN_GETBUTTONINFOW: { diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index 8993118711..2f5d8d2768 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -751,6 +751,29 @@ static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, L notify_generic_text_handler((CHAR **)&nmdts->pszUserString, NULL); break; } + /* List View */ + case LVN_BEGINLABELEDITA: + case LVN_ENDLABELEDITA: + case LVN_GETDISPINFOA: + case LVN_SETDISPINFOA: + { + NMLVDISPINFOA *nmlvdi = (NMLVDISPINFOA *)hdr; + notify_generic_text_handler(&nmlvdi->item.pszText, &nmlvdi->item.cchTextMax); + break; + } + case LVN_GETINFOTIPA: + { + NMLVGETINFOTIPA *nmlvgit = (NMLVGETINFOTIPA *)hdr; + notify_generic_text_handler(&nmlvgit->pszText, &nmlvgit->cchTextMax); + break; + } + case LVN_INCREMENTALSEARCHA: + case LVN_ODFINDITEMA: + { + NMLVFINDITEMA *nmlvfi = (NMLVFINDITEMA *)hdr; + notify_generic_text_handler((CHAR **)&nmlvfi->lvfi.psz, NULL); + break; + } /* Toolbar */ case TBN_SAVE: { @@ -1029,6 +1052,10 @@ static void test_wm_notify(void) static NMDATETIMEFORMATQUERYW nmdtfq; static NMDATETIMEWMKEYDOWNW nmdtkd; static NMDATETIMESTRINGW nmdts; + /* List View */ + static NMLVDISPINFOW nmlvdi; + static NMLVGETINFOTIPW nmlvgit; + static NMLVFINDITEMW nmlvfi; /* Tool Bar */ static NMTBRESTORE nmtbr; static NMTBSAVE nmtbs; @@ -1051,6 +1078,21 @@ static void test_wm_notify(void) CONVERT_SEND}, {&nmdts, sizeof(nmdts), NULL, 0, (WCHAR **)&nmdts.pszUserString, NULL, DTN_USERSTRINGW, DTN_USERSTRINGA, CONVERT_SEND}, + /* List View */ + {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_STRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL, + LVN_INCREMENTALSEARCHW, LVN_INCREMENTALSEARCHA, CONVERT_SEND}, + {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_SUBSTRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL, LVN_ODFINDITEMW, + LVN_ODFINDITEMA, CONVERT_SEND}, + {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax, + LVN_BEGINLABELEDITW, LVN_BEGINLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE}, + {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax, + LVN_ENDLABELEDITW, LVN_ENDLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE}, + {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax, + LVN_GETDISPINFOW, LVN_GETDISPINFOA, DONT_CONVERT_SEND | CONVERT_RECEIVE}, + {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax, + LVN_SETDISPINFOW, LVN_SETDISPINFOA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE}, + {&nmlvgit, sizeof(nmlvgit), NULL, 0, &nmlvgit.pszText, &nmlvgit.cchTextMax, LVN_GETINFOTIPW, LVN_GETINFOTIPA, + CONVERT_SEND | CONVERT_RECEIVE}, /* Tool Bar */ {&nmtbs, sizeof(nmtbs), NULL, 0, (WCHAR **)&nmtbs.tbButton.iString, NULL, TBN_SAVE, TBN_SAVE, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},