SetSimpleDialogResourceFont

SetSimpleDialogResourceFont

Declaration

Delphi (DLL)
function SetSimpleDialogResourceFont(ResourceName: ShortString;   ResourceFilePath: PAnsiChar; WPARAM: integer): integer;register;

C/C++ (DLL)
_stdcall int SOPAD_SetSimpleDialogResourceScript(char *ResourceName, char *ScriptFilePath, int WParam);

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

Description

Load or upload a font on/to the device. The default resources of the Device contain the following font options.

Font

Size

Resource Name

Font

Size

Resource Name

Arial

8

arial8.sof

10

arial10.sof

12

arial12.sof

14

arial14.sof

16

arial16.sof

18

arial18.sof

20

arial20.sof

22

arial22.sof

24

arial24.sof

Times new Roman

8

tnr8.sof

10

tnr10.sof

12

tnr12.sof

14

tnr14.sof

16

tnr16.sof

18

tnr18.sof

20

tnr20.sof

22

tnr22.sof

24

tnr24.sof


Arguments

ResourceName: String; 

e.g.  "arail10.sof"   (note: Font File must reside on device)

ResourceFilePath: string

a Path to the SOF file on host system. Font File will be uploaded to device and immediately activated, but it will not be saved permanently.

WParam:DWORD

not used yet

Return value

SetSimpleDialogResourceFont 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

// Upload Images to the Device (to shadow framebuffer, which means they not dirctly visible) SigDev.SetSimpleDialogResourceImage("", RessourcePath + "background.png", 0, 0, 0); // Select a font resource int fontStatus = SigDev.SetSimpleDialogResourceFont("arial14.sof", "", 0); // Set Text, Placement and Colour SigDev.SetSimpleDialogResourceText("This is a Test", 100, 300, 0, 0, 0); // Update Screen (with all images which are loaded to shadow framebuffer) int displayOptionStatus = SigDev.SetSimpleDialogDisplayOption(1, 0);
// Upload Images to the Device (to shadow framebuffer, which means they not dirctly visible) SigDev.SetSimpleDialogResourceImage('', RessourcePath + 'background.png', 0, 0, 0); // Select a font resource SigDev.SetSimpleDialogResourceFont('arial14.sof', '', 0); // Set Text, Placement and black Text Colour and transparent Background color SigDev.SetSimpleDialogResourceText('This is a Test', 100, 300, clBlack , clBlack, 0); // Update Screen (with all images/texts which are loaded to shadow framebuffer) SigDev.SetSimpleDialogDisplayOption(1, 0);

 

See also

SetSimpleDialogDisplayOption

SetSimpleDialogResourceImage

SetSimpleDialogResourceText