Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/articles/mfc-tutorials/)
-   -   Display Bitmap in a Picture Box using MFC from a file (http://www.go4expert.com/articles/display-bitmap-picture-box-using-mfc-t350/)

Nishant Desai 19Jan2007 16:33

Re: Display Bitmap in a Picture Box using MFC from a file
 
Another thing i want to ask is as you wrote to change the Cstatic type to CPicture, but i dont know how to do that? please tell me how to change the variable type from CStatic to CPicture?
Thanks,
Nishant

shabbir 19Jan2007 16:45

Re: Display Bitmap in a Picture Box using MFC from a file
 
I would request you to put queries into a seperate thread rather than jumping into an old thread with the queries.

shabbir 19Jan2007 16:46

Re: Display Bitmap in a Picture Box using MFC from a file
 
Quote:

Originally Posted by Nishant Desai
Another thing i want to ask is as you wrote to change the Cstatic type to CPicture, but i dont know how to do that? please tell me how to change the variable type from CStatic to CPicture?
Thanks,
Nishant

By opening the .h file and renaming it.

Nishant Desai 19Jan2007 16:57

Re: Display Bitmap in a Picture Box using MFC from a file
 
Quote:

Originally Posted by shabbir
By opening the .h file and renaming it.

I will create the new post for my main query but just replying here for this problem, as you told me, i had change the data type of the variable to the CPictureBox, but it gave me so many errors, main of those is Storage value missing. what should i do?

shabbir 19Jan2007 18:15

Re: Display Bitmap in a Picture Box using MFC from a file
 
You probably missed the step 4 I mentioned in the article.

4. Change the CStatic to CPictureBox. Don't forget to add the header files at the top.

Adding the header files should shred off your errors.

Nishant Desai 20Jan2007 09:42

Re: Display Bitmap in a Picture Box using MFC from a file
 
Quote:

Originally Posted by shabbir
You probably missed the step 4 I mentioned in the article.

4. Change the CStatic to CPictureBox. Don't forget to add the header files at the top.

Adding the header files should shred off your errors.

Ya, i was missing that step, so when i did it, i had run it successfully.

Thanks,
Nishant

lplover2k 4Feb2007 18:19

Re: Display Bitmap in a Picture Box using MFC from a file
 
hi there .. this tuto is intended for what version of vc++?? 6.0?? cus i don't have hte "ownerdrawn" option for the picture control..

lplover2k 4Feb2007 18:22

Re: Display Bitmap in a Picture Box using MFC from a file
 
and the include in picturebox.cpp

#include "stdafx.h"
#include "Wallpaper.h"
#include "PictureBox.h"
#include ".\picturebox.h"

-----------------------------------
#include "Wallpaper.h"
#include ".\picturebox.h"

where are these 2 headers found?

shabbir 5Feb2007 09:15

Re: Display Bitmap in a Picture Box using MFC from a file
 
The Wallpaper header files will be generated by the MS VC compiler. PictureBox.h is in the attachmet.

lplover2k 5Feb2007 10:51

Re: Display Bitmap in a Picture Box using MFC from a file
 
it's not generated... i am getting error that it is missing :(


All times are GMT +5.5. The time now is 00:41.