Solved

cannot convert from...

Posted on 2000-03-27
3
445 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
  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 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.

759 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

22 Experts available now in Live!

Get 1:1 Help Now