Click to See Complete Forum and Search --> : Sizing a listview control on a dialog bar


xyjiang
May 17th, 1999, 11:43 AM
I place a listview control on a dialog bar. I want the listview control sizing with the window. The codes are as following:

m_wndDlgBar.SetWindowPos(NULL, 3, 3, cx - 6, cy - 15, SWP_NOZORDER);
pListCtrl->SetWindowPos(NULL, 3, 3, cx - 30, cy - 30, SWP_NOZORDER);

But in this way, the scroll bar of the listview control is disappear. Why? :( How to do it properly?

May 19th, 1999, 08:16 AM
have a similar problem. I know the reason, but not the solution:
SetWindowPos sets the position of the MAIN window (e.g. dialog) relative to screen coordinates,
but the sub-window (listviewer a.o.) relative to the client area of the main window.
The same problem applies when you use MoveWindow.
I don't know how to retrieve the coordinates of a control relative to the client area.
If you find it out, please send me a hint:
trzedkow@debis.com

bye,
tadek