Click here to Skip to main content
15,903,175 members

Comments by Avtem (Top 58 by date)

Avtem 10-Jul-23 9:38am View    
i think it's maybe some problem with my environment, because the OP contains the faulty code in its entirety
Avtem 10-Jul-23 7:01am View    
Yes, i will probably do that. Thank you for your help!
Avtem 10-Jul-23 5:04am View    
It seems that ListView is the only control that has problems with WM_SETREDRAW. If you replace first parameter with "Button" or "Edit" it works as expected and GetLastError() always returns 0.
Avtem 10-Jul-23 4:54am View    
Oh, that's what you meant. The target OS is Windows 7 x32/64 bit - sorry i should have mentioned that in the OP.
GetPropW(lv, L"SysSetRedraw") always returns 0.
i also noticed that WM_SETREDRAW never removes the WS_VISIBLE style as it should do.
Other control types lose WS_VISIBLE style after WM_SETREDRAW though.
Avtem 9-Jul-23 14:22pm View    
1. After CreateWindow call Error code is always 0.
Error code 1400 is set after sending WM_SETREDRAW message *only* when visual styles are on. When they are off - Error code is 0 and WM_SETREDRAW suppresses window redraws
2. By *enabling* WM_SETREDRAW you mean SendMessage(lv, WM_SETREDRAW, false, 0);?