Closed adipose closed 1 month ago
I'm sure it would probably work to drop "A" one. It is technically a different message number though. Old recommendation was to trap both because either could occur.
I don't know that it still happens but it should be harmless to check both.
I believe older OSes would send "A" version even if the app was built for unicode.
"A" messages could be expected if explicitly calling "A" functions.
There is history of it being necessary to check both. It's not a question of how the app was compiled but rather what messages Windows is sending to the app. Here are some old pages that discuss it:
https://forums.codeguru.com/showthread.php?442477-Hdn_endtrack
https://www.codeproject.com/Articles/58354/How-To-Place-Two-Controls-in-the-Same-View
https://www.codeguru.com/cplusplus/catching-header-messages-in-a-clistview/
Thanks for the links. The 3rd link in the last two phrases tells why catching "A" messages in Unicode builds for NT-kind of OS would be quite pointless.
However, commenting out case LVM_INSERTITEMA
to have only case LVM_INSERTITEMW
increases my executable by 0.5 KB - will keep both then. :)
Probably notification description should be one line, using HDN_ENDTRACK. And I wonder what could be if the previous code was changed to
*pResult = 1;
.