home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!sybus.sybus.com!myrddin!tct!jeff
- From: jeff@tct.com (Jeff Witzer)
- Subject: Buttons & bitmaps
- Message-ID: <2A9CE105.4110@tct.com>
- Date: Thu, 27 Aug 1992 14:04:53 GMT
- Organization: TC Telemanagement, Clearwater, FL
- Lines: 31
-
- I am trying to create dynamic Borland style dialog boxes, specifically, I
- want to replace one button with another in response to some user activity.
- Imagine if you will, two buttons in a Borland style dialog box, both having
- bitmapped pictograms. Pressing button A changes the pictogram, and
- preferably the ID (wParam associated with WM_COMMAND messages), of button B.
- The original state of the buttons is currently defined in the .rc (using
- Resource Workshop) but that can change if needed. Should I delete button B
- and replace it with button C or draw a new bitmap on button B (and somehow
- change its ID)?
-
- Also, I need to be able to differentiate between multiple buttons which
- display the same pictogram. Borland style buttons seem to use the ID field
- of the button definition to determine which bitmap to use on the button face
- (1000 series for norm, 3000 series for pushed, and 5000 series for focus), so
- how can I get different WM_COMMAND wParams from similar buttons (or how can I
- differentiate which button was pressed (numerically, not with window handles)
- if I need to use the same ID)?
-
- Reposting an old question...when I bring up a Borland style dialog box, I
- would like to display a bitmap on its face based on a global variable (if the
- variable equals 0 display bitmap A, if 1 display bitmap B, etc..., at a
- certain location on the dialog box), but I don't get WM_PAINT messages for the
- dialog box when it's initially displayed, nor when I call InvalidateRect in
- response to an INIT_DIALOG message (and the windows doesn't yet exist to
- display a bitmap on when an INIT_DIALOG message is received).
-
- Any suggestions?
-
- thanks,
-
- jeff
-