Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- 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 31c8f5efe6..343c330969 100644 --- a/dlls/comctl32/pager.c +++ b/dlls/comctl32/pager.c @@ -1061,6 +1061,14 @@ static UINT PAGER_GetAnsiNtfCode(UINT code) case HDN_ITEMCLICKW: return HDN_ITEMCLICKA; case HDN_ITEMDBLCLICKW: return HDN_ITEMDBLCLICKA; case HDN_TRACKW: return HDN_TRACKA; + /* 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; @@ -1275,6 +1283,34 @@ static LRESULT PAGER_Notify(PAGER_INFO *infoPtr, NMHDR *hdr) return PAGER_SendConvertedNotify(infoPtr, hdr, &nmhddi->mask, HDI_TEXT, &nmhddi->pszText, &nmhddi->cchTextMax, SEND_EMPTY_IF_NULL | CONVERT_SEND | CONVERT_RECEIVE); } + /* 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 a2a6f9cd37..05fbc55fa2 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -790,6 +790,29 @@ static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, L notify_generic_text_handler(&nmhddi->pszText, &nmhddi->cchTextMax); 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: { @@ -1108,6 +1131,10 @@ static void test_wm_notify(void) static NMDATETIMESTRINGW nmdts; /* Header */ static NMHDDISPINFOW nmhddi; + /* List View */ + static NMLVDISPINFOW nmlvdi; + static NMLVGETINFOTIPW nmlvgit; + static NMLVFINDITEMW nmlvfi; /* Tool Bar */ static NMTBRESTORE nmtbr; static NMTBSAVE nmtbs; @@ -1133,6 +1160,21 @@ static void test_wm_notify(void) /* Header */ {&nmhddi, sizeof(nmhddi), &nmhddi.mask, HDI_TEXT, &nmhddi.pszText, &nmhddi.cchTextMax, HDN_GETDISPINFOW, HDN_GETDISPINFOA, SEND_EMPTY_IF_NULL | CONVERT_SEND | CONVERT_RECEIVE}, + /* 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},