home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / dyndlgp.zip / DYNDLG.TXT < prev    next >
Text File  |  1994-07-31  |  4KB  |  79 lines

  1. This example is using a Quick-and-dirty method  for producing dynamic dialogs.
  2. Its work but very slow to display. Its even slower than complie from C (???).
  3. This implementation is a better dynamic dialogs than examples 'Muldia.zip'
  4. ( pascal), 'Mpd.zip'( C )  or o2mpd2.zip( C ). It is because it can use the 'Tab' 
  5. key only to shift dialogs and control.
  6.  
  7. This is a good ideal to dowload the original example from Microsoft Forum 
  8. which is written by C (not C++). The file name are 'Dyndlg.exe' or 'dyndlg.zip'
  9. (I not sure in which format. I download it from internet). 
  10.  
  11. You can download Rory Jaffe's Example. (BCPPWIN lib 15 [OWL2]).The 'unit' file
  12. are same as this example, of course in C++. But you can't complie that since 
  13. the resource file is missing.
  14.  
  15.  
  16. In this file, you will have
  17. odyndlg.pas      Dynamic dialogs change object unit file.
  18. ddlgdem.pas      demo program;
  19. ids.pas          constant unit for demo program;
  20. dyndlg.res       resource file for demo program;
  21. dyndlg.txt       this file;
  22. msdyndlg.exe     Example file from Microsoft. This is 16Bit example.
  23.                  My example is using same .res, therefore this is same.
  24.           But this is 'faster'.
  25.     
  26.  
  27. For technical information please refer to MSJ vol.9 no.3 Mar 94,
  28.     'Simplify and Enhence Your Application's user Interface with
  29.       Dynamic dialog Boxes'
  30. ----Sorry, I do have not this article.
  31.  
  32. Any Bug and suggestion, Please send to:
  33. Compuserve: 100426,21
  34. internet: Ping.Shuen.Lee@hk.Super.net
  35.  
  36. by 
  37. Ping-Shuen LEE
  38. HongKong
  39. 31/07/94
  40.  
  41. The Following information is written by Rory Jaffe;
  42.  
  43. Dyndlg.h and dyndlg.cpp provides a method for producing quick-and-dirty
  44. dynamic dialogs (quick to program, but a little slow to display).  All you
  45. have to do is place an invisible frame in the dialog box surrounding the area
  46. where the controls are to be positioned.  Then, you place one set of controls in
  47. that box.  Make a copy of the frame, and position it OUTSIDE the dialog box.
  48. Place the second set of controls in there.  You have now created two sets of
  49. controls.  Dyndlg will move the second set so that it overlaps the first, as if
  50. the second frame (and its contents) were moved to exactly match the position of
  51. the first frame.  If you make one set of controls invisible, you have done
  52. everything you need to do to make it appear as if only one set of controls
  53. existed.  If you don't make one set of controls invisible, you have to set
  54. hideatstart to be TRUE, then it will be hidden by the program.  To change
  55. visible sets so that the dialog box now shows your second set of controls,
  56. call the Activate method with the set number to make visible.  The formerly
  57. visible set will disappear.  Magic! You can have many sets of controls, but no
  58. more than 256 controls, hidden and visible, in a dialog box.  You also can have
  59. multiple dynamic areas in a single dialog box by having two instances of this
  60. class in your dialog class .  Then, you can independently
  61. alter the appearance of the two parts.  If you are a real sadist, you can
  62. have all sorts of dynamic areas.
  63.  
  64. The idea of moving frames is from the article by Atif Aziz in MSJ vol. 9 no. 3.
  65. GetDlgCtlRect and MoveSet are adapted (and somewhat changed) from that article.
  66. The rest of the code represents my simple-minded contribution.
  67.  
  68. I've mentioned slowness and the 256 control limit as drawbacks.  Apparently you
  69. can flash different dialog boxes in frames on windows using OWL II.  I haven't
  70. figured out how to have two different dynamic areas.  If anyone can contribute
  71. the basic code for that (so that we all don't have to keep on reinventing the
  72. wheel) I'd be greatly appreciative.
  73.  
  74. Mr. Aziz has another solution for the 256 control limit (but not the slowness).
  75. His solution is quite marvelous, tremendously complex, and overkill for my
  76. application.  It also makes transfer buffers unuseable.  However, I do
  77. recommend reading his article.
  78.  
  79.