Solved

Using CreateBitmap API

Posted on 1999-01-06
2
215 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

930 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now