This function loads a string from a resource.

#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HAB        hab;         /*  Anchor-block handle. */
HMODULE    Resource;    /*  Resource identity containing the string. */
ULONG      idString;    /*  String identifier. */
LONG       lBufferMax;  /*  Size of buffer. */
PSZ        pszBuffer;   /*  Buffer that is to receive the string. */
LONG       lLength;     /*  The length of the string returned. */

lLength = WinLoadString(hab, Resource, idString,
            lBufferMax, pszBuffer);


[Back] [Next]