home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1527 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.9 KB  |  41 lines

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