This function loads a message from a resource, copies the message to the specified buffer, and appends a terminating null character.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ HMODULE hmodMod; /* Module handle. */ ULONG ulId; /* Message identifier. */ LONG lcchMax; /* Specifies the size of buffer. */ PSZ pBuffer; /* Points to the buffer that receives the message. */ LONG lLength; /* The length of the string returned. */ lLength = WinLoadMessage(hab, hmodMod, ulId, lcchMax, pBuffer);