Author Topic: ListView Scrollbar messages  (Read 782 times)

Raymond Couzens

  • Newbie
  • *
  • Posts: 5
    • View Profile
ListView Scrollbar messages
« on: March 16, 2023, 07:39:48 am »
Hi, is there a way of getting the vertical and horizontal scroll bar position change events from a ListView control with EZGUI5?  I think the appropriate Win32 API messages are WM_VSCROLL and WM_HSCROLL but how to get these messages from EZGUI?  Thanks.

Raymond Couzens

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: ListView Scrollbar messages
« Reply #1 on: March 16, 2023, 08:09:13 am »
After a little more reading I found the answer! Needed to sub-class the ListView control which then gave me access to all the Windows Messages for it.

Chris Boss

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
Re: ListView Scrollbar messages
« Reply #2 on: March 16, 2023, 11:03:47 am »
If you select the %EZ_Subclass event for a control in the designer (or use EZ_Subclass command in hand written code) you can subclass a control and it will now get the %EZ_Subclass event.

There are a number of support commands which make working with %EZ_Subclass event easier such as:

EZ_SubClassDefault
EZ_GetSubClass
EZ_SetSubClassRVal

EZGUI actually subclasses all new controls (to provide some features not normally available), but each control has a subclass mode it is in and this determine what events get through.

EZGUI has multiple subclass modes internally, including the Visual Designer mode ( enables drag and drop and resizing of controls with the mouse).



Raymond Couzens

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: ListView Scrollbar messages
« Reply #3 on: March 16, 2023, 11:23:35 am »
Thanks Chris, but I'd already worked out what was needed.