Solved

cannot convert from...

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 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.

861 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

23 Experts available now in Live!

Get 1:1 Help Now