LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Help! I need a Bitmap in a Distribution Kit

This is a problem, possibly a bug, at least something not well documented.

Early in my Main(), I create a bitmap and write it to a canvas on the main panel:


// ---------------------------------------------------------------------------
// Load the Hoist Sketch bit map from the JPEG file, obtain an ID,
// Write the bitmap to the Main Panel Canvas
// ---------------------------------------------------------------------------
GetBitmapFromFile ("Hoist_Sketch.jpg", &Hoist_SketchID);
CanvasDrawBitmap (panelHandle, PANEL_CANVAS, Hoist_SketchID, VAL_ENTIRE_OBJECT, MakeRect(40,30, VAL_KEEP_SAME_SIZE, VAL_KEEP_SAME_SIZE));


This works perfectly in Debug mode, and in Release mode.

When I create a Distribution Kit, install the kit, and launch the application, there is no image presented in the canvas.

Does this Hoist_Sketch.jpg file have to be manually placed somewhere in the installed application directories.

Help!
0 Kudos
Message 1 of 4
(3,154 Views)
Followup --

I put the .jpg file in the installed directory, and it appears on the canvas when the installed app is launched.

Why do I have to do this manually? Creating the Distribution Kit should do this automatically.

NI, please fix this!!
0 Kudos
Message 2 of 4
(3,151 Views)
Hendra,

Dunno if this helps, but you can include the .jpg file into your distribution kit, it is a one time manual setup, but after that the .jpg will be distributed with the rest of your application. Go to Build-Create Distribution Kit on your file menu. Once the distribution kit screen is open you can add a new group of files that contains any .jpg files you wish (alternatively you could edit the existing CVI default file group, but if you are making shortcuts, one will be made to the .jpg file). Just create the group and click 'Edit Group' and you can navigate for the .jpg file you wish to be included in the distribution kit. If the file is in a relative path to the .cws then it should always be included in the distribution kit. If not, and your .cws file moves, you will see an error that the file couldn't be added to the distribution kit.
Message 3 of 4
(3,145 Views)
I tip my virtual hat to you DaveC! It worked perfectly, and indeed, I only need to do it once.

Many thanks.... Gary
0 Kudos
Message 4 of 4
(3,142 Views)