How to update windows title bar dynamically?

Answers were Sorted based on User's Feedback



How to update windows title bar dynamically?..

Answer / vasanth

using SetWindowText()function we can change text of
specified window dynamically

Is This Answer Correct ?    13 Yes 5 No

How to update windows title bar dynamically?..

Answer / muralee krishnan n

After updating the window text using SetWindowText funcion,
we have to call RedrawWindow funcion.

Is This Answer Correct ?    4 Yes 2 No

How to update windows title bar dynamically?..

Answer / vivek chauhan

** using SetWindowText()function in dialog.
** using settitle() function in property sheet dialog.

Is This Answer Correct ?    1 Yes 0 No

How to update windows title bar dynamically?..

Answer / anup

If title bar of window needs to be changed dynamically, SetWindowText() will do the job, or use SendMessage() and send message WM_SETTEXT to the particular window

Is This Answer Correct ?    2 Yes 1 No

How to update windows title bar dynamically?..

Answer / debarun biswas

Use CWnd::SetWindowTextW(name of the Dialog);
"name of the dialog" should CString type.
for ex: CWnd::SetWindowTextW(_T("My Dialog"))

Is This Answer Correct ?    0 Yes 0 No

How to update windows title bar dynamically?..

Answer / ctharam

Ex1:-
BOOL CSample1_button_name_changingDlg::OnInitDialog()
{
CDialog::OnInitDialog();

SetWindowText(L"Changing the Caption of Dialogbox at Runtime");

return TRUE; // return TRUE unless you set the focus to a control
}

Ex2:-
BOOL CSample1_button_name_changingDlg::OnInitDialog()
{
CDialog::OnInitDialog();

SetWindowTextW(L"Changing the Caption of Dialogbox at Runtime");

return TRUE; // return TRUE unless you set the focus to a control
}

Is This Answer Correct ?    0 Yes 0 No

How to update windows title bar dynamically?..

Answer / me

get the object of CMainfrm class and call the SetWindowText
function to chage the title of the window.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More MFC Interview Questions

if i modified data in 1 view how does the other view knows

2 Answers   Siemens,


If i derive a new class from CObject what are the basic features my derived wil get ?

4 Answers   Microsoft,


Given two processes, how can they share memory?

2 Answers   Microsoft,


Whats is DDX & DDV in MFC?

1 Answers   HCL,


How many types of combo box are their

2 Answers   Aaditya Info Solutions, E Logic,






How many types of dialog box are their

10 Answers   Honeywell,


How to convert the content of buffer into lower case character.

3 Answers   E Logic,


Hi can anyone explain about the synchronization objects types and where we are using in the code.

1 Answers  


How do I create a dialog box in mfc?

0 Answers  


1)why we cant create more than one instance of the class Derived from CWinApp

5 Answers   Alstom,


Psychic Window Technique

2 Answers   E Logic, Wild Net,


what is the size of a process

2 Answers   E Logic, IBM,


Categories