ACR89U-A1 – Reference Manual
Version 1.04
www.acs.com.hk
Page 48 of 57
Example:
4.2.4.4. AS_SetLcdDisplayMessage
This function displays a string of characters using the ACR89 built-in font library. The string will be
displayed horizontally from the current cursor position. ACR89 will automatically calculate the
absolute coordinates from the character position and character size and the cursor will be moved
accordingly. When the text reaches the end of a display line, the text will be wrapped.
AS_STATUS AS_DECL AS_SetLcdDisplayMessage (
IN INT nDevId,
IN PLCDMESSAGE pLcdMessage,
OUT PDISPLAYSTATUS pDisplayStatus);
Parameters:
nDevId
[in] Handle returned by a previous call to
AS_Open
.
pLcdMessage
[in] Pointer to a
LCDMESSAGE
structure that specifies the alphanumeric text to
be displayed on LCD. See also
Section 4.1.2.6
for more information about the
LCDMESSAGE
structure.
pDisplayStatus
[out] Pointer to a
DISPLAYSTATUS
structure containing the cursor position after
displaying the message. See also
Section 4.1.3.4
for more information about the
DISPLAYSTATUS
structure.
Return Values:
AS_STATUS
This functions returns different values depending on whether it succeeds or fails.
AS_STATUS.DllError
contains the status as returned by the DLL
.
AS_STATUS.W32Error
contains the Win32 error code associated with the DLL
error, if any. See also
Appendix A
for the possible return codes.
Example:
LCDGRAPHICS lcdGrafx;
DISPLAYSTATUS lcdStatus;
AS_STATUS status;
//display a bitmap file called “MyLogo.bmp”.
//assumed is that a connection has already been established.
lcdGrafx.szBitmapFile = “MyLogo.bmp”;
status = AS_SetLcdDisplayGraphics(nDid, &lcdGrafx, &lcdStatus);
const char szText[]=”Welcome to the ACR89”;
LCDMESSAGE lcdMsg;
DISPLAYSTATUS lcdStatus;
AS_STATUS status;
//display the above text
//assumed is that a connection has already been established
lcdMsg.cbCharCoding = 0x00;
lcdMsg.pMessage = szText;
lcdMsg.wMessageLen = strlen(szText);
status = AS_SetLcdDisplayMessage(nDid, &lcdMsg, &lcdStatus);