CListCtrl and CTabCtrl help required
-
I have compiled a MFC dialog-based application. The GUI is organizedas follows: The application window is dialog-based and has the following on it: 1) Main dialog window has on it i)CListCtrl-1, ii)CTabCtrl-1 2) CTabCtrl-1 has on it 2 property pages. One of the property pages has a CListCtrl-2. (The other property page is irrelevant here) At the GUI-level, I want to achieve the following: "When an item in CListCtrl-1 is selected, the CListCtrl-2 should get populated with some values" What I am unable to do: I have added a message handler for CListCtrl-1 on the NM_CLICK event, but don't know how to get a pointer to CListCtrl-2 from the Main Dialog. I have sufficient experience with VC++ - any help even outlining a technique of doing this (although code is always welcome) will be highly appreciated. Thank you very much for the time you will taking out to help me on this.
-
I have compiled a MFC dialog-based application. The GUI is organizedas follows: The application window is dialog-based and has the following on it: 1) Main dialog window has on it i)CListCtrl-1, ii)CTabCtrl-1 2) CTabCtrl-1 has on it 2 property pages. One of the property pages has a CListCtrl-2. (The other property page is irrelevant here) At the GUI-level, I want to achieve the following: "When an item in CListCtrl-1 is selected, the CListCtrl-2 should get populated with some values" What I am unable to do: I have added a message handler for CListCtrl-1 on the NM_CLICK event, but don't know how to get a pointer to CListCtrl-2 from the Main Dialog. I have sufficient experience with VC++ - any help even outlining a technique of doing this (although code is always welcome) will be highly appreciated. Thank you very much for the time you will taking out to help me on this.
-
Thanks for the reply. GetDlgItem is not of any help, directly, but yes it has some role to play. Meanwhile, I have worked out the solution and it seems to work well. Here's what I did: a) I am persisting the pointers to all dialogs that the TabCtrl-1 will hold. (Simply putting them in a "CDialog *m_tabPages[4];" variable) b) Now I am simply doing the following CListCtrl * ptrToCListCtrl-2=(CListCtrl * )(TabCtrl.m_tabPages[0]->GetDlgItem(CListCtrl-2)); Thanks for the initiative, once again.
-
Thanks for the reply. GetDlgItem is not of any help, directly, but yes it has some role to play. Meanwhile, I have worked out the solution and it seems to work well. Here's what I did: a) I am persisting the pointers to all dialogs that the TabCtrl-1 will hold. (Simply putting them in a "CDialog *m_tabPages[4];" variable) b) Now I am simply doing the following CListCtrl * ptrToCListCtrl-2=(CListCtrl * )(TabCtrl.m_tabPages[0]->GetDlgItem(CListCtrl-2)); Thanks for the initiative, once again.
-
richiehere wrote: CListCtrl * ptrToCListCtrl-2=(CListCtrl * )(TabCtrl.m_tabPages[0]->GetDlgItem(CListCtrl-2));
ptrToCListCtrl-2
???? what is this supposed to be ?
TOXCCT >>> GEII power
[toxcct][VisualCalc]Apologies for the confusion. I meant "pointer to the 2nd list control"!