"smooth scrolling" is actually quite the opposite from smooth. The more advanced ListView and TreeView controls don't do smooth scrolling, neither does the shell 🤔
WS_EX_COMPOSITED seems to do the job, but it doesn't work on classes with CS_PARENTDC.
This makes a copy of the listbox class without the stlye:
crap_listbox_wndproc just calls cc_listbox_wndproc. The original hinstance/wndproc can be used instead, but CS_GLOBALCLASS has to also be specified in that case. I have no idea if htinstance/wndproc can mismatch. Original style for ListBox is CS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS
This actually works, but doing this makes double-clicking broken for some reason. Double-clicking in WinAPI never actually worked for me, outside of common controls, so I have no idea why. Maybe something is wrong with window styles? 🤔
I also have no idea what are the implications of messing around with WS_EX_COMPOSITED and CS_PARENTDC, because winapi is underdocumented. :tannedcirno:
there's also SPI_SETLISTBOXSMOOTHSCROLLING, but that's systemwide. Maybe we should just not do this and let user disable it if they want to? 🤔
"smooth scrolling" is actually quite the opposite from smooth. The more advanced ListView and TreeView controls don't do smooth scrolling, neither does the shell 🤔
WS_EX_COMPOSITED
seems to do the job, but it doesn't work on classes withCS_PARENTDC
.This makes a copy of the listbox class without the stlye:
crap_listbox_wndproc
just callscc_listbox_wndproc
. The original hinstance/wndproc can be used instead, butCS_GLOBALCLASS
has to also be specified in that case. I have no idea if htinstance/wndproc can mismatch. Original style for ListBox isCS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS
This actually works, but doing this makes double-clicking broken for some reason. Double-clicking in WinAPI never actually worked for me, outside of common controls, so I have no idea why. Maybe something is wrong with window styles? 🤔
I also have no idea what are the implications of messing around with
WS_EX_COMPOSITED
andCS_PARENTDC
, because winapi is underdocumented. :tannedcirno:there's also
SPI_SETLISTBOXSMOOTHSCROLLING
, but that's systemwide. Maybe we should just not do this and let user disable it if they want to? 🤔