Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using CreateBitmap API

Posted on 1999-01-06
2
Medium Priority
?
223 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 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 clear a vector as well as how to detect empty vectors in C++.

610 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