WinSetTitleAndIcon
Appearance
Prototype
APIRET16 APIENTRY16 WinSetTitleAndIcon (PSZ szTitle, PSZ szIconPath);
Linkage Definition
IMPORTS WinSetTitleAndIcon = PMSHAPI.97
Parameters
- szTitle (PSZ) - input
- New window title text.
- szIconPath (PSZ) - input
- New window icon file name (full path).
Comments
This function is for VIO programs, and allows them to set their containing window's title text and icon. I have found that the Workplace Shell has a tendency to override this function.
Example Code
#define INCL_BASE
#include <os2.h>
#include <conio.h>
#include <stdlib.h>
APIRET16 APIENTRY16 WinSetTitleAndIcon ( PSZ szTitle, PSZ szIconPath ) ;
void main ( void ) {
char IconPath [ _MAX_PATH ] ;
_fullpath ( IconPath, "WinSetTitleAndIcon.ico", sizeof(IconPath) ) ;
WinSetTitleAndIcon ( "Test of WinSetTitleAndIcon", IconPath ) ;
getch ( ) ;
}
Linkage definitions
NAME WinSetTitleAndIcon WINDOWCOMPAT DESCRIPTION "Sample program to illustrate WinSetTitleAndIcon" PROTMODE EXETYPE OS2 IMPORTS WINSETTITLEANDICON = PMSHAPI.97