tags:

views:

115

answers:

1
const char* title = "old title";
HWND hwnd = FindWindow(title, title);
SetWindowText(hwnd, "new title");

This sets the title bar to "new title", but the caption in the task bar is still "old title". How do I set both?

If relevant, this is being done in a DLL loaded in the process which owns the window.

+1  A: 

This should set both, window title and task bar item. Your call

HWND hwnd = FindWindow(title, title);

does not look good, first parameter has to be class name (look at FindWindow). It looks to me that problem is somewhere else but I may be wrong.

Robert Vuković