Solved

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

Posted on 2001-06-13
2
303 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now