Solved

How can I get the size of a bitmap using GetBitmapDimensionEx?

Posted on 2001-06-13
2
315 Views
Last Modified: 2012-05-05
Thank you !
0
Comment
Question by:turbosoft
2 Comments
 
LVL 10

Expert Comment

by:caraf_g
ID: 6184989
http://msdn.microsoft.com/library/psdk/gdi/bitmaps_1l4o.htm

http://msdn.microsoft.com/library/psdk/gdi/bitmaps_2ghe.htm

in VB: (private can be public in certain circumstances)

Private Type SIZE
    cx As Long
    cy As Long
End Type


Private Declare Function GetBitmapDimensionEx Lib "gdi32" Alias "GetBitmapDimensionEx" (ByVal hBitmap As Long, lpDimension As SIZE) As Long

0
 
LVL 5

Accepted Solution

by:
AndrewDev earned 50 total points
ID: 6184995
Here is the MSDN documentation

http://msdn.microsoft.com/library/psdk/gdi/bitmaps_1l4o.htm

However the example of its use is not VB. So I don't know how much help it will be. It also states that the retrieved dimensions must have been set by the SetBitmapDimensionEx function. So unless you know this has been used I doubt it will be much use.

What are you trying to do once you have got the dimensions, there are various tools for manipulating bitmaps which I am sure we can help with, if you give us a bit more information.
Regards
Andrew
0

Featured Post

Independent Software Vendors: 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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

685 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