|
-
July 9th, 1999, 04:20 PM
#1
List Box
I am calling a dialog box from MFC project. When I double click the listbox itam it will no appear in the Edit window. When I single
click on the edit box the selection will then display. When I do the box as a Dialog Box App. only it work fine. I would also like to
know of an easy way to add an entry in the edit window to the list box, If some one enters a number they can click on add button and
it will add the listing to the list box.
BOOL CPhone_Book::OnInitDialog()
{
CDialog::OnInitDialog();
m_number.AddString("(972)530-6666");
m_number.AddString("(214)777-5855");
m_number.AddString("(903)530-9146");
m_number.AddString("(555)897-9652");
m_number.AddString("(214)625-9874");
m_number.AddString("(903)369-9871");
m_number.AddString("(972)901-6652");
m_number.AddString("(972)530-9146");
m_number.SetCurSel(0);
return TRUE;
void CPhone_Book::OnDblclkListNum()
{
m_number.GetText(m_number.GetCurSel(), m_new_num);
UpdateData (FALSE);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|