Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing CListCtrl data on CPropertyPage

Status
Not open for further replies.

bluecrush

Programmer
Mar 26, 2004
61
US
I have a CPropertySheet launched from the CMainFrame toolbar containing 3 CPropertyPages. On (CPropertySheet.DoModal()==IDOK) I am trying to access the data in the CListCtrl located on one of my CPropertyPages without success. I can access the data from all the edit boxes from all the pages, but the CListCtrl is eluding me! I get an assert on this line:
Code:
CListCtrl* pListCtrl = (CListCtrl*) iniConfig->counsCdSetPropPg.GetDlgItem(IDC_DEL_COUNS_CODE_LIST);
Does anyone have any thoughts?
 
what does your assert say?

Ion Filipski
1c.bmp
 
If you're calling it from after DoModal has returned, there is no dialog.

No dialog naturally means no controls.

If you need to shuffle data from from the control to the "outside" you need to put the data in a value member of the class.

/Per
[sub]
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."[/sub]
 
Geez...don't I feel stupid! How obvious was that?! Thanks! I'll go hide myself in embarrasment now...[blush]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top