Solved

Create a class from CBitmap

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatSeparator  java  challenge 13 59
notReplace  challenge 53 152
post4 challenge 28 121
Thin secure Windows 10 5 115
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

736 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