So when Im adding new items so they axceed visible capabilities of my ListView (report), Scrolls are appearing VScroll is ok with me but i have to decress size of my column to avoid HScroll.
I need to know how to capture this moment when scroll is appearing or number of items axceed my ListView
I need to know how to capture this moment when scroll is appearing or number of items axceed my ListView
Hi AceEmbler,
Well, since the size of your listview must change to accomodate the scrollbar I would check for a WM_WINDOWPOSCHANGING message that will inform you that the scrollbar is about to inserted and a WM_WINDOWPOSCHANGED to tell you that it has been done.
Well, since the size of your listview must change to accomodate the scrollbar I would check for a WM_WINDOWPOSCHANGING message that will inform you that the scrollbar is about to inserted and a WM_WINDOWPOSCHANGED to tell you that it has been done.
Are you shure about this ???
btw my listview is not changing it's size while scroll is appearing, becouse it's appearing inside the ListView rect.
btw my listview is not changing it's size while scroll is appearing, becouse it's appearing inside the ListView rect.
Hi, everyone.
@AceEmbler:
The listview's scroll bars will be within it's window rect, but outside of it's client rect. That's because it's part of the non-client area of a window, like caption bars, menus, etc.
If you are talking about the main window's scroll bars, then you should accomodate the listview's window rect to the main window's client rect.
Hope it helps. :)
@AceEmbler:
The listview's scroll bars will be within it's window rect, but outside of it's client rect. That's because it's part of the non-client area of a window, like caption bars, menus, etc.
If you are talking about the main window's scroll bars, then you should accomodate the listview's window rect to the main window's client rect.
Hope it helps. :)
Are you shure about this ???
btw my listview is not changing it's size while scroll is appearing, becouse it's appearing inside the ListView rect.
Try it, it works. QvasiModo has it exactly right, the control is resized by Windows so that it's text does not continue underneath the scrollbar, this is true for any control that uses a scroll bar BTW. The following 4 messages are sent when a scrollbar is added to a control by Windows:
WM_WINDOWPOSCHANGING
WM_NCCALCSIZE
WM_WINDOWPOSCHANGED
WM_SIZE
I have to subclass to use this message as i see, is this true ??
Yes,
The messages are sent to the parent of the scrollbar, after all it is the one being resized.
The messages are sent to the parent of the scrollbar, after all it is the one being resized.