Solved

Using CreateBitmap API

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

832 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