Hello there, I can't find a solution and I am a beginner, so maybe it's a trivial thing to ask.
CVI 2013 SP2
Bitmaps to load: 24bit
In the .uir I added via right click menu: Picture , Classic-Style Controls --> picture , Canvas
I generated the code via .uir --> Code --> Generate --> All code
I want to load a .bmp file by clicking a button and then draw this .bmp in the panel, a picture element or whatever.
Loading seems to work:
memset(cUserSelection,0,1000);
FileSelectPopup ("D:\\...", "*.bmp", "*.*", "Select Image To Load",0,0,0,1,1,cUserSelection);
GetBitmapFromFile(cUserSelection, &iBitmapID);
SetCtrlBitmap(iPanelHandle,PANEL_PICTURE, 0, iBitmapID);
CanvasDrawBitmap(iPanelHandle,PANEL_CANVAS,iBitmapID,VAL_ENTIRE_OBJECT,VAL_ENTIRE_OBJECT);
DiscardBitmap (iBitmapID);
That are the things I did find in the documentation, and old projects. These are called by clicking on a button. And I think the image is loaded, as I get proper values using GetBitmapData for verification. But the PANEL_PICTURE and PANEL_CANVAS stay empty. No error or warning whatsoever.
I hope you can push me in the right direction to get it to draw the bitmaps.
EDIT: the bitmaps are in 24bit according to IrfanView (an image display tool), but GetBitmapData says it is of 32bit depth
Edit2: The bitmaps are around 12mb of size