Re: Attaching a control to a CDialog
On May 29, 1:57 am, David Lowndes <Dav...@example.invalid> wrote:
So, what's the essence of the code you've written to do this?
For example the all the lists are custom draw
...
Ignoring what your control does, I meant how have you "attached" it -
show some code otherwise we're left to guess what you're doing wrong.
oops i'm sorry. when you asked for the essence i misunderstood
CListCtrl *editCtrl;
editCtrl = (CListCtrl *)GetDlgItem(IDC_BITTIMING_LIST);
CRect rect;
editCtrl->GetWindowRect(&rect);
ScreenToClient(&rect);
m_pBitTimingList = new BitTimingList();//where bittiminglist is an
object derived from jcListControl whose base class is CListCtrl
m_pBitTimingList->Create(WS_CHILD|WS_VISIBLE|WS_BORDER | LVS_REPORT |
LVS_SHOWSELALWAYS, rect, this, IDC_BITTIMING_LIST);
editCtrl->MoveWindow(0, 0, 0, 0);//if i don't do this then the
original list control will be on top of the bit timing list and i
won't be able to see the actual list
m_pBitTimingList->Init();
for(i = 0;i < m_nListCount;i++){
AddItemByIndex(m_pBitTimingList, i, m_pParamList[i]);
}
jayachandran kamaraj