Update Dialog
-
Hi everyone. I have Dialog based app with listbox on it. In the second modal dialog i'm entering some data to editbox. Can anybody show me how to add string with text from editbox(from modal dlg) to the lisbox on main dlg? Thanks.
-
Hi everyone. I have Dialog based app with listbox on it. In the second modal dialog i'm entering some data to editbox. Can anybody show me how to add string with text from editbox(from modal dlg) to the lisbox on main dlg? Thanks.
ok, object oriented way: Write a function that takes a string and add it to ur listbox in the main dialo Pass a pointer to the other dialog of ur main dialog and call the function To pass the pointer u can do it when constructing the dialog as parameter to its constrctor, and there u cast it to the main dialog class pointer and store it in a member in the second dialog ( its type pointer to main dialog ) Hope this help Papa Murex Co. while (TRUE) Papa.WillLove ( Bebe ) ;
-
Hi everyone. I have Dialog based app with listbox on it. In the second modal dialog i'm entering some data to editbox. Can anybody show me how to add string with text from editbox(from modal dlg) to the lisbox on main dlg? Thanks.
You have at least two options: 1) The dialog with edit box has pointer listbox in parent dialog. It uses CListBox::AddString to add string 2) main dialog invokes secondary dialog with edit box. Secondary dialog maps string variable to edit box. When CEditDlg::DoModal returns IDOK, then main dialog adds string using CListBox::AddString Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
-
ok, object oriented way: Write a function that takes a string and add it to ur listbox in the main dialo Pass a pointer to the other dialog of ur main dialog and call the function To pass the pointer u can do it when constructing the dialog as parameter to its constrctor, and there u cast it to the main dialog class pointer and store it in a member in the second dialog ( its type pointer to main dialog ) Hope this help Papa Murex Co. while (TRUE) Papa.WillLove ( Bebe ) ;
Can I use standart: CMainDlg: CListBox list; CModalDlg: CMainDlg* mDl mDl->list.AddString("blablabla"); ?? such thing make no errors, but didn't work ...