- Offizieller Beitrag
Hallo
Ich hab mich mal wieder an den G15 kram rangesetzt und versuche jetzt mit der eigentlichen SDK auf das LCD der G15 zuzugreifen.
Klappt auch super, bis auf das anzeigen eines Bitmaps.
Hier mal aus der Dokumentation der SDK:
Spoiler anzeigen
ZitatCodetypedef struct { DWORD Format; } lgLcdBitmapHeader; typedef struct { lgLcdBitmapHeader hdr; BYTE pixels[LGLCD_BMP_WIDTH*LGLCD_BMP_HEIGHT]; } lgLcdBitmap160x43x1;
Format
Specifies the format of the structure following the header. Currently, only LGLCD_BMP_FORMAT_160x43x1 is supported.
pixels
Contains the display bitmap with 160x43 pixels. Every byte represents one pixel, with >=128 being “on” and <128 being “off”.
Also müsste die Struct so aussehen:
[autoit]$vStructBitmapHeader = DllStructCreate("dword;")
DllStructSetData($vStructBitmapHeader,1,$LGLCD_BMP_FORMAT_160x43x1)
$vStructBitmap160x43x1 = DllStructCreate("ptr;byte["&160*43&"]")
DllStructSetData($vStructBitmap160x43x1,1,DllStructGetPtr($vStructBitmapHeader))
For $X = 0 To 159
For $Y = 0 To 42
DllStructSetData($vStructBitmap160x43x1,2, _Iif(Mod($X+$Y,2) = 0,255,0),(($Y * 160) + $X) + 1)
Next
Next
Dll gibt immer "Daten mit diesem Typ werden nicht unterstützt." (bzw 1630) zurück.
Dll wird so aufgerufen:
DllCall($hWrap,"int","lgLcdUpdateBitmap","int",$iDevice,"ptr",DllStructGetPtr($vStructBitmap160x43x1),"dword", BitOR(0x80000000,128)*-1)
[/autoit]Hat jemand eine Idee?
Mfg Spider
Edit: Hier nochmal die Doku von dem Aufruf der Funktion:
Spoiler anzeigen
ZitatAlles anzeigenCodeDWORD WINAPI lgLcdUpdateBitmap( IN int device, IN const lgLcdBitmapHeader *bitmap, IN DWORD priority);
Parameters
device
Specifies the device handle for which to update the display.
bitmap
Specifies a pointer to a bitmap header structure. See comments for details.
priority
Specifies a priority hint for this screen update, as well as whether the update should take place synchronously or asynchronously.