This example shows how to get the title-bar window text.
#define INCL_WINWINDOWMGR #define INCL_DOSMEMMGR #include <OS2.H> HWND hwndFrame; PSZ szTitle; ULONG cbBytes; cbBytes = WinQueryWindowTextLength(hwndFrame); DosAllocMem((PPVOID)szTitle, (ULONG)cbBytes, PAG_READ | PAG_WRITE | PAG_COMMIT); WinQueryWindowText(hwndFrame, sizeof(szTitle), szTitle);