A light-weight C++ object model framework Windows API Tool Kit
修訂 | 564c2419097d9f87af15a45032611062b30d884a (tree) |
---|---|
時間 | 2013-08-20 06:04:44 |
作者 | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Add simplified support for changing window captions.
@@ -1,5 +1,11 @@ | ||
1 | 1 | 2013-08-19 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 2 | |
3 | + Add simplified support for changing window captions. | |
4 | + | |
5 | + * wtklite.h (ChangeCaption): New static inline function; implement it. | |
6 | + | |
7 | +2013-08-19 Keith Marshall <keithmarshall@users.sourceforge.net> | |
8 | + | |
3 | 9 | Add facility for control of child window placement. |
4 | 10 | |
5 | 11 | * wtkalign.h: New file; it declares the API for... |
@@ -320,6 +320,14 @@ BEGIN_NAMESPACE( WTK ) | ||
320 | 320 | */ |
321 | 321 | EXTERN_C int RaiseAppWindow( HINSTANCE, unsigned int ); |
322 | 322 | |
323 | + static __inline__ | |
324 | + int ChangeCaption( HWND window, const char *caption ) | |
325 | + { | |
326 | + /* Helper to change the title bar caption on a specified window. | |
327 | + */ | |
328 | + return SendMessage( window, WM_SETTEXT, 0, (LPARAM)(caption) ); | |
329 | + } | |
330 | + | |
323 | 331 | END_NAMESPACE( WTK ) |
324 | 332 | |
325 | 333 | #endif /* ! WTKLITE_H: $RCSfile$: end of file */ |