home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8587 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.2 KB

  1. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!falcon!lfosdal
  2. From: lfosdal@falcon.no (Lars Fosdal)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: TPW: How to get a pointer from a handle
  5. Message-ID: <9ysZXB1w165w@falcon.no>
  6. Date: Tue, 26 Jan 93 18:29:07 MET
  7. References: <focke.154.728048555@gmd.de>
  8. Organization: Falcon Information Services AS, Oslo, Norway
  9. Lines: 34
  10.  
  11. focke@gmd.de (Stefan Focke) writes:
  12.  
  13. > If I create a brush or a bitmap I get its handle. Is it possible to find the 
  14. > address where this brush or bitmap is realy stored. 
  15.  
  16. This is one for the FAQ!
  17.  
  18. Assuming you've got a valid handle (hBM):
  19. VAR
  20.  hBM : hBitMap;
  21.  BM : TBitMap; {Lots of nice info in this one...}
  22.  
  23. BEGIN
  24.   .
  25.   hBM gets a valid handle
  26.   .
  27.   :
  28.   IF GetObject(hBM, SizeOf(TBitMap), @BM)<>0
  29.   THEN BEGIN {We've got a valid bitmap)
  30.   
  31.     BM.bmBits now points to the bitmap bits.
  32.   
  33.   END;
  34.  
  35.  
  36. Also, Check out the Set/GetBitmapBits functions (WinProcs).
  37.  
  38.  
  39. Lars F.
  40. --
  41. / Mr.Lars Fosdal              / Falcon AS            / lfosdal@falcon.no  /
  42. / Software Developer          / Stranden 1           / Tel. +47 22831310  /
  43. / Financial Analysis Systems  / N-0250 OSLO, Norway  / Fax. +47 22831290  /
  44. ----=* All opinions are personal and does not reflect company policy *=----
  45.