• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

How To make program to use My Own ListCtrl??

I add a ListCtrl(IDC_LIST) in FormView with resource editer ,now I create a Myself ListCtrl : CMyListCtrl,

How can I make Program to use CMyListCtrl to replace IDC_LIST??
(IF I USE ListView how can i do it so??)
0
recyclezhou
Asked:
recyclezhou
  • 2
1 Solution
 
recyclezhouAuthor Commented:
Edited text of question.
0
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

I assume the form view class is CMyFormView.
Go to class wizard and go to the member variables, add the variable named m_ctrlList of type control-CListCtrl to the Id IDC_LIST. Then say Ok.

Then open MyFormView.h, include the header as
#include "MyListCtrl.h"

Then replace the line
CListCtrl m_ctrlList; to
CMyListCtrl m_ctrlList;

That will work.

Hope this helps.
VinExpert


0
 
Vinayak KumbarSr Program ManagerCommented:

If have List View then also same procedure will help U.

Try it out.
VinExpert
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now