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

Difference between Cclint DC & Cpaint Dc

6 Answers   E Logic,


How can server communicate with more than one client

2 Answers   Invensys,


What is the difference between Synchronous sockets and asynchronous sockets?

2 Answers  


what do you mean by psychic window?

2 Answers   Patni,


Explain in sort What is CTargetObject?

2 Answers  






What is #progma and where it is used?

5 Answers   L&T,


What are the differences between MFC Exception macros and C++ exception keywords?

2 Answers  


How to access document object from view ?

1 Answers  


1)How to create ToolTip in MFC?

2 Answers  


what are the feauters of CObject

4 Answers   Siemens, Wipro,


How to handle command line arguements from simple MFC application ?

2 Answers   TCS,


In VC++ How to transfer between one exe to another exe while running..

5 Answers   Wipro,


Categories