I just need some help i have not find any proper answer on web pages.They are some what same but not exact what i am looking for.
So here is the problem.define in steps.I am using dialog based sample application and just to explain you the proper problem.
template design part
Steps 1. I have created a dialog base application on which i have created two control from tool box in the same order other wise u will need to edit .rc file first create
Picture control then create
List control button.
Step 2. On picture control property page set
Color = White and
type = rectangle
Step 3 On list control property page change
view = Report
Code part
Step 4. Create variable associated to list control. for example
CListCtrl m_ctlListCtrl;
and do respective changes in constructor and DoDataExchange(...).
Step 5. Now go to function
Classname::OnInitDialog(..)
and write following code to add column and selection property.
m_ctlListCtrl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE,0,LVS_EX_FULLROWSELECT);
m_ctlListCtrl.InsertColumn(0, _T("Roll"), LVCFMT_CENTER , 110);
m_ctlListCtrl.InsertColumn(0, _T("Name"), LVCFMT_CENTER , 110);
Step 6: Double click on button control to go to the double click function. To add some rows in the list control.
CString strTemp;
strTemp.Format(_T("ROLL_1"));
m_ctlListCtrl.InsertItem(m_nRowcntr,strTemp);
strTemp.Format(_T("NAME_1"));
m_ctlListCtrl.SetItemText(m_nRowcntr,1,strTemp);
m_nRowcntr++;
the above code is just simply adding multiple rows with same data.row counter can be neglected because issue is not related to this.
Problem
Step 7: Execute the program and add some rows by clicking on the button.
Step 8: Select single row now Press
ALT + TAB this will change the window. now again bring back the execution window and see the output. I cannot figure out solution.
Well i am not new in c++ but i am new to MFC so please advise or help me..
thank you in advance :)
Help me guys..