Solved

cannot convert from...

Posted on 2000-03-27
3
454 Views
Last Modified: 2007-10-18
When i write (all variables are corectly defined) :

hBitmap = SelectObject(hMemDC, hOldBitmap);

and then compile, an error reported:
error C2440: '=' : cannot convert from 'void *' to 'struct HBITMAP__ *'
        Conversion from 'void*' to pointer to non-'void' requires an explicit cast

Whats problem?

Thanks.
0
Comment
Question by:Viesturs
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 1 total points
ID: 2660853
1 point?   50 is considered easy...

hBitmap = (HBITMAP) SelectObject(hMemDC, hOldBitmap);
0
 
LVL 1

Author Comment

by:Viesturs
ID: 2660899
I have a lot of questions, but not points. :)
0
 
LVL 22

Expert Comment

by:nietod
ID: 2661563
You should have about 150 points left.  That is enough to ask several reasinably "priced" questions.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to understand recursion 12 226
Should CArray be used for a list of pointers in C++? 19 102
How to print into std::string like sprintf using C++11? 12 59
Precision Problem in C++ 7 31
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

786 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