?
Solved

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

Posted on 2001-06-13
2
Medium Priority
?
344 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 150 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

850 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