home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / misc / 4252 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: Create buttons dynamically, how? 
  5. Distribution: world
  6. References: <PS.92Dec14233706@kielo.uta.fi>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 28
  11. Date: Tue, 15 Dec 1992 14:24:38 +0000
  12. Message-ID: <724429478snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <PS.92Dec14233706@kielo.uta.fi> ps@uta.fi writes:
  16.  
  17. >How can you create buttons dynamically? That is, how the application
  18. >can decide during run-time the number and the positions of the buttons
  19. >it wants to create? All the demonstration programs (BC++/AF/OWL) seem
  20. >to have a fixed number of buttons. Some other button-like control
  21. >could serve as well, as long I can create and destroy them
  22. >dynamically.
  23. >--
  24. >Pertti Suomela
  25. >
  26. >Internet: ps@uta.fi
  27. >X.400:    G=Pertti S=Suomela O=uta ADMD=fumail C=fi
  28. >
  29.  
  30. Just use the "CreateWindow" function, exactly as you would for any
  31. other window, using the pre-defined "BUTTON" window class.  All the
  32. standard Windows controls can be dynamically created in this way -
  33. look in the documentation of the "CreateWindow" function to find
  34. the names of the pre-defined classes.
  35. -- 
  36. --------------------------------------------------------------------------
  37. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  38. | Warrington, UK                           | BIX: cmarriott              |
  39. | (Still awaiting inspiration              | CIX: cmarriott              |
  40. |  for a witty .sig .... )                 | CompuServe: 100113,1140     |
  41. --------------------------------------------------------------------------
  42.  
  43.