Solved

Create a class from CBitmap

Posted on 2003-12-08
5
154 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
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 50 total points
Comment Utility
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 44

Expert Comment

by:AndyAinscow
Comment Utility
My comment should provide the solution
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now