clsid2 / mpc-hc

Media Player Classic
GNU General Public License v3.0
11.5k stars 502 forks source link

fix artifact when 'show windows contents while dragging' is disabled #3136

Closed adipose closed 1 month ago

irwir commented 1 month ago

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;.

adipose commented 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.

irwir commented 1 month ago

"A" messages could be expected if explicitly calling "A" functions.

adipose commented 1 month ago

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/

irwir commented 1 month ago

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. :)