[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Create a class from CBitmap

Posted on 2003-12-08
5
Medium Priority
?
170 Views
Last Modified: 2013-11-20
I want to create a class called CMyBitmap which is derived from CBitmap, but when I select insert new class, there isn't such a base class for me to select in the combo box. How can I write the code? Actually what I want to do is to create a CMyBitmap class with some function like loadresource, getheight,getwidth and drawbmp in the class so that I can design the background of my dialog in an SDI application, but I face many problems in doing so. Hope someone can tell me how to write the code? (or is there an active x control for doing so?I try the picture box in the control editor but the picture will always cover my buttons). Need help urgently for my project. thanx in advance  



hueychian
a newbie in VC++
0
Comment
Question by:hueychian1983
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 200 total points
ID: 9902692
create your own .cpp/.h files

in .h file
class CMyBitmap : public CBitmap
{
public:
CMyBitmap();
virtual ~CMyBitmap() {};
...override the functionality you want here
}

and in .cpp file
CMyBitmap(...) : CBitmap(...)
{
}

0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 11850412
My comment should provide the solution
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question