LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to use variable in Filename.

static char label ;

...

GetLabelFromIndex (panel, PANEL_LISTBOX, value, label) ;

DisplayImageFile (panelHandle, PANEL_2_PICTURE, label) ; // file not found..

How can i add .jpg in label?

Message Edited by -Juha- on 06-16-2006 03:53 AM

0 Kudos
Message 1 of 4
(3,170 Views)

Hello,

you could use the formatting function: Fmt (label, "%s[a]<.jpg"). The [a] format modifier stands for 'append', as described in the Formatting help files.

0 Kudos
Message 2 of 4
(3,165 Views)
Much simpler:
strcat (label, ".jpg");


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 4
(3,159 Views)
However, you'll probably want label to be an array of char rather than a single char.
--
Martin
Certified CVI Developer
0 Kudos
Message 4 of 4
(3,148 Views)