|
-
Aug 3rd, 2000, 03:26 PM
#1
Thread Starter
Lively Member
Is there a way to get the height and width of a bitmap with a DC?
-
Aug 3rd, 2000, 04:54 PM
#2
Frenzied Member
You Need to Create a new Bitmap using CreateBitmap, Create bitmap Indirect or CreateCompatibleBitmap. Then you need to use Selectobject to put this one into the DC, the return value is the handle of the bitmap inside it.
Then use a DeleteObject Selectobject combo to put the original bitmap in and delete the newly created one.
Now you have the handle of the bitmap, use GetObject with a BITMAP type adn this handle. The BITMAP will then contain info about the bitmap object, including its height and width
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|