home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.ms.programmer
- Path: sparky!uunet!uunet.ca!hyper.hyper.com!bonneau
- From: bonneau@hyper.hyper.com (Paul Bonneau)
- Subject: Re: HELP: Load an icon from a .EXE file
- Message-ID: <1992Jul22.161746.1939@hyper.hyper.com>
- Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
- Organization: HyperCube Inc.
- References: <1992Jul21.023757.24588@vela.acs.oakland.edu> <1992Jul21.144036.26772@hyper.hyper.com> <1992Jul21.172030.4078@vela.acs.oakland.edu>
- Date: Wed, 22 Jul 1992 16:17:46 GMT
- Lines: 38
-
- In article <1992Jul21.172030.4078@vela.acs.oakland.edu> mclellan@vela.acs.oakland.edu (Candy M. McLellan) writes:
- >
- >Paul,
- >
- [ stuff deleted ]
- > How can I keep a Bitmap Selected into memory with an
- > Owner-Draw ListBox?
- >
- > The ODA messages seem to work on a item by item basis
- > with no sequence (asynchronous) with lp->hDC having
- > no beginning.
- >
- > IOW, I want to select a bitmap into memory for the first
- > item in a re-paint and then not select again for further
- > items (this speeds things up considerable when doing
- > one's own custom controls).
- >
- > However, as I said, the Owner-Draw does not seem to have
- > a synchrous state where one can tell when the hDC is
- > first being claimed for any given # of item re-paints.
- >
- > I thought of subclassing ListBox but I don't see how
- > one could intercept WM_PAINT for the hDC I'm referring to
- >
- > Any suggestions are greatly appreciated.
- >
- Sorry, I don't understand what you are asking. Surely the
- hDC in the WM_DRAWITEM's DRAWITEMSTRUCT is a screen DC and
- not a memory DC? You can't select a bitmap into a screen DC.
-
- Are you trying to mimimize the redrawing required for each
- WM_DRAWITEM message? If so, could you not just change the
- state according to itemAction? I.e., if you get itemAction
- == IDA_FOCUS, maybe yoy could just XOR your caret on or off.
-
- Maybe we should take this offline, feel free to send e-mail.
-
- cheers - Paul.
-