Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting a .jpg picture

How would I put a .jpg picture on my user interface? I've tried to insert a "Picture" from the controls and then copy and paste the picture I want, but that doesn't work. I'm pretty sure it's straightforward, but I can't find a way to do it. I just want to put my logo on the user interface. The logo doesn't need to be added during run time, I want it there permanently. Thanks.
0 Kudos
Message 1 of 3
(3,349 Views)
Unfortunately, adding a JPEG to a form in Visual C++ is not very straightforward. However, once you get the hang of it, it's not too difficult to do.

First save your JPEG as a Windows Bitmap (.bmp).

Then, there are four steps:
1) Import the bitmap into your project and give it a resource identifier
2) Add a Picture control to your form
3) Set the type of the Picture control to Bitmap
4) Set the Image of the Picture control to the resource identifier you chose in step 1

These steps are elaborated upon more extensively here: http://www.functionx.com/visualc/applications/displaybitmap.htm.

Hexar Anderson
Measurement Studio
Hexar Anderson
Measurement Studio Staff Software Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,349 Views)
you can download and use the class CPicture of Paul DiLascia in MSDN Microsoft. with this class you can use anyone kind of graphics format

I hope help you
0 Kudos
Message 3 of 3
(3,349 Views)