home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / clip_sib / read_me.txt < prev   
Text File  |  1991-11-03  |  4KB  |  66 lines

  1. Hi,
  2.  
  3. It appears that the only reason VB doesn't support overlapping controls is
  4. that the WS_CLIPSIBLINGS style bit is not set for VB controls. Setting this
  5. style bit tells Win3 to clip overlapping child controls so that they are
  6. displayed correctly and don't interfere with each other. The order in which
  7. child windows are displayed is determined by their relative locations in the
  8. Win3 Window Manager List. A window which is higher up on this list will appear
  9. in front of any windows that are lower down in the list. CLIPSIB demonstrates
  10. how to set the WS_CLIPSIBLINGS style bit for all of a Form's windows and
  11. several API functions that you can use to access and manipulate the Window
  12. Manager List.
  13.  
  14. I think you will be amazed at what you can do simply by setting this bit for
  15. all of a Form's child windows (VB controls).
  16.  
  17. CLIPSIB contains three demonstrations of the added power that setting this bit
  18. provides. In the upper left of the Form are a group of 4 overlapping list
  19. boxes. Clicking any of the list boxes pops it in front of the other boxes so
  20. you can make a selection. In the upper right of the Form are 3 small Picture
  21. Controls that will be loaded with the Win3 bitmap named PYRAMID.BMP and a
  22. larger Picture Control that will be loaded the the Win3 bitmap named
  23. CHESS.BMP. The large Picture Control also has a Command Button on it. You can
  24. use your mouse to move the small pictures on top of the large one and to
  25. scroll the large picture -under- the small ones.
  26.  
  27. In the lower right of the Form is a simulation of a FIND Dialogue Box similar
  28. to the ones found in VB and other Win3 programs. You can drag this box around
  29. by its title bar. The special feature of this set of controls is that they
  30. are *always* displayed on top of all other controls. Try dragging the Find box
  31. on top of the group of list boxes and then click on the list boxes. Note that
  32. even though the list boxes re-arrange themselves, they never pop-up in front
  33. of the Find Box.
  34.  
  35. CLIPSIB runs in the VB environment, but the performance is *very* slow. You
  36. should load the program into VB and then create and EXE file and run the EXE
  37. file. The performance improvement is dramatic!!!
  38.  
  39. The credit for discovering the significance of WS_CLIPSIBLINGS must go
  40. completely to Daniel Appleman, the owner of DesaWare and creator of the Custom
  41. Control Factory VB Add-on Toolkit. Dan took the time to examine my first
  42. attempt (in which I only manipulated the Window Manager List to get VB to
  43. display overlapping controls correctly) and then very nicely explain that I
  44. was out to lunch.<g> After Dan explained how things *really* work with Win3, I
  45. was off to the races.
  46.  
  47. But Dan wasn't the only one who contributed to this program. Thanks must also
  48. go to Ted Young and Jonathan Zuk who also took the time to look at my first
  49. attempt. In fact, Jonathan mentioned WS_CLIPSIBLINGS, but his suggestion went
  50. in one eye and out the other. So much for my powers of perception.<g>
  51.  
  52. This program requires the Win3 bitmaps PYRAMID.BMP and CHESS.BMP.  They come
  53. with Win3 and should be in your Win3 directory.  The program also makes
  54. extensive use of a custom DLL named CTLHWND.DLL which was written by Jonathan
  55. Zuk.  Because the DLL is tiny, I've included it with the demo rather than make
  56. you track it down in the MSBASIC Libraries.
  57.  
  58. Although Dan, Ted and Jonathan made significant contributions to this program,
  59. I am solely responsible for any errors, omissions, bugs, etc. If you have any
  60. problems with the program, I'm the guy you should jump on.<g>
  61.  
  62. CLIPSIB.BAS is FreeWare. Do what you like with it and have some fun.
  63.  
  64. Keith Funk (CIS 72240, 2020)
  65. Nov. 3, 1991
  66.