![]() | Programming Guide | ![]() |
Finds a message given its number
#include <smerror.h>char *sm_msgfind(int msg_id);
msg_id- Specifies the message to get.
- · A pointer to the message.
sm_msgfindfinds the message specified bynumberand returns the message string. Unlike sm_msg_get, this function returnsNULLif the message number is not found.Message numbers for Panther messages are defined in
smerror.h.
#include <smdefs.h>
#include <smerror.h>
/* print out message #4 */
sprintf(buf, "The message reads: %s\n", sm_msgfind
(SM_BADKEY));
sm_fquiet_err(0, buf);