-
November 17th, 2009, 05:40 AM
#16
Re: change the dilog title at runtime
Originally Posted by florivucu
what exactly do you want to see? the code is too large so....
Create a hwnd of child dialog and SetWindowText part.
-
November 17th, 2009, 05:53 AM
#17
Re: change the dilog title at runtime
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?
-
November 17th, 2009, 06:04 AM
#18
Re: change the dilog title at runtime
ok can you tell here what you want to do?.When you call SetWindowText?
-
November 17th, 2009, 06:16 AM
#19
Re: change the dilog title at runtime
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.
-
November 17th, 2009, 06:56 AM
#20
Re: change the dilog title at runtime
Originally Posted by florivucu
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.
-
November 17th, 2009, 09:08 AM
#21
Re: change the dilog title at runtime
Originally Posted by florivucu
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.
-
November 18th, 2009, 12:51 AM
#22
Re: change the dilog title at runtime
OK. You are very right. I forgot those line. Now it is ok. Thanks. And sorry for my stupid questions.
Tags for this Thread
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
|