UINT GetAtomName(atm, lpszBuffer, cbBuffer) | |||||
ATOM atm; | /* atom identifying character string | */ | |||
LPSTR lpszBuffer; | /* address of buffer for atom string | */ | |||
int cbBuffer; | /* size of buffer, */ |
The GetAtomName function retrieves a copy of the character string associated with the specified local atom.
atm
Specifies the local atom that identifies the character string to be retrieved.
lpszBuffer
Points to the buffer for the character string.
cbBuffer
Specifies the maximum size, in bytes, of the buffer.
The return value specifies the number of bytes copied to the buffer, if the function is successful.
The string returned for an integer atom (an atom created by the MAKEINTATOM macro) will be a null-terminated string, where the first character is a pound sign (#) and the remaining characters make up the UINT used in MAKEINTATOM.
The following example uses the GetAtomName function to retrieve the character string associated with a local atom:
char szBuf[80];
GetAtomName(atTest, szBuf, sizeof(szBuf));
MessageBox(hwnd, szBuf, "GetAtomName", MB_OK);