I do not know how to create a hwnd of the dialog. Can you tell me? In the cosntructor of the dialog I have the Create (MyClass::IDD, pParent). Creating another pointer to the class would not generate the error I've got?
In the MainWindow (in the menu) I'm calling the same dialog for two different menus:Estimare and Calcul Tui Manual. Depending on what I choose I want to set the title of the dialog according to the menu. I've done that with SetWindowText but this command changes the name of the main window called "Calipso - bla bla". I tried to use a parameter (&ttitle)in the caption of the dialog but I could not set it properly. In the OnEstim function (Mainframe menu) I have
.....
litera = "E";
{
...... new CTuiDataInputDlg(this); // the dialog class
this->SetWindowText("Estimare"); this is not working
........ }
.......
In the OnInitDialog of the class I have those line with SetWindowText.
In the MainWindow (in the menu) I'm calling the same dialog for two different menus:Estimare and Calcul Tui Manual. Depending on what I choose I want to set the title of the dialog according to the menu. I've done that with SetWindowText but this command changes the name of the main window called "Calipso - bla bla". I tried to use a parameter (&ttitle)in the caption of the dialog but I could not set it properly. In the OnEstim function (Mainframe menu) I have
.....
litera = "E";
{
...... new CTuiDataInputDlg(this); // the dialog class
this->SetWindowText("Estimare"); this is not working
........ }
.......
In the OnInitDialog of the class I have those line with SetWindowText.
Before or after the call to CDialog::OnInitDialog()? If it's before, move it after.
litera = "E" Are you sure you want to use an assignment operator there? You should provide more information when asked. It seems you have other problems too.
In the MainWindow (in the menu) I'm calling the same dialog for two different menus:Estimare and Calcul Tui Manual. Depending on what I choose I want to set the title of the dialog according to the menu. I've done that with SetWindowText but this command changes the name of the main window called "Calipso - bla bla". I tried to use a parameter (&ttitle)in the caption of the dialog but I could not set it properly. In the OnEstim function (Mainframe menu) I have
.....
litera = "E";
{
...... new CTuiDataInputDlg(this); // the dialog class
this->SetWindowText("Estimare"); this is not working
........ }
.......
In the OnInitDialog of the class I have those line with SetWindowText.
WHERE IS THIS CODE FROM? I see you create a new dialog and set "this" as its parent. But then you call SetWindowText() for "this", which is the parent. Is this "this" the main frame? Then of course you change the title of the main frame, for god's sake.
Bookmarks