Author |
Topic |
|
ccoats
18 Posts |
Posted - 20 Jul 2006 : 16:31:48
|
I'm having a problem loading an image from a file. I'm using a VGX board, CE 4.20.14.
Apparently, LoadImage() does not work with loading images from files on CE. I've seen references to SHLoadImageFile, but my aygshell.h does not contain this (from the SDK downloaded on this website), so that's out.
What I'd really like to use is this code:
--------- HBITMAP bitmap = NULL; HRESULT res;
res = CoInitializeEx(NULL, COINIT_MULTITHREADED); if ((res == S_OK) || (res == S_FALSE)) { IImagingFactory* factory=NULL;
if (CoCreateInstance(CLSID_ImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_IImagingFactory, (void**)&factory) == S_OK) ----------
This code compiles fine for the VGX 4.20.14 but CoCreateInstance always fails - it seems like CSLID_ImagingFactory is not registered, although if I try this on a PocketPC PDA, it works fine.
Any ideas? I need to be able to get an HBITMAP structure from a file (.bmp, .jpg, .gif, whatever - I'll take anything at this point) but I'm not having any luck. If I put an image file on the device, Internet Explorer can load it, so obviously there must be SOME sort of API for this.
Thanks.
|
|
ctacke
877 Posts |
|
akidder
1519 Posts |
Posted - 21 Jul 2006 : 11:17:55
|
#VGX_DDraw
I'd like to also make sure that you're using the DirectDraw-enabled display driver on the VGX.
We have two versions of the driver on the board: one that supports the display rotation features of the SM501 and the other that works with DirectX (which does not know about the hardware rotation).
When using DirectDraw, enable display driver as follows:
[HKEY_LOCAL_MACHINE\System\GDI\Drivers] "Display"="DDI_VGX.dll" |
The driver that does not support DirectDraw is "DDI_VGXR.dll".
I think you are using a rotated display in your application (portrait display on landscape hardware). You'll need to use the regular GWES APIs to load bitmaps in your system.
|
|
|
|
Topic |
|
|
|