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

x
?
Solved

Bitmap as background of a CMiniFrame

Posted on 1997-11-28
3
Medium Priority
?
256 Views
Last Modified: 2013-11-20
How do I load a huge bitmap to be the background of a CMiniFrame?
Below is the code i used to create the miniframe.  

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
...etc..

CString strClass = AfxRegisterWndClass(CS_VREDRAW|CS_HREDRAW,::LoadCursor(NULL, IDC_ARROW),(HBRUSH)::GetStockObject(WHITE_BRUSH),::LoadIcon(NULL,IDI_APPLICATION));

CRuntimeClass * pRuntimeClass = RUNTIME_CLASS(CMyMiniFrame);
MyMiniFrame = (CMyMiniFrame*)pRuntimeClass->CreateObject();
MyMiniFrame->Create(strClass,_T("My MiniFrame Window"), MFS_MOVEFRAME, CRect(50,50,200,130));
}
0
Comment
Question by:engllf
[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
3 Comments
 

Author Comment

by:engllf
ID: 1311036
Edited text of question
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1311037
Since you're creating the class yourself, you will need to override the WM_PAINT and WM_ERASEBKGND messages in your CMyMiniFrame class. Then you can draw the bitmap in any fashion you like.
0
 

Author Comment

by:engllf
ID: 1311038
Do you have any sample code for OnPaint{},OnEraseBkgnd()?
I tried to write them but i simply get no where.
Thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
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