Solved

Using CreateBitmap API

Posted on 1999-01-06
2
220 Views
Last Modified: 2008-03-10
Hi,

I'm creating an application with VC++ (without MFC).
I'm using CreateBitmap(x,y,1,8,ptr) to create a bitmap
that is latter copied to the clipboard.
For some reason I don't get the original B&W picture but
the same picture with undefined colors.

Any suggestions?

Many thanks.


0
Comment
Question by:amnav
[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
2 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 100 total points
ID: 1181645
That is not a B&W bitmap, that is a 256 color bitmap.  In the 4th parameter you specify 8 bits per pixel, that is for 256 colors.  Specify i bit per pixel and you iwll have a monchrome bitmap.

Let me know if you have questions.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1181646
Did this answer your question?
0

Featured Post

Independent Software Vendors: 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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

733 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