Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/tests/syslink.c:
> }
>
> defwndproc_counter++;
> - ret = DefWindowProcW(hwnd, message, wParam, lParam);
> + switch(message)
You only need to record nml->item.iLink so you don't really need to process the message. So you can move this switch statement before defwndproc_counter++ and let the DefWindowProcW() handle it. Basically, add a switch statement, record nml->item.iLink from WM_NOTIFY, and break on other messages.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3114#note_38452
Fixes regression introduced by 35c8f15bc67f7602438fe0c39a69ff6ddf6b8297
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55215
We already test for an invalid pointer, those tests don't really help.
The test against DrawTextA crashes on windows sometimes, the other test shows that windows probably just overruns the stack variable:
`textheight = DrawTextExA((HDC)0xdeadbeef, (LPSTR)0xdeadbeef, 100, &rect, 0, 0);`
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3276
This MR attempts to bring Wine's handling of `setlocale` and `_create_locale` more in line with the behavior of native >= `msvcr110`. It does this by replacing the usage of the LCID based `GetLocaleInfo` with the sname based `GetLocaleInfoEx`. `GetLocaleInfo` doesn't support neutral locales, even on native, which causes problems with neutral Chinese locales like `zh-Hans` and `zh-Hant`.
It also improves the accuracy of the internal `__lc_locale_name_func`, as tests indicate that it returns `LOCALE_SNAME`s instead of ISO 639 language names.
Potential future improvements:
* Modifying the generation of the `pclmap` and `pcumap` fields of `threadlocaleinfostruct` to work on WCHARs.
* I've done some changes to `__thread_data` which make it not fully match native, I'll submit a follow up which fixes this.
--
v4: make_unicode: rename Hong Kong SAR China to Hong Kong SAR to match native behavior.
msvcrt: Use GetLocaleInfoEx to compare locale info.
msvcrt: Remap synonyms to snames.
msvcrt: Skip exhaustive locale search with valid snames.
msvcrt: Convert locale_to_LCID to snames.
msvcrt: Use snames instead of LCIDs in create_locinfo.
msvcr120/tests: Check ___lc_locale_name_func with neutral Chinese locales.
msvcr110/tests: Add tests for new setlocale behaviors.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3050