Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - SetBitmapDimensionEx
  
User name:
Password:
Reply:
 

UserPost
sloat
Posts: 81/85
Yeah. Just make sure you delete the old bitmap after you select the new one to the DC.
HyperLamer
Posts: 7076/8210
Eh, I figured that's how I'd have to do it anyway. Do I need to re-assign it to the hDC and all that too?
sloat
Posts: 80/85
Actually that function doesn't actually change the dimensions of a GDI bitmap. I know it seems stupid, and it is, but that's GDI for you. If you read the second sentence, you'll see: "These dimensions can be used by applications; however, they are not used by the system."

So really, the Get/SetBitmapDimension functions aren't very useful. And they also can't be used on a DIB.

The only way to "resize" a memory bitmap is to create a new one with the dimensions you want, copy the bitmap over, and delete the old one. It's not as slow as you'd think, but it's the only way to do it.
HyperLamer
Posts: 7074/8210
Yeah, but I'm working with pixels. How do I convert a pixel size to a .01-mm size?
Cellar Dweller
Posts: 248/269
I think that bitmaps can have dimensions in real world units independent of the size in pixels. This function, in effect, sets the conversion between pixels and .01mm units for the specified bitmap.
HyperLamer
Posts: 7065/8210
This function is supposed to set the dimensions of a bitmap... 2 problems. One, it wants ".01-mm units"... everything I've worked with so far uses pixels and I don't know of any functions to convert them to this obscure unit. Two, it doesn't work. I resize the bitmap but it's still the same size it was created at, even though it returns OK. (And who's the genuis who left the 's' off 'dimensons' and made it not set the last error code if something does go wrong? )
Acmlm's Board - I2 Archive - Programming - SetBitmapDimensionEx


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.003 seconds.