SetSimpleDialogDisplayOption

Declaration

Delphi (DLL)
function SetSimpleDialogDisplayOption(Option:Integer; WPARAM: integer ):integer;register;

C/C++ (DLL)
_stdcall int SOPAD_SetSimpleDialogDisplayOption(int Option, int WParam);

ActiveX
    HRESULT _stdcall SetSimpleDialogDisplayOption([in] long Option, [in] long WParam, [out, retval] long* Result);

Description

with SetSimpleDialogDisplayOption you can clear, redraw or reorganize the Device simpleDialog display

Arguments

Option: DWORD

  • Option=0 : clear display
  • Option=1 : update display
  • Option=2 : copy actual frame buffer in to the shadow buffer
  • Option=3 : go to  idle mode

WParam:DWORD

 

optionwparamdescription
0
  1. 0x1 clears the current framebuffer
  2. 0x2 clears the shadow framebuffer
  3. 0x3 clears both framebuffers
framebuffer to fill: 1 byte
1not used yet 
2not used yet 
3not used yet 

 

Return value

SetSimpleDialogDisplayOption 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);

//  Draw a text into the shadow framebuffer
 
SigDev.SetSimpleDialogResourceFont('arial20.sof', '', 0);
SigDev.SetSimpleDialogResourceText(EditText.Text, 400, 280, EditText.Font.Color , IfThen(IsTextBgColorTransparent ,EditText.Font.Color, EditText.Color), 0); 
//  Update Screen (with all images which are loaded to shadow framebuffer)
int displayOptionStatus = SigDev.SetSimpleDialogDisplayOption(1, 0);
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);
 
//  Draw a text into the shadow framebuffer
 
SigDev.SetSimpleDialogResourceFont("arial16.sof", "", 0);
SigDev.SetSimpleDialogResourceText("Hello world!", 300, 200, int.Parse("00FF00FF", System.Globalization.NumberStyles.HexNumber), int.Parse("00FF00FF", System.Globalization.NumberStyles.HexNumber), 0);
 
//  Update Screen (with all images which are loaded to shadow framebuffer)
SigDev.SetSimpleDialogDisplayOption(1, 0);
 

 

See also

SetSimpleDialogResourceImage

SetSimpleDialogResourceText

SetSimpleDialogResourceFont

Â