home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / status.zip / README next >
Text File  |  1995-04-20  |  3KB  |  101 lines

  1.  
  2.  
  3. ABSTRACT
  4. ========
  5. A status line window is created to whom messages can be sent during
  6. program execution with
  7.     WinSetWindowText(hwndStatus,(PSZ)pszWhatever);
  8.             OR
  9.     WinSendMsg(
  10.         hwndStatus,
  11.         WM_USER_SETTEXT,
  12.         MPFROMP(pszWhatever),
  13.         0L);
  14. Presentation parameters of this window can be changed with a fairly
  15. nice set of WM_USER_SETVAL messages, either under program control
  16. or through a dialog accessible with a right button click on the status
  17. line.
  18.  
  19. SOFTWARE/PLATFORM
  20. =================
  21. a. Gpf 2.1, level A2
  22. b. OS/2 2.11, VGA
  23. c. IBM CPP v2.01 (straight C, not in C++ mode)
  24. d. TOOLKT21
  25.  
  26. FILES
  27. =====
  28. status.orc
  29. status.h
  30. ufstat.c
  31. ufstat.mak
  32. readme
  33.  
  34. SOME DISCUSSION
  35. ===============
  36. This sample creates a child window belonging to the frame (as
  37. opposed to most Gpf controls, which belong to the client). Physically
  38. it occupies (creates) a space between the client area and the bottom-most
  39. frame entity. The client area gives up an appropriate amount of
  40. vertical room. Of course it could just have easily been placed at the
  41. bottom of the client area, with simple modifications in the frame's
  42. WM_FORMATFRAME message.
  43.  
  44. The Status Line Window (STATWIN) is unknown to Gpf, and is created
  45. on-the-fly during the 'Main' window's WM_CREATE. At his time, when
  46. nothing is visible yet, the frame procedure is sub-classed and the
  47. two messages of interest are modified. Note that this window keeps
  48. a local structure in the "window words", so technically speaking you
  49. can make several of these if you want to (how? this is left as an
  50. excercise for the reader). Since Gpf is ignorant of this beast one
  51. must write a WindowProcedure for it.
  52.  
  53. This WinProc could have been very simple, handling only
  54.     WM_PAINT
  55.     WM_SETWINDOWPARAMS  /* in order to react to WinSetWindowText() */
  56. But many functions were added which give the user better control of
  57. how things are displayed. Two of these are not standard:
  58.     WM_USER_SETTEXT
  59.     WM_USER_SETVAL
  60. but
  61.     WM_CONTEXTMENU
  62. certainly is, though WM_BUTTONxCLICK could have been used instead.
  63. All of them contain what I think is simple code and I hope you agree.
  64. In fact the main complexity of this sample is in the initialization
  65. and handling of the 'StatParms' window, all of which can be scrapped
  66. if you want to 'hard wire' the display to a fixed presentation.
  67.  
  68. SUPPORT
  69. =======
  70. None. You are on your own. Enjoy.
  71.  
  72. POSSIBLE ENHANCEMENTS
  73. =====================
  74. 1. [currently hard wired to VGA. The default vertical height
  75. really ought to be computed as a function of the default font. This
  76. is fairly trivial.] DONE! 04.20.95 A
  77. 2. enable the 'Font..' button. Eventually I'll do it, if you want to
  78. wait. The window's height may need to be re-sized dynamically as a
  79. function of the new font height.
  80. 3. create a ticker-tape effect (bidirectional scrolling)
  81. 4. convert this to a User Control (non-trivial)
  82. 5. re-write the code so as not to use a global handle (hwndStatus).
  83. HINT: it is definitely a child of the frame, not the client.
  84. 6. [add a WM_USER_SETVAL to position the status line BELOW the client
  85. area. Do you think this will have any effect on controls within the
  86. client area?] DONE! 04.20.95 B
  87. 7. [resize the vertical dimension dynamically as the shadow size is
  88. changed (cuurently the shadow can impinge on the text.)] DONE! 04.20.95 A
  89.  
  90. OTHER
  91. =====
  92. If you like it, it was created by Al Charov; if you don't, it was
  93. created by someone else.
  94.  
  95.  
  96. Al Charov
  97. Tax Day, 1995
  98.  
  99. MODS
  100.     04.20.95
  101.