Solved

cannot convert from...

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Template syntax for variable length arrays 9 75
Least Squares Curve Fitting 4 96
Microsoft C++ code failing in executable that worked 9 107
I could not set window to top 4 20
  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 …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

789 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