I have used this code to implement flat scroll bars in two ways however I run into problems and I am looking for advice.
Hi,
I was thinking about implementing flatscrollbars but never got round to implement the Flatscrollbars itself. I thought about doig it like this: Subclass the window with flatscrollbars, with the Subclassing functions that I have implemented recently. Implement GetScrollBarInfo and use it to get all of the scrollbar properties like thump position and size, arrow sizes etc. Store an internal list of the System metricies (just like native) and then draw the control. All of the functions that pertain to flat scroll bars will just call their user counterparts and the same goes for messages.
nog.
On October 4, 2002 03:40 am, György 'Nog' Jeney wrote:
I was thinking about implementing flatscrollbars but never got round to implement the Flatscrollbars itself. I thought about doig it like this: Subclass the window with flatscrollbars, with the Subclassing functions that I have implemented recently.
For proper DLL separation, this seems the way to go.
Implement GetScrollBarInfo and use it to get all of the scrollbar properties like thump position and size, arrow sizes etc. Store an internal list of the System metricies (just like native) and then draw the control.
I've lost you here. You change the Flat Scroll bar properties with FlatSB_SetScrollProp, which is in commctrl, and then you have to be able to retrieve them through GetScrollBarInfo, which is USER, without GetScrollBarInfo knowing anything about FlatSBs...
But when all is said, and done, we have this (from the MSDN):
Note: Flat scroll bar APIs are implemented in Comctl32.dll versions 4.71 through 5.82. Comctl32.dll versions 6.00 and higher do not support flat scroll bars.
Let's just drop support for the buggers (that is, forward the FlagSB_* calls to the standard calls, like we do now, but remove the FIXME's).
On Fri, Oct 04, 2002 at 09:51:10AM -0400, Dimitrie O. Paun wrote:
Note: Flat scroll bar APIs are implemented in Comctl32.dll versions 4.71 through 5.82. Comctl32.dll versions 6.00 and higher do not support flat scroll bars.
Let's just drop support for the buggers (that is, forward the FlagSB_* calls to the standard calls, like we do now, but remove the FIXME's).
You might want to keep in mind this little snippet I once wrote in a patch mail: :: AddWeb 5 Professional (free download) uses QT_Thunk() to thunk down to :: GetFreeSystemResources16(), and due to that crash and an exception :: handler it refused to load with a "not enough resources" error. :: This patch fixes it almost completely (except for crashes probably :: due to unimplemented flat scrollbars). :: Wonderfully complex program ! :)