home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!falcon!lfosdal
- From: lfosdal@falcon.no (Lars Fosdal)
- Newsgroups: comp.lang.pascal
- Subject: Re: TPW: How to get a pointer from a handle
- Message-ID: <9ysZXB1w165w@falcon.no>
- Date: Tue, 26 Jan 93 18:29:07 MET
- References: <focke.154.728048555@gmd.de>
- Organization: Falcon Information Services AS, Oslo, Norway
- Lines: 34
-
- focke@gmd.de (Stefan Focke) writes:
-
- > If I create a brush or a bitmap I get its handle. Is it possible to find the
- > address where this brush or bitmap is realy stored.
-
- This is one for the FAQ!
-
- Assuming you've got a valid handle (hBM):
- VAR
- hBM : hBitMap;
- BM : TBitMap; {Lots of nice info in this one...}
-
- BEGIN
- .
- hBM gets a valid handle
- .
- :
- IF GetObject(hBM, SizeOf(TBitMap), @BM)<>0
- THEN BEGIN {We've got a valid bitmap)
-
- BM.bmBits now points to the bitmap bits.
-
- END;
-
-
- Also, Check out the Set/GetBitmapBits functions (WinProcs).
-
-
- Lars F.
- --
- / Mr.Lars Fosdal / Falcon AS / lfosdal@falcon.no /
- / Software Developer / Stranden 1 / Tel. +47 22831310 /
- / Financial Analysis Systems / N-0250 OSLO, Norway / Fax. +47 22831290 /
- ----=* All opinions are personal and does not reflect company policy *=----
-