My own Dialog Window and its edit boxes
-
Hi! I've built a dialog window in Visual C++ 6 with some edit boxes and buttons and I'd want these edit boxes to show some default texts. In main window I call this dialog window just clicking a button and I know I can get the information written in these edit boxes here in main code, but I don't know how could I show something in them when I click the button in main window, before than I could write anything myself. I think I have to use UpdateData but I haven't OnInitDialog() as in main code so I don't know where should I write it. In my own dialog window I only have some code that works when I click a button there. Any idea? Thank you in advance!
-
Hi! I've built a dialog window in Visual C++ 6 with some edit boxes and buttons and I'd want these edit boxes to show some default texts. In main window I call this dialog window just clicking a button and I know I can get the information written in these edit boxes here in main code, but I don't know how could I show something in them when I click the button in main window, before than I could write anything myself. I think I have to use UpdateData but I haven't OnInitDialog() as in main code so I don't know where should I write it. In my own dialog window I only have some code that works when I click a button there. Any idea? Thank you in advance!
map some dialog class member variables to the edit controls in ur dialog box ... in ur main code that shows the dialog box do something like this: CMyDialog myDialog; myDialog.myVar1 = "hello world"; myDialog.myVar2 = "hello world again"; myDialog.DoModal(); etc etc
-
map some dialog class member variables to the edit controls in ur dialog box ... in ur main code that shows the dialog box do something like this: CMyDialog myDialog; myDialog.myVar1 = "hello world"; myDialog.myVar2 = "hello world again"; myDialog.DoModal(); etc etc