CListCtrl as child window of a SDI app without MFC Doc/View 
Author Message
 CListCtrl as child window of a SDI app without MFC Doc/View

Hi,

I would like to know how to use a CListCtrl as a child window in an SDI
applicatin without MFC Doc/View support.

I tryed to derivate the CChildWnd from CListCtrl instead of the wizard
default CWnd and call create function on CMainFrame::OnCreate() like this:

 m_list.Create
  (
  WS_BORDER | WS_CHILD | WS_VISIBLE | LVS_REPORT | LVS_SINGLESEL |
LVS_SHOWSELALWAYS,
  CRect(0, 0, 0, 0),  this, 0x100
  );

Off course I changed CMainFrame::OnSize() to make the CListCtrl to fit the
whole client area.

However, when I call CListCtrl functions to create columns and itens, they
does not work. The client area is filled in but no column is drawn.

Can somebody help me to implement this?

Thanks a lot for any assistance,

Vinicius



Mon, 12 Dec 2005 12:22:19 GMT  
 CListCtrl as child window of a SDI app without MFC Doc/View
Problem solved.

Instead of derivate CChildView from CListCtrl, I let it as the default, I
mean CWnd and added a CListCtrl member in CChildView.
The whole initialization as made in CChildView  instead of CMainFrame.

Vinicius



Quote:
> Hi,

> I would like to know how to use a CListCtrl as a child window in an SDI
> applicatin without MFC Doc/View support.

> I tryed to derivate the CChildWnd from CListCtrl instead of the wizard
> default CWnd and call create function on CMainFrame::OnCreate() like this:

>  m_list.Create
>   (
>   WS_BORDER | WS_CHILD | WS_VISIBLE | LVS_REPORT | LVS_SINGLESEL |
> LVS_SHOWSELALWAYS,
>   CRect(0, 0, 0, 0),  this, 0x100
>   );

> Off course I changed CMainFrame::OnSize() to make the CListCtrl to fit the
> whole client area.

> However, when I call CListCtrl functions to create columns and itens, they
> does not work. The client area is filled in but no column is drawn.

> Can somebody help me to implement this?

> Thanks a lot for any assistance,

> Vinicius



Mon, 12 Dec 2005 16:52:45 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MDI Child windows without Doc/View Format

2. Changing your title in a MFC doc/view SDI app

3. MFC MDI Doc/View initial child window creation

4. SDI without doc/view support ???

5. SDI without Doc/View, dialog as childwindow

6. SDI without doc/view support

7. listcontrol in a SDI non doc/view app

8. how to convert MFC doc/view SDI application to ActiveX Control

9. non doc/view app - access to CListCtrl member of ChildView

10. toolbar/statusbar; MFC without doc/view

11. MFC without doc/view

12. MFC Form without Doc/View support?

 

 
Powered by phpBB® Forum Software