How to add an existing bitmap to a dialog picture control or background - Programmer
This is a discussion on How to add an existing bitmap to a dialog picture control or background - Programmer ; New to VC++ - all I want to do is add an existing bitmap image to a
dialog as a background image and also as a picture on the dialog. This
should be so easy...
I've read:
Workspace'. Click the ...
How to add an existing bitmap to a dialog picture control or background
New to VC++ - all I want to do is add an existing bitmap image to a
dialog as a background image and also as a picture on the dialog. This
should be so easy...
I've read:
Workspace'. Click the tab 'Resource View'. Click the '+' beside the
word 'Dialog'. Double-click the dialog name. Select the 'Picture
Control' from the floating toolbar.>
But if I right click on resources and select bitmap I get a blank
bitmap...then whatam I supposed to do?
If I right click on resources and select import and then select my
image file I am then prompted for "resource type". Well its a "bitmap"
obviously so why am I be being asked. And entering "bitmap" generates
a popup error ie cannot import custom resources blah blah. Ok, so I
enter "mybitmap". This results in a new resource entry. And I cannot
see a picture instead I see what appears to be the memory contents of
my image file. Nevermind, press on...so I create a picture control on
a dialog. I open its properties and there is the bitmap type but my
image is not associated with this. Also there is not a type associated
with my new resource entry.
What on earth am I doing wrong?
Re: How to add an existing bitmap to a dialog picture control orbackground
Zordiac wrote:
> New to VC++ - all I want to do is add an existing bitmap image to a
> dialog as a background image and also as a picture on the dialog. This
> should be so easy...
>
> I've read:
>
>
> Workspace'. Click the tab 'Resource View'. Click the '+' beside the
> word 'Dialog'. Double-click the dialog name. Select the 'Picture
> Control' from the floating toolbar.>
>
> But if I right click on resources and select bitmap I get a blank
> bitmap...then whatam I supposed to do?
>
> If I right click on resources and select import and then select my
> image file I am then prompted for "resource type". Well its a "bitmap"
> obviously so why am I be being asked. And entering "bitmap" generates
> a popup error ie cannot import custom resources blah blah. Ok, so I
> enter "mybitmap". This results in a new resource entry. And I cannot
> see a picture instead I see what appears to be the memory contents of
> my image file. Nevermind, press on...so I create a picture control on
> a dialog. I open its properties and there is the bitmap type but my
> image is not associated with this. Also there is not a type associated
> with my new resource entry.
>
> What on earth am I doing wrong?
It seems like the resource editor does not recognize your file as a
bitmap. Try the steps above that give you a blank bitmap resource.
This is creating a new but unpainted bitmap resource. Then use copy &
paste to paste your image into the blank resource from some program that
can open your file.
--
Scott McPhillips [VC++ MVP]
Re: How to add an existing bitmap to a dialog picture control or background
news:<6a6dnRBVuc9fvprd4p2dnA@comcast.com>...
> Zordiac wrote:
> > New to VC++ - all I want to do is add an existing bitmap image to a
> > dialog as a background image and also as a picture on the dialog. This
> > should be so easy...
> >
"Scott McPhillips [MVP]" wrote in message
> It seems like the resource editor does not recognize your file as a
> bitmap. Try the steps above that give you a blank bitmap resource.
> This is creating a new but unpainted bitmap resource. Then use copy &
> paste to paste your image into the blank resource from some program that
> can open your file.
Scott thanks for your help.
You are correct in that I was trying to load in a gif file and not a
bmp file. I just assumed any picture could be loaded in as per VB. So
are we limited to bmp files? Also can you do the VB thing of loading a
picture as a form background or not?
Re: How to add an existing bitmap to a dialog picture control or background
Can anyone recommend any good tutorials to get me up and running fast
with VC++. I know some c++ and VB.
But of course: C++ plus VB <> knowing VC++
In VB at design time it is very easy to load gifs etc into picture
control and as a form background. Also its easy to have graphic
buttons. It seems not so easy in VC (using VS 6.0). Managed to load a
..bmp into a picture control but that took days.
Still wondering how - at design time - to
1. set a bitmap as a form's background
2. set a gif, jpg as form's background or load into a piccie control.
Just came across functionx.com and see if that will help. Also would
like to know of any good places for V++ noddy code examples. And yes I
have searched the net and am still searching.
Re: How to add an existing bitmap to a dialog picture control orbackground
Zordiac wrote:
> Just came across functionx.com and see if that will help. Also would
> like to know of any good places for V++ noddy code examples. And yes I
> have searched the net and am still searching.
Although it is not a term I am familiar with, these sites are probably
very noddy for VC++ sample code: