am trying to add a List Box to my application, but it never shows up. I use: CListBox listBox; RECT rc = {5,5,180,140}; listBox.Create(WS_CHILD | WS_VISIBLE | LBS_STANDARD,rc,m_pMainWnd,ID_LB_ANIMLISTBOX); listBox.AddString("NUM 1"); listBox.AddString("NUM 2"); listBox.AddString("NUM 3"); listBox.AddString("NUM 4"); listBox.AddString("NUM 5"); listBox.AddString("NUM 6"); Am i missing something or doing something wrong?
I figured out the problem i defined the CListBox in the method and was destroyed at the end of the method.