How to get the text of edit ctrl from first dialog box in second dialog box?
-
in dialog base application i used two modal dialog boxes in first dialog box i using two text boxes where i entered username and password and do modal the second dialog where i want to used this values in second dialog box but when i used getdlgitemtext() and getwindowtext() from second dialog box it giving the blank values can any one tell me how to get the values of edit box in second dialog box class Thanks
-
in dialog base application i used two modal dialog boxes in first dialog box i using two text boxes where i entered username and password and do modal the second dialog where i want to used this values in second dialog box but when i used getdlgitemtext() and getwindowtext() from second dialog box it giving the blank values can any one tell me how to get the values of edit box in second dialog box class Thanks
Before calling DoModal on the second dialog, get the values from the edits in the first dialog, put them in member variabels of the second dialog class and call DoModal. In the second dialog's OnInitDialog you can the get the values from the member variables. There is no way to directly get the values from the first dialog while in the second dialog by using GetDlgItemText() and likes - the edit controls are simply not controls of the second dialog! Cheers Steen. "To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"