This example calls WinQuerySessionTitle to retrieve the application's title, and then sets the title bar of the frame window to that title.

#define INCL_WINMESSAGEMGR
#define INCL_WINWINDOWMGR
#include <OS2.H>

HAB  hab;
HWND hwndFrame, hwndClient;
CHAR szTitle[MAXNAMEL + 1];

WinQuerySessionTitle(hab,
                     0,
                     szTitle,
                     sizeof(szTitle));

hwndFrame = WinQueryWindow(hwndClient,
                           QW_PARENT); /* get handle of parent, */
                                          /* which is frame window. */
WinSetWindowText(hwndFrame, szTitle);


[Back] [Next]