CListViewCtrl stupid question 
Author Message
 CListViewCtrl stupid question

Hi,
    In my main window, i have a toolbar and a status bar, in the middle i'd
like to have a listview(LVS_REPORT style) is there a way to make the
listview autosizable in there? I'm starting playing with MFC so i dont
really know what to look for...  the only thing i found was to get my main
window rect and try to size the listview between my status bar and my
toolbar.. Any help/code samples very appreciated.

Thanks

Somilth



Sat, 18 Aug 2001 03:00:00 GMT  
 CListViewCtrl stupid question
Somilith,

Quote:
>    In my main window, i have a toolbar and a status bar, in the middle i'd
>like to have a listview(LVS_REPORT style) is there a way to make the
>listview autosizable in there? I'm starting playing with mfc so i dont
>really know what to look for...  the only thing i found was to get my main
>window rect and try to size the listview between my status bar and my
>toolbar.. Any help/code samples very appreciated.

If you use CListView, I don't think that you'll need to worry; MFC
should handle it for you.  If you are using your own CView-derived
class with an embedded CListCtrl, override CMyView::OnSize like this:

void CMyView::OnSize(UINT nType, int cx, int cy)
{
        CView::OnSize(nType, cx, cy);

        if (::IsWindow(m_List))
                m_List.MoveWindow(0, 0, cx, cy, TRUE);

Quote:
}//OnSize

Note that m_List is your list control variable.

Chip

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"Make it idiot-proof and someone will make a better idiot."
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Remove NO and SPAM from my email address.



Sat, 25 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie question ( certainly stupid question)

2. Stupid Stupid Bug with _spawnl

3. CListViewCtrl and DragAndDrop

4. WTL CListViewCtrl

5. Change Image in CListViewCtrl

6. Superclassing CListViewCtrl (ATL)

7. Flicker during resize in CListViewCtrl

8. OnPaint override on CListViewCtrl?

9. WTL & CListViewCtrl

10. Deleting Selected items in CListViewCtrl

11. CListViewCtrl

12. How to get FullRowSelect to select whole row in CListViewCtrl

 

 
Powered by phpBB® Forum Software