Solved

cannot convert from...

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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.
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.

730 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