Solved

Create a class from CBitmap

Posted on 2003-12-08
5
165 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 44

Accepted Solution

by:
AndyAinscow earned 50 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 44

Expert Comment

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 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