Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how do you convert a bitmap into dib so that you can display it in a console

Posted on 1999-01-25
2
Medium Priority
?
229 Views
Last Modified: 2013-11-20
i wana display a bitmap on the whole screen, how do i do it.
you know, i wana display it on the console mode.  how do you do this using mfc, i have visual c++ 4.0. please explaing this in the easiest way possible.
0
Comment
Question by:ashr
[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 Comments
 
LVL 1

Accepted Solution

by:
dd_b earned 400 total points
ID: 1328278

Create one memory dc:

CDC * pDC =  new CDC;

following  function will create memorydc
virtual BOOL screendc::CreateCompatibleDC(  pDC );
by default it contains b/w bitmap. to remove that select your bitmap in the memorydc using selectobject function call.
see MFC help on CreateCompatibleDC(  pDC )
then call screendc.BitBlt( .., memorydc,.. );


0
 

Author Comment

by:ashr
ID: 1328279
can you please explain in more detail what to do after creating a pointer to CDC.
can you give an example by using a bitmap name called"test.bmp".
in your example can you show how to display this bitmap in a console, or on the whole moniter or screen.
please respond asap.
please give the whole example, so i could understand, not just a portion of it.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 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