Because SetTitle is such a simple program, I am also posting the source code. The program is written in C++ and is literally less than 20 lines long. If you want to compile the program yourself, you will need both the C++ file and the DEF file which tells Windows which functions to export.
|
| (You do not need this source code to use SetTitle or to understand how it works.) |
|
| ---------------------------------------------settitle.cpp--------------------------------------------- |
|
| extern "C" int APIENTRY DllMain( HINSTANCE, DWORD, LPVOID ) |
|
| extern "C" int WINAPI SetTitle( LPSTR pszCaption ) |
|
| HWND hWnd = GetForegroundWindow(); |
|
| if( IsWindow( hWnd ) && pszCaption != NULL ) |
|
| SetWindowText( hWnd, pszCaption ); |
|
| ---------------------------------------------settitle.def--------------------------------------------- |
LIBRARY SetTitle
DESCRIPTION 'Change active window title'
SECTIONS
EXPORTS
SetTitle @1
|
| ------------------------------------------------------------------------------------------------------ |
|