Quote:
Load image can handle bitmaps, cursors and icons, not .jpg, .gif or .png files.
That's the main reason why I don't get any picture to show at my display. I will find a new way. I have done everything right with parsing and compiling. It's just the cored disadvantage why gdiplus don't load straight the way png, jpgs or gifs. Now I know why you can only use BMP Files for loading and then converting in jpgs, png's and much more. my idea was to load png, jpgs via directly input.
Quote:
...Before discussing the code itself, there is a caveat with GDI+ that must be addressed. With JPG, some TIFF and other formats, the original image information must be available at all times. In other words, if you open a bitmap using Bitmap::FromFile, you cannot delete or otherwise change that file while the image is open. This same restriction applies to CGdiPlusBitmapResource. (My testing found that PNG and BMP files don't seem to follow this generalization, though I don't know if this is standard behavior or just a fluke with my file set.)...
It takes only three days to find this error behaviour. Good to know and learn much more about gdiplus. If there is any new success in this direction I will show my results.
Quote:
After a bit of testing and several errors, due mostly to the horrible GDI+ documentation, I came up with working code. After a night of rest, I decided to encapsulate the code in a simple class to ensure memory got freed. The result were two classes: "CGdiPlusBitmap" and "CGdiPlusBitmapResource".
If I load one of my first example with steer powerbasic created dialog (included gdiplus feature) I can load this PNG, JPG, GIF image I wished to have but not for thinbasic side. This lacked hole I will find to solve.