When i used this code in CDialog class:
Code:
BOOL OnInitDialog()
{
CListBox wndListBox;
wndListBox.Attach (GetDlgItem (IDC_LIST1)->m_hWnd);
wndListBox.AddString (_T ("One"));
wndListBox.AddString (_T ("Two"));
wndListBox.AddString (_T ("Three"));
wndListBox.Detach ();
return true;
}
Why didn't the code below do? (class Dlg::public CDialog)
Code:
void CallDialog()
{
Dlg d1(IDD_DLTEST1);
d1.DoModal();
}

Last edited by shabbir; 15Nov2006 at 11:14.. Reason: Code formating.