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
Posted on 2003-10-30 06:12:04 by AceEmbler
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.
Posted on 2003-10-30 11:24:38 by donkey
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.
Posted on 2003-10-30 17:14:17 by AceEmbler
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. :)
Posted on 2003-10-30 17:28:01 by QvasiModo

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
Posted on 2003-10-30 19:45:18 by donkey
I have to subclass to use this message as i see, is this true ??
Posted on 2003-10-31 11:52:53 by AceEmbler
Yes,

The messages are sent to the parent of the scrollbar, after all it is the one being resized.
Posted on 2003-10-31 12:47:08 by donkey