Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Declaration

Delphi (DLL)
function SetSimpleDialogResourceImage(ResourceName: ShortString; ResourceFilePath: PAnsiChar; XPos,YPos: Integer; WPARAM: integer ):integer;register;

C/C++ (DLL)

__stdcall int SOPAD_SetSimpleDialogResourceFont(char *ResourceName, char * ResourceFilePath, int WParam);

ActiveX
HRESULT _stdcall SetSimpleDialogResourceImage([in] BSTR ResourceName, [in] BSTR ResourceFilePath, [in] long XPos, [in] long YPos, [in] long WParam, [out, retval] long* Result);

Description

draws a image(BMP, JPG or PNG) at position X,Y on the device. The images needs to placed in the visual area of the display. The display resolution can be found in the following table. 

Pad TypeResolution
duraSign Pad Brilliance

800x480

duraSign Pad 10.0

1024x600

(in Portrait Mode 600x1024)

Arguments

ResourceName: String; 

e.g.  defaultdialog.ui   (a resource file that is allready on device )

ResourceFilePath: String

resource file an the host machine (will be uploaded to pad, but will not be saved )

XPos: integer

X Position of the left upper corner of the display position

YPos: integer

Y Position of the left upper corner of the display position

WParam:DWORD

wparam=0 : the image will be drawn to the shadow framebuffer.

wparam=1 : the image will be drawn to the current framebuffer.


Return value

SetSimpleDialogResourceImage returns (SOPAD_ERROR_SUCCESS = 0) if it was possible to cache the settings.
Otherwise the function returns the appropriate error code. You can get extended error code with the help of GetSOPadError call.

Possible error codes are listed below: Driver error codes

Samples

C#
//  Upload Images to the Device (to shadow framebuffer, which means they not directly visible)

SigDev.SetSimpleDialogResourceImage("", RessourcePath + "background-payment.png", 0, 0, 0);
SigDev.SetSimpleDialogResourceImage("", RessourcePath + "checkbox.png", 90, 164, 0);
SigDev.SetSimpleDialogResourceImage("", RessourcePath + "button-big-accept.png", 600, 340, 0);
SigDev.SetSimpleDialogResourceImage("", RessourcePath + "button-big-cancel.png", 600, 400, 0);
 
//  Update Screen (with all images which are loaded to shadow framebuffer)
int displayOptionStatus = SigDev.SetSimpleDialogDisplayOption(1, 0);
 
 
/* Alternativ you can also directly draw a new image on the screen, for example if you just want to update a Button, Checkbox, Radiobutton... */
SigDev.SetSimpleDialogResourceImage("", RessourcePath + "checkbox-active.png", 90, 164, 1);
Delphi
//  Upload Images to the Device (to shadow framebuffer, which means they not directly visible)

SigDev.SetSimpleDialogResourceImage('', RessourcePath + 'background-payment.png', 0, 0, 0);
SigDev.SetSimpleDialogResourceImage('', RessourcePath + 'checkbox.png', 125, 205, 0);
SigDev.SetSimpleDialogResourceImage('', RessourcePath + 'button-accept.png', 750, 410, 0);
SigDev.SetSimpleDialogResourceImage('', RessourcePath + 'button-cancel.png', 750, 480, 0);
 
//  Update Screen (with all images which are loaded to shadow framebuffer)
SigDev.SetSimpleDialogDisplayOption(1, 0);
 
 
// Alternativ you can also directly draw a new image on the screen, for example if you just want to update a Button, Checkbox, Radiobutton... 
SigDev.SetSimpleDialogResourceImage('', RessourcePath + 'checkbox.png', 90, 164, 1);

 

See also

SetSimpleDialogDisplayOption

SetSimpleDialogResourceText

SetSimpleDialogResourceFont

 

 

 

  • No labels