Sergey,
Thanks for your time !
I just recieved some eC++ code from the OEM so I guess that it is possible
to set the contrast, maybe I did something wrong in my C# code ?
(I'm not familiar with eC++ coding and they are not familiar with C# code
)
It would be great if you can help me to solve this problem,
Thanks again Sergey !!
Peter.
#define QUERYESCSUPPORT 8
#define CONTRASTCOMMAND 6149
#define CONTRAST_CMD_GET 0
#define CONTRAST_CMD_SET 1
#define CONTRAST_CMD_INCREASE 2
#define CONTRAST_CMD_DECREASE 3
#define CONTRAST_CMD_DEFAULT 4
struct ContrastCmdInputParm {
int command;
int parm;
};
DWORD GetContrast( void )
{
ContrastCmdInputParm szContrast;
HDC hdcLCD;
DWORD dwContrast = -1;
int i;
// Do we have support for get mode info
i = CONTRASTCOMMAND;
hdcLCD = CreateDC(NULL, NULL, NULL, NULL);
if (hdcLCD)
{
if (ExtEscape(hdcLCD, QUERYESCSUPPORT, 4, (LPCSTR) &i, 0, 0))
{
szContrast.command = CONTRAST_CMD_GET;
szContrast.parm = 0;
dwContrast = ExtEscape( hdcLCD, CONTRASTCOMMAND, sizeof(struct
ContrastCmdInputParm), (char *)&szContrast, 0, NULL );
}
}
return dwContrast;
}
// dwContrast Must be a value from 0 to 256
void SetContrast( DWORD dwContrast)
{
ContrastCmdInputParm szContrast;
HDC hdcLCD = CreateDC(NULL, NULL, NULL, NULL);
szContrast.command = CONTRAST_CMD_SET;
szContrast.parm = dwContrast;
dwContrast = ExtEscape( hdcLCD, CONTRASTCOMMAND, sizeof(struct
ContrastCmdInputParm), (char *)&szContrast, 0, NULL );
}