Solved

Using CreateBitmap API

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

747 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

10 Experts available now in Live!

Get 1:1 Help Now