Getbitmapbits or how to get a pointer 
Author Message
 Getbitmapbits or how to get a pointer

Hey,
I've got a highspeed procedure, that allows to copy a bitmap
into a WingDC very fast. This procedure needs a pointer on
the bitmap bits to work. I created a bitmap in the memory,
the problem is: I've got a handle on the bitmap but no pointer.
I tried to get a pointer with getobject and getbitmapbits
(see listing below). It doesn't work, the program always crash.
Can anyone help me or has anybody a better way to get a pointer?

var
 tempdc,memdc : HDC;
 nummer : TBitmap;
 number,old : HBitmap;
 picture : pointer;

begin
 tempdc := createdc('Display',nil,nil,nil);
 number := createcompatiblebitmap(tempdc,40,40);
 memdc := createcompatibledc(tempdc);
 old := selectobject(memdc,number);
 textout(memdc,1,1,'ALloha',6);


 getbitmapbits(number,nummer.bmwidth*nummer.bmheight,picture);
 putsprite(0,PWingbitmap,picture,39,39,500,
                40,0); {highspeed assembler procedure}

 release.......
    ....  
end;

Thanks for reading, hope you can help me.
--
Markus Joschko



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. getbitmapbits or how to get a pointer

2. pointers, pointers, pointers...

3. Pointers Pointers Pointers

4. GetBitmapBits and LARGE arrays

5. Getbitmapbits or how can I 'change' a handle to a pointer

6. Pointers to pointers

7. Beginner needs some pointers with pointers!

8. POINTERS POINTERS...

9. getting database names from bde

10. getting the count of records in a filtered query

11. Getting SQL Server XML through ADO into Delphi

12. getting users

 

 
Powered by phpBB® Forum Software