home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / docs / pmv2base.inf (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1994-03-07  |  1.3 MB  |  24,967 lines

Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
  1.  
  2. ΓòÉΓòÉΓòÉ 1. Windows ΓòÉΓòÉΓòÉ
  3.  
  4. To most users, a window is a rectangular area of the display screen where an 
  5. application receives input from the user and displays output.  This chapter 
  6. describes the parts of the operating system that enable a Presentation Manager* 
  7. (PM) application to create and use windows; manage relationships between 
  8. windows; and size, move, and display windows.  An overview of the following 
  9. topics is presented: 
  10.  
  11. o Window types, classes, and styles 
  12. o Window-creation techniques 
  13. o Window messages and message queues 
  14. o Methods of window input and output 
  15. o Window resources and procedures 
  16. o Window identification and modification. 
  17.  
  18. Subsequent chapters present more in-depth descriptions of windows, their 
  19. advantages and uses, along with example code fragments. 
  20.  
  21.  
  22. ΓòÉΓòÉΓòÉ 1.1. About Windows ΓòÉΓòÉΓòÉ
  23.  
  24. A PM application can interact with the user and perform tasks only by way of 
  25. windows.  Each window shares the screen with other windows, including those 
  26. from other applications.  The user employs the mouse and keyboard to interact 
  27. with windows and their owner applications. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 1.1.1. Desktop Window and Desktop-Object Window ΓòÉΓòÉΓòÉ
  31.  
  32. OS/2* automatically creates the desktop window (known as the workplace in user 
  33. terminology) when it starts a PM session. 
  34.  
  35.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  36.  Γöé    Desktop Window                              Γöé
  37.  Γöé  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                Γöé
  38.  Γöé  Γöé Main Window 3              Γöé                Γöé
  39.  Γöé  Γöé      ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ         Γöé
  40.  Γöé  Γöé      Γöé Main Window 2              Γöé         Γöé
  41.  Γöé  Γöé      Γöé      ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  Γöé
  42.  Γöé  Γöé      Γöé  ΓöîΓöÇΓöÇΓöÇΓöñ Main Window 1              Γöé  Γöé
  43.  Γöé  Γöé      Γöé  ΓöéChiΓöé  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ         Γöé  Γöé
  44.  Γöé  Γöé      Γöé  ΓöéWinΓöé  Γöé               Γöé         Γöé  Γöé
  45.  Γöé  Γöé      Γöé  Γöé2A Γöé  Γöé               Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  Γöé  Γöé
  46.  Γöé  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ  ΓööΓöÇΓöÇΓöÇΓöñ  ΓöéChild Window 1aΓöé      Γöé  Γöé  Γöé
  47.  Γöé         Γöé      Γöé  ΓööΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ      Γöé  Γöé  Γöé
  48.  Γöé         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ       Γöé Child Window 1b Γöé  Γöé  Γöé
  49.  Γöé                Γöé       ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ  Γöé  Γöé
  50.  Γöé                ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ  Γöé
  51.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  52.  
  53. Desktop Window Containing Windows of Several Applications 
  54.  
  55. The desktop window paints the background color of the screen and serves as the 
  56. "progenitor" of all the windows displayed by all PM applications (but not of 
  57. object windows, which do not require screen display).  To make the desktop the 
  58. parent in the WinCreateStdWindow function, you specify HWND_DESKTOP. 
  59.  
  60. The windows immediately below the desktop are called main or top-level windows; 
  61. these are called primary windows in user terminology.  Every PM application 
  62. creates at least one window to serve as the main window for that application. 
  63. Most applications also create many other windows, directly or indirectly, to 
  64. perform tasks related to the main window. 
  65.  
  66. Each window helps display output and receive input from the user. The previous 
  67. figure shows the desktop window containing windows of several applications. 
  68. Notice that the main windows can overlap one another. (At times, it is possible 
  69. for a main window to be completely hidden.) Operations in one main window 
  70. normally do not affect the other main windows. 
  71.  
  72. The desktop-object window is like a desktop window that is never displayed; it 
  73. serves as the base window to coordinate the activity of an application's object 
  74. windows.  The desktop-object window cannot display windows nor process keyboard 
  75. and mouse input.  The primary purpose of the desktop-object window is to enable 
  76. you to create windows that need not respond to messages at the same rate as the 
  77. user interface. 
  78.  
  79.  
  80. ΓòÉΓòÉΓòÉ 1.1.2. Window Relationships ΓòÉΓòÉΓòÉ
  81.  
  82. Window relationships define how windows interact with each other-on the screen 
  83. and through messages.  There are parent-child window relationships and 
  84. window-owner relationships. 
  85.  
  86. The parent-child relationship determines where and how windows appear when 
  87. drawn on the screen.  It also determines what happens to a window when a 
  88. related window is destroyed or hidden.  The parent-child rules apply to all 
  89. windows at all times and cannot be modified. 
  90.  
  91. Ownership determines how windows communicate using messages.  Cooperating 
  92. windows define and carry out their rules of ownership.  Although some windows 
  93. (such as windows of the preregistered public window class, WC_FRAME) have very 
  94. complex rules of ownership, the application usually defines the ownership 
  95. rules. 
  96.  
  97. The following figure represents the logical relationship of the windows in two 
  98. applications. 
  99.  
  100.                           Desktop Window
  101.                                ΓöîΓöÇΓöÉ
  102.          Application 1         Γöé Γöé          Application 2
  103. ΓöîΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÉ Γöé Γöé ΓöîΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÉ
  104.              ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÿ ΓööΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  105. Γöé            Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé             Γöé
  106.              Γöé Γöé                                Γöé Γöé
  107. Γöé       Main Window 1        Γöé     Γöé      Main Window 2         Γöé
  108.              Γöé Γöé                                Γöé Γöé
  109. Γöé     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ      Γöé     Γöé     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ      Γöé
  110.       Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé                  Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
  111. Γöé     Γöé Γöé           Γöé Γöé      Γöé     Γöé     Γöé Γöé           Γöé Γöé      Γöé
  112.       Γöé Γöé           ΓööΓöÇΓöÿ                  ΓööΓöÇΓöÿ           ΓööΓöÇΓöÿ
  113. Γöé    Child         Child     Γöé     Γöé    Child         Child     Γöé
  114.    Window 1.1    Window 1.2           Window 2.1    Window 2.2
  115. Γöé     Γöé Γöé                    Γöé     Γöé                            Γöé
  116.       ΓööΓöÇΓöÿ
  117. Γöé    Child                   Γöé     Γöé                            Γöé
  118.   Window 1.1.1
  119. ΓööΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÿ     ΓööΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÿ
  120.  
  121. Typical Window Relationships 
  122.  
  123.  
  124. ΓòÉΓòÉΓòÉ 1.1.2.1. Parent-Child Relationship ΓòÉΓòÉΓòÉ
  125.  
  126. Most windows have a parent window. (The exceptions are the desktop and 
  127. desktop-object windows, which the system creates at system startup.)  An 
  128. application specifies the parent when it creates a window; then, the system 
  129. uses the parent to determine where and how to draw any new windows, as well as 
  130. when to destroy the windows (free all associated resources and remove the 
  131. windows from the screen). 
  132.  
  133. A child window is drawn relative to its parent.  The coordinates given to 
  134. specify the position of a window's lower-left corner are relative to the 
  135. lower-left corner of its parent.  For example, a main window (child of the 
  136. desktop) is drawn relative to the lower-left corner of the screen (the desktop 
  137. window's lower-left corner). 
  138.  
  139. All main windows are siblings because they share a common parent, the desktop 
  140. window.  Because sibling windows can overlap, an application or a user arranges 
  141. the windows, one behind another (like a stack of papers on a desk), in the 
  142. desired viewing order (called z-order). Z-order uses the desktop as a reference 
  143. point for a "three-dimensional" ranking of the overlapping windows: the topmost 
  144. window has the highest ranking, while the window at the bottom of the stack has 
  145. the lowest ranking.  The parent of the sibling windows is always at the bottom 
  146. of the z-order. 
  147.  
  148. The following figure illustrates the hierarchy of such an arrangement. 
  149.  
  150.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  151.   Γöé Desktop Γöé
  152.   ΓööΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÿ
  153.      Γöé Γöé Γöé     Parent            Child
  154.      Γöé Γöé Γöé                  ΓöîΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ
  155.      Γöé Γöé Γöé                       Siblings
  156.      Γöé Γöé Γöé   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ     Γöé  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
  157.      Γöé Γöé ΓööΓöÇΓöÇΓöé Main 1 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöé Child 1A Γöé
  158.      Γöé Γöé     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÉ  Γöé  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
  159.      Γöé Γöé                 Γöé  Γöé  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  160.      Γöé Γöé                 ΓööΓöÇΓöÇΓöÇΓöÇΓöé Child 1A Γöé Γöé
  161.      Γöé Γöé                    Γöé  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  162.      Γöé Γöé                    ΓööΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÿ
  163.      Γöé Γöé     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ        ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  164.      Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöé Main 2 Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöé Child 2A Γöé
  165.      Γöé       ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ        ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  166.      Γöé       ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  167.      ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöé Main 3 Γöé
  168.              ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  169.  
  170. Window Hierarchy 
  171.  
  172. Although PM supports z-order, it does not enforce the expected appearance 
  173. unless you specify the CS_CLIPCHILDREN or CS_CLIPSIBLINGS styles.  No part of a 
  174. child window ever appears outside the borders of its parent.  If an application 
  175. creates a window that is larger than its parent, or positions a window so that 
  176. some or all of it extends beyond the borders of the parent, the extended 
  177. portion of the child window is not drawn. 
  178.  
  179. An application can use the WS_CLIPCHILDREN or WS_CLIPSIBLINGS styles to remove 
  180. from a window's clipping area (the area in which the window can paint) the area 
  181. occupied by its child or sibling windows.  For example, an application can use 
  182. these styles to prevent a window from painting over a child or sibling window 
  183. containing a complex graphic that would be time-consuming to redraw. 
  184.  
  185. When a window is minimized, hidden, or destroyed, all of its children are 
  186. hidden, minimized, or destroyed as well.  The order of destruction is always 
  187. such that every window is destroyed before its parent.  The window-destruction 
  188. sequence starts at the bottom of descendancy so that all related windows can be 
  189. cleaned up; the last one to go is the window you asked to be destroyed.  The 
  190. final PM task in a window-destruction sequence is to send a WM_DESTROY message 
  191. to that window, so it has one last chance to release any resources it has 
  192. allocated and may still be holding. 
  193.  
  194. Every window has only one parent, but can have any number of children. window 
  195. in this tree is said to be a descendant of any window appearing above it in the 
  196. branch, and an ancestor of any window appearing below it.  There are two 
  197. special cases, of course: the window immediately above is called the window's 
  198. parent, and any window immediately below it is called its child.  An 
  199. application can change a window's parent window at any time by using the 
  200. WinSetParent function.  Changing the parent window also changes where and how 
  201. the child window is drawn.  The system displays the child within the borders of 
  202. the new parent and draws the window according to the styles specified for the 
  203. new parent. 
  204.  
  205.  
  206. ΓòÉΓòÉΓòÉ 1.1.2.2. Ownership ΓòÉΓòÉΓòÉ
  207.  
  208. Any window can have an owner window.  Typically, an application uses ownership 
  209. to establish a connection between windows so that they can perform useful tasks 
  210. together.  For example, the title bar in an application's main window is owned 
  211. by the frame window; but, together, the user can move the entire main window by 
  212. clicking the mouse in the title bar and dragging.  An application can set the 
  213. owner window when it creates the window or at a later time. 
  214.  
  215. Ownership establishes a relationship between windows that is independent of the 
  216. parent-child relationship.  While there are few predefined rules for owner- and 
  217. owned-window interaction, a window always notifies its owner of anything 
  218. considered a significant event. 
  219.  
  220. The preregistered public window classes provided by OS/2* recognize ownership. 
  221. Control windows of classes such as WC_TITLEBAR and WC_SCROLLBAR, notify their 
  222. owners of events; frame windows, of class WC_FRAME, receive and process 
  223. notification messages from the control windows they own.  For example, a 
  224. title-bar control sends a notification message to its owner when it receives a 
  225. mouse click.  If the owner is a frame window, it receives the notification 
  226. message and prepares to move itself and its children. 
  227.  
  228. Owner and owned windows must be created by the same thread; that is, they must 
  229. belong to the same message queue.  Because ownership is independent of the 
  230. parent-child relationship, the owner and owned windows do not have to be 
  231. descendants of the same parent window.  However, this can affect how windows 
  232. are destroyed.  Destroying an owner window does not necessarily destroy an 
  233. owned window.  Except for frame windows, an application that needs to destroy 
  234. an owned window that is not a descendant of the owner window must do so 
  235. explicitly. 
  236.  
  237. Frame windows sometimes own windows that are not descendants but, instead, are 
  238. siblings.  A frame window has the following special ownership properties: 
  239.  
  240. o When the frame window is destroyed, it destroys all of the windows it owns, 
  241.   even if they are not descendants. 
  242.  
  243. o When a frame window moves, the windows it owns move also.  Owned windows that 
  244.   are not descendants maintain their positions, relative to the upper-left (not 
  245.   the usual lower-left) corner of the owner window.  An owned window with the 
  246.   style FS_NOMOVEWITHOWNER does not move. 
  247.  
  248. o When the frame window changes its position in the z-order, it changes the 
  249.   z-order of all the windows it owns. 
  250.  
  251. o When the frame window is minimized or hidden, it hides all the windows it 
  252.   owns.  Owned windows hidden this way are restored when the frame window is 
  253.   restored. 
  254.  
  255. If an application needs this type of special processing for its own window 
  256. classes, it must provide that support in the window procedures for those 
  257. classes. 
  258.  
  259.  
  260. ΓòÉΓòÉΓòÉ 1.1.2.3. Object Windows ΓòÉΓòÉΓòÉ
  261.  
  262. Any descendant of the desktop-object window is called an object window. 
  263. Typically, an application uses an object window to provide services for another 
  264. window.  For example, an application can use an object window to manage a 
  265. shared database.  In this way, a window can obtain information from the shared 
  266. database by sending a message to and receiving a reply from the object window. 
  267.  
  268. Only two system-defined messages are available to an object window- 
  269. WM_CREATE and WM_DESTROY-but the object window enables the user to implement a 
  270. set of user-defined messages.  The window procedure for an object window does 
  271. not have to process paint messages or user input.  The object window processes 
  272. only messages that affect the data belonging to the object. 
  273.  
  274. HWND_OBJECT is the only identifier needed to create an object window.  It is 
  275. very unwise to create descendants of HWND_OBJECT in the same thread that 
  276. creates descendants of HWND_DESKTOP: this causes the system to hang up or, at 
  277. the very least, behave slowly.  Object windows, sometimes referred to as orphan 
  278. windows, require no owner. 
  279.  
  280. The rules for parent-child and ownership relationships also apply to object 
  281. windows.  In particular, changing the parent window of an object window to the 
  282. desktop window, or to a descendant of the desktop window, causes the system to 
  283. display the object window if the object window has the WS_VISIBLE style. 
  284.  
  285.  
  286. ΓòÉΓòÉΓòÉ 1.1.3. Application Windows ΓòÉΓòÉΓòÉ
  287.  
  288. An application can use several types of secondary windows: frame windows, 
  289. client windows, control windows, dialog windows, message boxes, and menus. 
  290. Typically, an application's main window consists of several of these windows 
  291. acting as one. The following figure shows an example of a main window and its 
  292. secondary windows. 
  293.  
  294. Main Window with Secondary Windows 
  295.  
  296. A frame window is a window that an application uses as the base when 
  297. constructing a main window or other composite window, such as a dialog window 
  298. or message box.  (A composite window is a collection of windows that interact 
  299. with one another and are kept together as a unit.)  A frame window provides 
  300. basic features, such as borders and a menu bar.  Frame windows have a set of 
  301. resources associated with them.  These include icons, menus, and accelerators 
  302. (shortcut keys to the user), which, typically, are defined in an application's 
  303. resource file. 
  304.  
  305. A dialog window is a frame window that contains one or more control windows. 
  306. Dialog windows are used almost exclusively for prompting the user for input. 
  307. An application usually creates a dialog window when it needs additional 
  308. information to complete a command.  The application destroys the dialog window 
  309. after the user has provided the requested information. 
  310.  
  311. A message box is a frame window that an application uses to display a note, 
  312. caution, or warning to the user.  For instance, an application can use a 
  313. message box to inform the user of a problem that the application encountered 
  314. while performing a task. 
  315.  
  316. A client window is the window in which the application displays the current 
  317. document or data.  For example, a desktop-publishing application displays the 
  318. current page of a document in a client window.  Most applications create at 
  319. least one client window.  The application must provide a function, called a 
  320. window procedure, to process input to the client window and to display output. 
  321.  
  322. A control window is a window used in conjunction with another window to perform 
  323. useful tasks, such as displaying a menu or scrolling information in a client 
  324. window.  The operating system provides several predefined control-window 
  325. classes that an application can use to create control windows.  Control windows 
  326. include buttons, entry fields, list boxes, combination boxes, menus, scroll 
  327. bars, static text, and title bars. 
  328.  
  329. A menu is a control window that presents a list of commands and other menus to 
  330. the user.  Using a mouse or the keyboard, the user can select a task; the 
  331. application then performs the selected task. 
  332.  
  333.  
  334. ΓòÉΓòÉΓòÉ 1.1.4. Window Input and Output ΓòÉΓòÉΓòÉ
  335.  
  336. The user directs input data to windows from a mouse and the keyboard.  Keyboard 
  337. input goes to the window with input focus, and, normally, mouse input goes to 
  338. the window under the mouse pointer. 
  339.  
  340. Windows also are places to display output data.  PM uses windows to display 
  341. text and graphics on the screen and to process input from the mouse and 
  342. keyboard.  Windows provide the same input and output capabilities as a virtual 
  343. graphics terminal without having direct control of the hardware. 
  344.  
  345. An application is responsible for painting the data for the window classes it 
  346. registers and creates.  This data can be graphics text or pictures or 
  347. fixed-size alphanumeric text.  Normally it is not necessary for the application 
  348. to paint the system-provided window classes; the OS/2 window procedures for 
  349. those window classes do the painting. 
  350.  
  351.  
  352. ΓòÉΓòÉΓòÉ 1.1.4.1. Active Window and Focus Window ΓòÉΓòÉΓòÉ
  353.  
  354. All frame-window ancestors of the input focus window are said to be active, 
  355. meaning that the user interacts with them.  The active window usually is the 
  356. topmost main window, which is positioned above all other top-level windows on 
  357. the screen.  The active window is indicated by some form of highlighting.  For 
  358. example, a highlighted title bar shows that a standard frame window is active; 
  359. an active dialog window has a highlighted border.  These types of highlighting 
  360. ensure that the user can see the window that is accepting input. 
  361.  
  362. A main window (or one of its child windows) is activated by using a mouse or 
  363. the keyboard.  When a window is activated, it receives a WM_ACTIVATE message 
  364. with its first parameter set to TRUE.  When it is deactivated, it receives a 
  365. WM_ACTIVATE message with its first parameter set to FALSE. The following figure 
  366. illustrates user interaction with a window. 
  367.  
  368. User Input to a Window 
  369.  
  370. The focus window can be the active window or one of its descendant windows. 
  371. The user can change the input focus the same way active windows are changed-by 
  372. mouse or keyboard.  However, the application has more control over the input 
  373. focus.  For example, in a window containing several text entry fields, the tab 
  374. keys can move the input focus from one input field to another.  A WM_SETFOCUS 
  375. message is sent to the window procedure when a window is gaining or losing the 
  376. input focus.  The WinQueryFocus function tells the user which window has the 
  377. input focus. 
  378.  
  379.  
  380. ΓòÉΓòÉΓòÉ 1.1.4.2. Messages ΓòÉΓòÉΓòÉ
  381.  
  382. Messages are a fundamental part of the operating system.  PM applications use 
  383. messages to communicate with the operating system and one another.  The system 
  384. uses messages to communicate with applications to ensure concurrent running and 
  385. sharing of devices.  Typically, a message notifies the receiving application 
  386. that an event has occurred.  The operating system identifies the appropriate 
  387. application window to receive a message by the window handle included in the 
  388. message.  Sources of events that cause messages to be issued to applications 
  389. are the user, the operating system, the application, or another application. 
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ 1.1.4.2.1. The User ΓòÉΓòÉΓòÉ
  393.  
  394. Mouse or keyboard input to an application window causes the operating system to 
  395. direct messages to that window. 
  396.  
  397.  
  398. ΓòÉΓòÉΓòÉ 1.1.4.2.2. The Operating System ΓòÉΓòÉΓòÉ
  399.  
  400. Managing the application windows on the screen, the operating system issues 
  401. messages to the windows, usually as an indirect result of user interaction. 
  402. These messages enable the system to work in a uniform and well-ordered manner. 
  403. For example, where several application windows overlap, and the user terminates 
  404. an application so that its window disappears, the operating system issues 
  405. messages to the underlying application windows so that they can repaint 
  406. themselves. 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 1.1.4.2.3. The Application ΓòÉΓòÉΓòÉ
  410.  
  411. An event can occur in the application to which another part of that application 
  412. should respond; for example, when the contents of its window no longer 
  413. accurately reflect the status of the application.  The application can define 
  414. its own messages outside the range of system-defined messages to communicate 
  415. such events. 
  416.  
  417.  
  418. ΓòÉΓòÉΓòÉ 1.1.4.2.4. Another Application ΓòÉΓòÉΓòÉ
  419.  
  420. Communication with other applications through the operating system ensures 
  421. cooperative use of the system; it even can be used to exchange data.  For 
  422. example, an arithmetic application can supply the results of a lengthy 
  423. calculation to a business graphics application. 
  424.  
  425.  
  426. ΓòÉΓòÉΓòÉ 1.1.4.3. Enabled and Disabled Windows ΓòÉΓòÉΓòÉ
  427.  
  428. An application uses the WinEnableWindow function to enable or disable window 
  429. input.  By default, a window is enabled when it is created.  However, an 
  430. application can disable a newly created window. 
  431.  
  432. An application usually disables a window to prevent the user from using the 
  433. window.  For example, an application might disable a push button in a dialog 
  434. window.  Enabling a window restores normal input; an application can enable a 
  435. disabled window at any time. 
  436.  
  437. When an application uses the WinEnableWindow function to disable an existing 
  438. window, that window also loses keyboard focus.  WinEnableWindow sets the 
  439. keyboard focus to NULL, which means that no window has the focus.  If a child 
  440. window or other descendant window has the keyboard focus, it loses the focus 
  441. when the parent window is disabled. 
  442.  
  443. An application can determine whether a window is enabled by calling 
  444. WinIsWindowEnabled. 
  445.  
  446.  
  447. ΓòÉΓòÉΓòÉ 1.1.4.4. System-Modal Window ΓòÉΓòÉΓòÉ
  448.  
  449. An application can designate a system-modal window: a window that receives all 
  450. keyboard and mouse input, effectively disabling all other windows.  The user 
  451. must respond to the system-modal window before continuing work in other 
  452. windows.  An application sets and clears the system-modal window by using the 
  453. WinSetSysModalWindow function. 
  454.  
  455. Because system-modal windows have absolute control of input, you must be 
  456. careful when using them in your applications.  Ideally, an application uses a 
  457. system-modal window only when there is danger of losing data if the user does 
  458. not respond to a problem immediately. 
  459.  
  460. Although an application can destroy a system-modal window, the new active 
  461. window then becomes a system-modal window.  An application can make another 
  462. window active while the first system-modal window exists.  But again, the new 
  463. active window will become the system-modal window.  In general, once a 
  464. system-modal window is set, it continues to exist in the PM session until the 
  465. application explicitly clears it. 
  466.  
  467.  
  468. ΓòÉΓòÉΓòÉ 1.1.5. Window Creation ΓòÉΓòÉΓòÉ
  469.  
  470. Before any thread in an application can create windows, it must: 
  471.  
  472.  1. Call WinInitialize to create an anchor block 
  473.  2. Call WinCreateMsgQueue to create a message queue for the thread. 
  474.  
  475. Then, it can create one or more windows by calling one of the window-creation 
  476. functions, such as WinCreateWindow. 
  477.  
  478. The window-creation functions require that the following information be 
  479. supplied in some form: 
  480.  
  481. o Class 
  482. o Styles 
  483. o Name 
  484. o Parent window 
  485. o Position relative to the parent window 
  486. o Position relative to any sibling windows (z-order) 
  487. o Dimensions 
  488. o Owner window 
  489. o Identifier 
  490. o Class-specific data 
  491. o Resources. 
  492.  
  493. Every window belongs to a window class that defines that window's appearance 
  494. and behavior.  The chief component of the window class is the window procedure. 
  495. The window procedure is the function that receives and processes all messages 
  496. sent to the window. 
  497.  
  498. Every window has a style.  The window style specifies aspects of a window's 
  499. appearance and behavior that are not specified by the window's class.  For 
  500. example, the WC_FRAME class always creates a frame window, but the FS_BORDER, 
  501. FS_DLGBORDER, and FS_SIZEBORDER styles determine the style of a frame window's 
  502. border.  A few window styles apply to all windows, but most apply only to 
  503. windows of specific window classes.  The window procedure for a given class 
  504. interprets the style and allows an application to adapt a window of a given 
  505. class for a special circumstance.  For example, an application can give a 
  506. window the style WS_SYNCPAINT to cause it to be painted immediately whenever 
  507. any portion of the window becomes invalid.  Normally, a window is painted only 
  508. if there are no messages waiting in the message queue. 
  509.  
  510. A window can have a text string associated with it.  Typically, the window text 
  511. is displayed in the window or in a title bar.  The class of window determines 
  512. whether the window displays the text and, if so, where the text appears within 
  513. the window. 
  514.  
  515. Every window except the desktop window and desktop-object window has a parent 
  516. window.  The parent provides the coordinate system used to position the window 
  517. and also affects aspects of a window's appearance.  For example, when the 
  518. parent window is minimized, hidden, or destroyed, the parent's child windows 
  519. are minimized, hidden, or destroyed also. 
  520.  
  521. Every window has a screen position, size, and z-order position.  The screen 
  522. position is the location of the window's lower-left corner, relative to the 
  523. lower-left corner of its parent window.  A window's size is its width and 
  524. height, measured in pels.  A window's z-order position is the position of the 
  525. window in the order of overlapping windows.  This viewing order is oriented 
  526. along an imaginary axis, the z axis, extending outward from the screen.  The 
  527. window at the top of the z-order overlaps all sibling windows (that is, windows 
  528. having the same parent window).  A window at the bottom of the z-order is 
  529. overlapped by all sibling windows.  An application sets a window's z-order 
  530. position by placing it behind a given sibling window or at the top or bottom of 
  531. the z-order of the windows. 
  532.  
  533. A window can own, or be owned by, another window.  The owner-owned relationship 
  534. affects how messages are sent between windows, allowing an application to 
  535. create combinations of windows that work together.  A window issues messages 
  536. about its state to its owner window; the owner window issues messages back 
  537. about what action to perform next. 
  538.  
  539. The window handle is a unique number across the system that is totally 
  540. unambiguous-it identifies one particular window in the system and is assigned 
  541. by the system.  A window identifier is analogous to a "given" name in family 
  542. relationships-the only requirement is that the name be unique among siblings. 
  543.  
  544. A window can have class-specific data that further defines how the window 
  545. appears and behaves when it is created.  The system passes the class-specific 
  546. data to the window procedure, which then applies the data to the new window. 
  547.  
  548.  
  549. ΓòÉΓòÉΓòÉ 1.1.5.1. Window-Creation Functions ΓòÉΓòÉΓòÉ
  550.  
  551. The basic window-creation function is WinCreateWindow.  This function uses 
  552. information about a window's class, style, size, and position to create a new 
  553. window.  All other window-creation functions, such as WinCreateStdWindow and 
  554. WinCreateDlg, supply some of this information by default and create windows of 
  555. a specific class or style. 
  556.  
  557. Although the WinCreateWindow function provides the most direct means of 
  558. creating a window, most applications do not use it.  Instead, they often use 
  559. the WinCreateStdWindow function to create a main window and the WinDlgBox or 
  560. WinCreateDlg functions to create dialog windows. 
  561.  
  562. The WinCreateMenu, WinLoadMenu, WinLoadDlg, WinMessageBox, and 
  563. WinCreateFrameControls functions also create windows.  Each of these functions 
  564. substitutes for one or more required calls to WinCreateWindow to create a given 
  565. window.  For example, an application can create a frame window, one or more 
  566. control windows, and a client window in a single call to WinCreateStdWindow. 
  567.  
  568.  
  569. ΓòÉΓòÉΓòÉ 1.1.5.2. Window-Creation Messages ΓòÉΓòÉΓòÉ
  570.  
  571. While creating a window, the system sends messages to that window's window 
  572. procedure.  The window procedure receives a WM_CREATE message, saying that the 
  573. window is being created.  The window also receives a WM_ADJUSTWINDOWPOS 
  574. message, specifying the initial size and position of the window being created. 
  575. This message lets the window procedure adjust the size and position of the 
  576. window before the window is displayed. 
  577.  
  578. The system also sends other messages while creating a window; the number and 
  579. order of these messages depend on the class and style of the window and the 
  580. function used to create it. 
  581.  
  582.  
  583. ΓòÉΓòÉΓòÉ 1.1.6. Window Classes ΓòÉΓòÉΓòÉ
  584.  
  585. Each window of a specific window class uses the window procedure associated 
  586. with that class.  An application can create one or more windows that belong to 
  587. the same window class.  Because each window of the same class is processed by 
  588. the same window procedure, they all behave the same way.  Since many windows 
  589. can result from one window procedure, coding overhead is greatly reduced. 
  590. There are two types of window classes: public and private. 
  591.  
  592.  
  593. ΓòÉΓòÉΓòÉ 1.1.6.1. Public Window Classes ΓòÉΓòÉΓòÉ
  594.  
  595. A public window class is one that has a reentrant window procedure that is 
  596. registered and resides in a dynamic link library (DLL); it can be used by any 
  597. process in the system to create windows.  The operating system provides several 
  598. preregistered public window classes.  You can specify the system-provided 
  599. window classes by using the symbolic identifiers that have the prefix WC_, as 
  600. shown in the following table: 
  601.  
  602. Window Classes 
  603.  
  604. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  605. ΓöéClass Name     ΓöéDescription                                  Γöé
  606. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  607. ΓöéWC_BUTTON      ΓöéConsists of buttons and boxes the user can   Γöé
  608. Γöé               Γöéselect by clicking the pointing device or    Γöé
  609. Γöé               Γöéusing the keyboard.                          Γöé
  610. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  611. ΓöéWC_CONTAINER   ΓöéCreates a control for the user to group      Γöé
  612. Γöé               Γöéobjects in a logical manner.  A container canΓöé
  613. Γöé               Γöédisplay those objects in various formats or  Γöé
  614. Γöé               Γöéviews.  The container control supports drag  Γöé
  615. Γöé               Γöéand drop so the user can place information inΓöé
  616. Γöé               Γöéa container by simply dragging and dropping. Γöé
  617. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  618. ΓöéWC_ENTRYFIELD  ΓöéConsists of a single line of text that the   Γöé
  619. Γöé               Γöéuser can edit.                               Γöé
  620. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  621. ΓöéWC_FRAME       ΓöéA window class that can contain child windowsΓöé
  622. Γöé               Γöéof many of the other window classes.         Γöé
  623. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  624. ΓöéWC_LISTBOX     ΓöéPresents a list of text items from which the Γöé
  625. Γöé               Γöéuser can make selections.                    Γöé
  626. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  627. ΓöéWC_MENU        ΓöéPresents a list of items that can be         Γöé
  628. Γöé               Γöédisplayed horizontally as menu bars, or      Γöé
  629. Γöé               Γöévertically as pull-down menus.  Menus usuallyΓöé
  630. Γöé               Γöéare used to provide a command interface to   Γöé
  631. Γöé               Γöéapplications.                                Γöé
  632. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  633. ΓöéWC_NOTEBOOK    ΓöéCreates a control for the user that is       Γöé
  634. Γöé               Γöédisplayed as a number of pages.  The top pageΓöé
  635. Γöé               Γöéis visible, and the others are hidden, with  Γöé
  636. Γöé               Γöétheir presence being indicated by a visible  Γöé
  637. Γöé               Γöéedge on each of the back pages.              Γöé
  638. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  639. ΓöéWC_SCROLLBAR   ΓöéLets the user scroll the contents of an      Γöé
  640. Γöé               Γöéassociated window.                           Γöé
  641. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  642. ΓöéWC_SLIDER      ΓöéCreates a control that is usable for         Γöé
  643. Γöé               Γöéproducing approximate (analog) values or     Γöé
  644. Γöé               Γöéproperties.  Scroll bars were used for this  Γöé
  645. Γöé               Γöéfunction in the past, but the slider providesΓöé
  646. Γöé               Γöéa more flexible method of achieving the same Γöé
  647. Γöé               Γöéresult, with less programming effort.        Γöé
  648. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  649. ΓöéWC_SPINBUTTON  ΓöéCreates a control that presents itself to theΓöé
  650. Γöé               Γöéuser as a scrollable ring of choices, giving Γöé
  651. Γöé               Γöéthe user quick access to the data.  The user Γöé
  652. Γöé               Γöéis presented only one item at a time, so the Γöé
  653. Γöé               Γöéspin button should be used with data that is Γöé
  654. Γöé               Γöéintuitively related.                         Γöé
  655. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  656. ΓöéWC_STATIC      ΓöéSimple display items that do not respond to  Γöé
  657. Γöé               Γöékeyboard or pointing device events.          Γöé
  658. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  659. ΓöéWC_TITLEBAR    ΓöéDisplays the window title or caption and letsΓöé
  660. Γöé               Γöéthe user move the window's owner.            Γöé
  661. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  662. ΓöéWC_VALUESET    ΓöéCreates a control similar in function to the Γöé
  663. Γöé               Γöéradio buttons but provides additional        Γöé
  664. Γöé               Γöéflexibility to display graphical, textual,   Γöé
  665. Γöé               Γöéand numeric formats.  The values set with    Γöé
  666. Γöé               Γöéthis control are mutually exclusive.         Γöé
  667. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  668.  
  669. With the exception of WC_FRAME, the system-provided window classes are known as 
  670. control window classes, because they give the user an easy means of controlling 
  671. specific types of interaction.  For example, the WC_BUTTON class allows single 
  672. or multiple selections.  These windows conform to the IBM* Systems Application 
  673. Architecture* (SAA*) Common User Access* (CUA*) definition.  They are designed 
  674. specifically to provide function that meets the needs for a graphics-based 
  675. standard user interface.  The code fragments provided in this guide make 
  676. extensive use of the system window classes. 
  677.  
  678.  
  679. ΓòÉΓòÉΓòÉ 1.1.6.2. Private Window Classes ΓòÉΓòÉΓòÉ
  680.  
  681. A private window class is one that an application registers for its own use; it 
  682. is available only to the process that registers it.  The application-provided 
  683. window procedure for a private window class resides either in the application's 
  684. executable files or in a DLL file.  A private window class is deleted when its 
  685. registering process is terminated. 
  686.  
  687.  
  688. ΓòÉΓòÉΓòÉ 1.1.7. Window Styles ΓòÉΓòÉΓòÉ
  689.  
  690. A window can have a combination of styles; an application can combine styles by 
  691. using the bitwise inclusive OR operator.  An application usually sets the 
  692. window styles when it creates the window.  The OS/2 operating system provides 
  693. several standard window styles that apply to all windows.  It also provides 
  694. many styles for the predefined frame and control windows.  The frame and 
  695. control styles are unique to each predefined window class and can be used only 
  696. for windows of the corresponding class. 
  697.  
  698. Initially, the styles of the window class used to create the window determine 
  699. the styles of the new window.  For example, if the window class has the style 
  700. CS_SYNCPAINT, all windows created using that class, by default, will have the 
  701. window style WS_SYNCPAINT. 
  702.  
  703. The OS/2 operating system has the following standard window styles: 
  704.  
  705. Standard Window Styles 
  706.  
  707. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  708. ΓöéStyle Name     ΓöéDescription                                  Γöé
  709. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  710. ΓöéWS_CLIPCHILDRENΓöéPrevents a window from painting over its     Γöé
  711. Γöé               Γöéchild windows. This style increases the time Γöé
  712. Γöé               Γöénecessary to calculate the visible region.   Γöé
  713. Γöé               ΓöéThis style is usually not necessary, because Γöé
  714. Γöé               Γöéif the parent and child windows overlap and  Γöé
  715. Γöé               Γöéboth are invalidated, the system draws the   Γöé
  716. Γöé               Γöéparent window before drawing the child       Γöé
  717. Γöé               Γöéwindow. If the child window is invalidated   Γöé
  718. Γöé               Γöéindependently of the parent window, the      Γöé
  719. Γöé               Γöésystem redraws only the child window. If the Γöé
  720. Γöé               Γöéupdate region of the parent window does not  Γöé
  721. Γöé               Γöéintersect the child window, drawing the      Γöé
  722. Γöé               Γöéparent window causes the child window to be  Γöé
  723. Γöé               Γöéredrawn. This style is useful to prevent a   Γöé
  724. Γöé               Γöéchild window that contains a complex graphic Γöé
  725. Γöé               Γöéfrom being redrawn unnecessarily.            Γöé
  726. Γöé               ΓöéWS_CLIPCHILDREN is an absolute requirement ifΓöé
  727. Γöé               Γöéa window with children ever performs output  Γöé
  728. Γöé               Γöéin response to any message other than        Γöé
  729. Γöé               ΓöéWM_PAINT. Only WM_PAINT processing is        Γöé
  730. Γöé               Γöésynchronized such that the children will get Γöé
  731. Γöé               Γöétheir messages after the parent.             Γöé
  732. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  733. ΓöéWS_CLIPSIBLINGSΓöéPrevents a window from painting over its     Γöé
  734. Γöé               Γöésibling windows. This style protects sibling Γöé
  735. Γöé               Γöéwindows but increases the time necessary to  Γöé
  736. Γöé               Γöécalculate the visible region. This style is  Γöé
  737. Γöé               Γöéappropriate for windows that overlap and thatΓöé
  738. Γöé               Γöéhave the same parent window.                 Γöé
  739. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  740. ΓöéWS_DISABLED    ΓöéUsed by an application to disable a window.  Γöé
  741. Γöé               ΓöéIt is up to the window to recognize this     Γöé
  742. Γöé               Γöéstyle and reject input.                      Γöé
  743. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  744. ΓöéWS_GROUP       ΓöéSpecifies the first control of a group of    Γöé
  745. Γöé               Γöécontrols in which the user can move from one Γöé
  746. Γöé               Γöécontrol to the next by using the ARROW keys. Γöé
  747. Γöé               ΓöéAll controls defined after the control with  Γöé
  748. Γöé               Γöéthe WS_GROUP style belong to the same group. Γöé
  749. Γöé               ΓöéThe next control with the WS_GROUP style endsΓöé
  750. Γöé               Γöéthe first group and starts a new group.      Γöé
  751. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  752. ΓöéWS_MAXIMIZED   ΓöéEnlarges a window to the maximum size.       Γöé
  753. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  754. ΓöéWS_MINIMIZED   ΓöéReduces a window to the size of an icon.     Γöé
  755. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  756. ΓöéWS_PARENTCLIP  ΓöéExtends a window's visible region to include Γöé
  757. Γöé               Γöéthat of its parent window. This style        Γöé
  758. Γöé               Γöésimplifies the calculation of the child      Γöé
  759. Γöé               Γöéwindow's visible region but is potentially   Γöé
  760. Γöé               Γöédangerous, because the parent window's       Γöé
  761. Γöé               Γöévisible region is usually larger than the    Γöé
  762. Γöé               Γöéchild window.                                Γöé
  763. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  764. ΓöéWS_SAVEBITS    ΓöéSaves the screen area under a window as a bitΓöé
  765. Γöé               Γöémap. When the user hides or moves the window,Γöé
  766. Γöé               Γöéthe system restores the image by copying the Γöé
  767. Γöé               Γöébits; there is no need to add the area to theΓöé
  768. Γöé               Γöéuncovered window's update region. The style  Γöé
  769. Γöé               Γöécan improve system performance but also can  Γöé
  770. Γöé               Γöéconsume a great deal of memory. It is        Γöé
  771. Γöé               Γöérecommended only for transient windows, such Γöé
  772. Γöé               Γöéas menus and dialog windows, not for main    Γöé
  773. Γöé               Γöéapplication windows.                         Γöé
  774. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  775. ΓöéWS_SYNCPAINT   ΓöéCauses a window to receive WM_PAINT messages Γöé
  776. Γöé               Γöéimmediately after a part of the window       Γöé
  777. Γöé               Γöébecomes invalid. Without this style, the     Γöé
  778. Γöé               Γöéwindow receives WM_PAINT messages only if no Γöé
  779. Γöé               Γöéother message is waiting to be processed.    Γöé
  780. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  781. ΓöéWS_TABSTOP     ΓöéSpecifies one of any number of controls      Γöé
  782. Γöé               Γöéthrough which the user can move by tabbing.  Γöé
  783. Γöé               ΓöéPressing the TAB key moves the keyboard focusΓöé
  784. Γöé               Γöéto the next control that has the WS_TABSTOP  Γöé
  785. Γöé               Γöéstyle.                                       Γöé
  786. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  787. ΓöéWS_VISIBLE     ΓöéMakes a window visible. The operating system Γöé
  788. Γöé               Γöédraws the window on the screen unless        Γöé
  789. Γöé               Γöéoverlapping windows completely obscure it.   Γöé
  790. Γöé               ΓöéWindows without this style are hidden. If    Γöé
  791. Γöé               Γöéoverlapping windows completely obscure the   Γöé
  792. Γöé               Γöéwindow, the window is still considered       Γöé
  793. Γöé               Γöévisible. (Visibility means that the operatingΓöé
  794. Γöé               Γöésystem draws the window if it can.)          Γöé
  795. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  796.  
  797.  
  798. ΓòÉΓòÉΓòÉ 1.1.8. Window Handles ΓòÉΓòÉΓòÉ
  799.  
  800. After creating a window, the creation function returns a window handle that 
  801. uniquely identifies the window.  An application can use this handle to direct 
  802. the action of functions to the window.  Window handles have the data type HWND; 
  803. applications must use this data type when declaring variables that hold window 
  804. handles. 
  805.  
  806. There are special constants that an application can use instead of a window 
  807. handle in certain functions.  For example, an application can use HWND_DESKTOP 
  808. in the WinCreateWindow function to specify the desktop window as the new 
  809. window's parent. Similarly, HWND_OBJECT represents the desktop-object window. 
  810. HWND_TOP and HWND_BOTTOM represent the top and bottom positions relative to the 
  811. z-order position of a window. 
  812.  
  813. Although the NULL constant is not a window handle, an application can use it in 
  814. some functions to specify that no window is affected.  For example, an 
  815. application can use NULL in the WinCreateWindow function to create a window 
  816. that has no owner window.  Some functions might return NULL, indicating that 
  817. the given action applies to no window. 
  818.  
  819.  
  820. ΓòÉΓòÉΓòÉ 1.1.9. Window Size and Position ΓòÉΓòÉΓòÉ
  821.  
  822. A window's size and position can be expressed as a bounding rectangle, given in 
  823. coordinates relative to its parent.  An application specifies the window's 
  824. initial size and position when creating the window. 
  825.  
  826. To use the system-default values for the initial size and position of a frame 
  827. window, an application can specify the FCF_SHELLPOSITION frame-creation flag. 
  828. The application can change a window's size and position at any time. The 
  829. following figure indicates the size and position coordinates of a parent window 
  830. and a child window. 
  831.  
  832. Window Sizing and Positioning 
  833.  
  834. Note: 
  835.  
  836. The default coordinate system for a window specifies that the point (0,0) is at 
  837. the lower-left corner of the window, with coordinates increasing as they go 
  838. upward and to the right. 
  839.  
  840. A window can be positioned anywhere in relation to its parent. 
  841.  
  842.  
  843. ΓòÉΓòÉΓòÉ 1.1.9.1. Size ΓòÉΓòÉΓòÉ
  844.  
  845. A window's size (width and height) is given in pels, in the range 0 through 
  846. 65535.  A window can have 0 width and height; however, a window with 0 width or 
  847. height is not drawn on the screen, even though it has the WS_VISIBLE style. 
  848.  
  849. An application can create very large windows; however, it should check the size 
  850. of the screen before enlarging a window size.  One way to choose an appropriate 
  851. size is to use the WinGetMaxPosition function to retrieve the size of the 
  852. maximized window.  A window that is larger than its maximized size will be 
  853. larger than the screen also. 
  854.  
  855. An application can retrieve the current size of the window by using the 
  856. WinQueryWindowRect function. 
  857.  
  858.  
  859. ΓòÉΓòÉΓòÉ 1.1.9.2. Position ΓòÉΓòÉΓòÉ
  860.  
  861. A window's position is defined as the x,y coordinates of its lower-left corner. 
  862. These coordinates, sometimes called window coordinates, always are relative to 
  863. the lower-left corner of the parent window.  For example, a window having the 
  864. coordinates (10,10) is placed 10 pels to the right of, and 10 pels up from, the 
  865. lower-left corner of its parent window.  Notice, however, that a window can be 
  866. positioned anywhere in relation to its parent, but always relative to the 
  867. parent's lower-left corner. 
  868.  
  869. Adjusting a window's position can improve drawing performance.  For example, an 
  870. application could position a window so that its horizontal position is a 
  871. multiple of 8, relative to the screen origin (the lower-left corner of the 
  872. screen).  Coordinates that are multiples of 8 correspond to byte boundaries in 
  873. the screen-memory bit map.  It is usually faster to start drawing at a byte 
  874. boundary. 
  875.  
  876. By default, the system positions a frame window on a byte boundary; but an 
  877. application can override this action by using the FCF_NOBYTEALIGN style when 
  878. creating the window. 
  879.  
  880.  
  881. ΓòÉΓòÉΓòÉ 1.1.9.3. Size and Position Messages ΓòÉΓòÉΓòÉ
  882.  
  883. A window receives messages when it changes size or position.  Before a change 
  884. is made, the system might send a WM_ADJUSTWINDOWPOS message to allow the window 
  885. procedure to make final adjustments to the window's size and position.  This 
  886. message includes a pointer to an SWP structure that contains the requested 
  887. width, height, and position.  If the window procedure adjusts these values in 
  888. the structure, the system uses the adjusted values to redraw the window.  The 
  889. WM_ADJUSTWINDOWPOS message is not sent if the change is a result of a call to 
  890. the WinSetWindowPos function with the SWP_NOADJUST constant specified. 
  891.  
  892. After a change has been made to a window, the system sends a WM_SIZE message to 
  893. specify the new size of the window.  If the window has the class style 
  894. CS_MOVENOTIFY, the system also sends a WM_MOVE message, which includes the new 
  895. position for the window.  The system sends a WM_SHOW message if the visibility 
  896. of the window has changed. 
  897.  
  898.  
  899. ΓòÉΓòÉΓòÉ 1.1.9.4. System Commands ΓòÉΓòÉΓòÉ
  900.  
  901. An application that has a window with a system menu can change the size and 
  902. position of that window by sending system commands.  The system commands are 
  903. generated when the user chooses commands from the system menu.  An application 
  904. can emulate the user action by sending a WM_SYSCOMMAND message to the window. 
  905.  
  906. Following are some of the system commands: 
  907.  
  908. System Commands 
  909.  
  910. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  911. ΓöéCommand        ΓöéDescription                                  Γöé
  912. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  913. ΓöéSC_SIZE        ΓöéStarts a Size command.  The user can change  Γöé
  914. Γöé               Γöéthe size of the window with a mouse and the  Γöé
  915. Γöé               Γöékeyboard.                                    Γöé
  916. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  917. ΓöéSC_MOVE        ΓöéStarts a Move command.  The user can move theΓöé
  918. Γöé               Γöéwindow with a mouse and the keyboard.        Γöé
  919. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  920. ΓöéSC_MINIMIZE    ΓöéMinimizes the window.                        Γöé
  921. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  922. ΓöéSC_MAXIMIZE    ΓöéMaximizes the window.                        Γöé
  923. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  924. ΓöéSC_RESTORE     ΓöéRestores a minimized or maximized window to  Γöé
  925. Γöé               Γöéits previous size and position.              Γöé
  926. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  927. ΓöéSC_CLOSE       ΓöéCloses the window.  This command sends a     Γöé
  928. Γöé               ΓöéWM_CLOSE message to the window.  The window  Γöé
  929. Γöé               Γöéperforms all tasks needed to clean up and    Γöé
  930. Γöé               Γöédestroy itself.                              Γöé
  931. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  932.  
  933.  
  934. ΓòÉΓòÉΓòÉ 1.1.10. Window Data ΓòÉΓòÉΓòÉ
  935.  
  936. Every window has an associated data structure. The window data structure 
  937. contains all the information specified for the window at the time it was 
  938. created and any additional information supplied for the window since that time. 
  939. Although the exact size and meaning of the information in the window data 
  940. structure are private to the system, an application can access any of the 
  941. following data items via system-provided functions: 
  942.  
  943. o Pointer to window-instance data structure 
  944. o Pointer to window procedure 
  945. o Parent-window handle 
  946. o Owner-window handle 
  947. o Handle of first child window 
  948. o Handle of next sibling window 
  949. o Window size and position (expressed as a rectangle) 
  950. o Window style 
  951. o Window identifier 
  952. o Update-region handle 
  953. o Message-queue handle. 
  954.  
  955. An application can examine and modify this data by using functions such as 
  956. WinQueryWindowUShort and WinSetWindowUShort. These functions let an application 
  957. access data that is stored as 16-bit integers. Other functions let an 
  958. application access data containing 32-bit integers and pointers.  Several 
  959. functions indirectly affect the data items in the window data structure.  For 
  960. example, the WinSubclassWindow function replaces the window-procedure pointer, 
  961. and the WinSetWindowPos function changes the size and position of the window. 
  962.  
  963. An application can extend the number of available data items in the window data 
  964. structure by specifying a count of extra bytes when it registers the 
  965. corresponding window class.  Then, the window procedure can use these bytes to 
  966. store information about the window.  The WinQueryWindowUShort and 
  967. WinSetWindowUShort functions give direct access to the extra bytes. 
  968.  
  969. It generally is not a good idea to use direct storage in the window data.  It 
  970. is better to allocate a data structure dynamically and set a pointer to that 
  971. data structure in the window words.  This provides two advantages: 
  972.  
  973.  1. Most importantly, it is a symbolic way of referencing the data structure. 
  974.     It is very easy to make mistakes and provide the wrong offsets to 
  975.     WinQueryWindowUShort and so forth. 
  976.  
  977.  2. You now can add and remove fields without cross dependencies, because you 
  978.     now use symbolic references; whereas, when you use the technique of putting 
  979.     window words directly in the window data structure, you have to account for 
  980.     changed offsets. 
  981.  
  982.  
  983. ΓòÉΓòÉΓòÉ 1.1.11. Window Resources ΓòÉΓòÉΓòÉ
  984.  
  985. Window resources are read-only data segments stored in an application's EXE 
  986. file or in a dynamic link library's DLL file.  Predefined PM window resources 
  987. include keyboard accelerator tables, icons, menus, bit maps, dialog boxes, and 
  988. so forth; these are not a regular part of the application window's code and 
  989. data.  Because, in most cases, window resources are not loaded into memory when 
  990. the operating system runs a program, the resources can be shared by multiple 
  991. instances of the same application. 
  992.  
  993. Most window resources are stored in a format that is unique to each resource 
  994. type.  The application does not need to know these formats because the system 
  995. translates them, as necessary, for use in PM functions.  The following table 
  996. lists the ten most commonly used PM window resource types. 
  997.  
  998. Presentation Manager-Defined Resource Types 
  999.  
  1000. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1001. ΓöéResource Identifier     ΓöéDescription                         Γöé
  1002. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1003. ΓöéRT_ACCELTABLE           ΓöéKeyboard accelerator table          Γöé
  1004. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1005. ΓöéRT_BITMAP               ΓöéBit map                             Γöé
  1006. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1007. ΓöéRT_DIALOG               ΓöéDialog box template                 Γöé
  1008. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1009. ΓöéRT_FONT                 ΓöéFont                                Γöé
  1010. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1011. ΓöéRT_FONTDIR              ΓöéFont directory                      Γöé
  1012. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1013. ΓöéRT_MENU                 ΓöéMenu template                       Γöé
  1014. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1015. ΓöéRT_MESSAGE              ΓöéMessage string                      Γöé
  1016. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1017. ΓöéRT_POINTER              ΓöéIcon or mouse                       Γöé
  1018. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1019. ΓöéRT_RCDATA               ΓöéProgrammer-defined data             Γöé
  1020. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1021. ΓöéRT_STRING               ΓöéText string                         Γöé
  1022. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1023. To access these resources, you must prepare a resource file (ASCII file with 
  1024. the extension .RC). Then the ASCII resource file must be compiled into binary 
  1025. images using the resource compiler.  The compiled resource file extension is 
  1026. RES; it can be linked into your program's EXE file or to a dynamic link 
  1027. library's DLL file. 
  1028.  
  1029.  
  1030. ΓòÉΓòÉΓòÉ 1.1.12. Maximized and Minimized Windows ΓòÉΓòÉΓòÉ
  1031.  
  1032. A maximized window is a window that has been enlarged to fill the screen. 
  1033. Although a window's size can be set so that it fills the screen exactly, a 
  1034. maximized window is slightly different: the system automatically moves the 
  1035. window's title bar to the top of the screen and sets the WS_MAXIMIZED style for 
  1036. the window. 
  1037.  
  1038. A minimized window is a window whose size has been reduced to exactly the size 
  1039. of an icon or, in the workplace shell, it disappears altogether (by default). 
  1040. Like a maximized window, a minimized window is more than just a window of a 
  1041. given size; typically, the system moves the (icon) minimized window to the 
  1042. lower part of the screen and sets the WS_MINIMIZED style for that window.  The 
  1043. lower part of the screen is sometimes called the icon area.  Unless the 
  1044. application specifies another position, the system moves a minimized window 
  1045. into the first available icon position in the icon area. 
  1046.  
  1047. If a window is created with the WS_MAXIMIZED or WS_MINIMIZED styles, the system 
  1048. draws the window as a maximized or minimized window. 
  1049.  
  1050. An application can restore maximized or minimized windows to their previous 
  1051. size and position by specifying the SWP_RESTORE flag in a call to the 
  1052. WinSetWindowPos function. 
  1053.  
  1054.  
  1055. ΓòÉΓòÉΓòÉ 1.1.13. Window Visibility ΓòÉΓòÉΓòÉ
  1056.  
  1057. A window that is a descendant of the desktop window can be either visible or 
  1058. invisible.  The system displays a visible window on the screen.  It hides an 
  1059. invisible window by not drawing it.  If a window is visible, the user can 
  1060. supply input to the window and view the window's output.  If a window is 
  1061. invisible, the window, in effect, is disabled.  An invisible window can process 
  1062. messages from the system or from other windows, but it cannot process user 
  1063. input or display output.  An application sets a window's visibility state when 
  1064. it creates the window.  Later, a user or the application can change the 
  1065. visibility state. 
  1066.  
  1067. The visible region of a window is the position clipped by any overlapping 
  1068. windows.  These overlapping windows can be child windows or other main windows 
  1069. in the system.  The visible region is defined by a set of one or more 
  1070. rectangles, as shown in the following figure. 
  1071.  
  1072.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1073.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæ Γöé
  1074.  Γöé Γûæ A ΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé
  1075.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæ Γöé            B  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé
  1076.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ         Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé
  1077.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé C             Γöé         Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé
  1078.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé               Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé
  1079.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ Γöé               Γöé ΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæ Γöé
  1080.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæ ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1081.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæ Γöé D             Γöé
  1082.  Γöé ΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæΓûæ Γöé               Γöé
  1083.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ               Γöé
  1084.                                        ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1085.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1086.  Γöé ΓûæΓûæΓûæΓûæΓûæ Γöé - Visible region for Window A
  1087.  Γöé ΓûæΓûæΓûæΓûæΓûæ Γöé
  1088.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1089.  
  1090. Visible Region for Window A 
  1091.  
  1092. A window is visible if the WS_VISIBLE style is set for the window.  By default, 
  1093. the WinCreateWindow function creates invisible windows unless the application 
  1094. specifies WS_VISIBLE.  The application often hides a window to keep its 
  1095. operational details from the user.  For example, an application can keep a new 
  1096. window invisible while it customizes the window's appearance.  An application 
  1097. can determine whether a window has the WS_VISIBLE style by using the 
  1098. WinIsWindowVisible function. 
  1099.  
  1100. Even if a window has the WS_VISIBLE style, the user might not be able to see 
  1101. the window on the screen because other windows completely overlap it, or it 
  1102. might have been moved beyond the edge of its parent.  A visible window is 
  1103. subject to the clipping rules established by its parent-child relationship.  If 
  1104. the window's parent window is not visible, the window will not be visible. 
  1105. Because a child window is drawn relative to its parent's lower-left corner, if 
  1106. the parent window is moved beyond the edge of the screen, the child window also 
  1107. will be moved.  In other words, if a user moves the parent window containing 
  1108. the child window far enough off the edge of the screen, the user will not be 
  1109. able to see the child window, even though the child window and its parent 
  1110. window have the WS_VISIBLE style.  To determine whether the user actually can 
  1111. see a window, an application can use the WinIsWindowShowing function. 
  1112.  
  1113.  
  1114. ΓòÉΓòÉΓòÉ 1.1.14. Window Destruction ΓòÉΓòÉΓòÉ
  1115.  
  1116. In general, an application must destroy all the windows it creates. It does 
  1117. this by using the WinDestroyWindow function.  When a window is destroyed, the 
  1118. system hides the window, if it is visible, and then removes any internal data 
  1119. associated with the window.  This invalidates the window handle so that it can 
  1120. no longer be used by the application. 
  1121.  
  1122. An application destroys many of the windows it creates soon after creating 
  1123. them.  For example, an application usually destroys a dialog window as soon as 
  1124. the application has sufficient input from the user to continue its task.  An 
  1125. application eventually destroys the main window of the application (before 
  1126. terminating). 
  1127.  
  1128. Destroying a window does not affect the window class from which the window was 
  1129. created.  New windows still can be created using that class, and any existing 
  1130. windows of that class continue to operate. 
  1131.  
  1132. When the application calls WinDestroyWindow, the system searches the 
  1133. descendancy tree for all windows below the specified window and destroys them 
  1134. from the bottom up, so each child receives WM_DESTROY before its parent.  Each 
  1135. destroyed window is responsible for cleaning up its own resources in response 
  1136. to the WM_DESTROY message. 
  1137.  
  1138. If a presentation space was created by the WinGetPS function for any of the 
  1139. windows to be destroyed, it must be released by calling the WinReleasePS 
  1140. function.  The application must do this before calling the WinDestroyWindow 
  1141. function.  If a presentation space is associated with the device context for 
  1142. the window, the application must disassociate or destroy the presentation space 
  1143. by using the GpiAssociate or GpiDestroyPS function before calling 
  1144. WinDestroyWindow.  Failing to release a resource can cause an error. 
  1145.  
  1146. For more information about presentation spaces and device contexts, see 
  1147. Painting and Drawing. 
  1148.  
  1149. If the window being destroyed is the active window, both the active and focus 
  1150. states are transferred to another window.  The window that becomes the active 
  1151. window is the next window, as determined by the Alt+Esc key combination.  The 
  1152. new active window then determines which window receives the keyboard focus. 
  1153.  
  1154.  
  1155. ΓòÉΓòÉΓòÉ 1.2. Using Windows ΓòÉΓòÉΓòÉ
  1156.  
  1157. The following sections explain how to create and use windows in an application, 
  1158. how to manage ownership and parent-child window relationships, and how to move 
  1159. and size windows. 
  1160.  
  1161.  
  1162. ΓòÉΓòÉΓòÉ 1.2.1. Creating a Top-Level Frame Window ΓòÉΓòÉΓòÉ
  1163.  
  1164. The main window in most applications is a top-level frame window. An 
  1165. application creates a top-level frame window by specifying the handle of the 
  1166. desktop window, or HWND_DESKTOP, as the hwndParent parameter in a call to the 
  1167. WinCreateStdWindow function. 
  1168.  
  1169. The following figure shows the main() function for a simple PM application. 
  1170. This function initializes the application, creates a message queue, and 
  1171. registers the window class for the client window before creating a top-level 
  1172. frame window. 
  1173.  
  1174.     #define IDR_RESOURCES 1
  1175.  
  1176.     MRESULT EXPENTRY ClientWndProc(HWND, ULONG, MPARAM, MPARAM);
  1177.  
  1178.     int main(VOID)
  1179.     {
  1180.         HWND hwndFrame;
  1181.         HWND hwndClient;
  1182.         HMQ  hmq;
  1183.         QMSG qmsg;
  1184.         HAB  hab;
  1185.  
  1186.         /* Set the frame-window creation flags.                       */
  1187.         ULONG flFrameFlags =
  1188.             FCF_TITLEBAR      |   /* Title bar                        */
  1189.             FCF_SIZEBORDER    |   /* Size border                      */
  1190.             FCF_MINMAX        |   /* Minimize and maximize buttons.   */
  1191.             FCF_SYSMENU       |   /* System menu                      */
  1192.             FCF_SHELLPOSITION |   /* System-default size and position */
  1193.             FCF_TASKLIST ;        /* Add name to Task List.           */
  1194.  
  1195.         /* Initialize the application for PM                          */
  1196.         hab = WinInitialize(0);
  1197.  
  1198.         /* Create the application message queue.                      */
  1199.         hmq = WinCreateMsgQueue(hab, 0);
  1200.  
  1201.         /* Register the class for the client window.                  */
  1202.         WinRegisterClass(
  1203.             hab,                    /* Anchor block handle            */
  1204.             "MyPrivateClass",       /* Name of class being registered */
  1205.             (PFNWP)ClientWndProc,   /* Window procedure for class     */
  1206.             CS_SIZEREDRAW |         /* Class style                    */
  1207.             CS_HITTEST,             /* Class style                    */
  1208.             0);                     /* Extra bytes to reserve         */
  1209.  
  1210.         /* Create a top-level frame window with a client window       */
  1211.         /* that belongs to the window class "MyPrivateClass".         */
  1212.         hwndFrame = WinCreateStdWindow(
  1213.             HWND_DESKTOP,      /* Parent is desktop window.           */
  1214.             WS_VISIBLE,        /* Make frame window visible.          */
  1215.             &flFrameFlags,     /* Frame controls                      */
  1216.             "MyPrivateClass",  /* Window class for client             */
  1217.             NULL,              /* No window title                     */
  1218.             WS_VISIBLE,        /* Make client window visible .        */
  1219.             (HMODULE) 0,       /* Resources in application module     */
  1220.             IDR_RESOURCES,     /* Resource identifier                 */
  1221.             NULL);             /* Pointer to client window handle     */
  1222.  
  1223.         /* Start the main message loop. Get messages from the         */
  1224.         /* queue and dispatch them to the appropriate windows.        */
  1225.         while (WinGetMsg(hab, &qmsg, 0, 0, 0))
  1226.                WinDispatchMsg(hab, &qmsg);
  1227.  
  1228.         /* Main loop has terminated. Destroy all windows and the      */
  1229.         /* message queue; then terminate the application.             */
  1230.         WinDestroyWindow(hwndFrame);
  1231.         WinDestroyMsgQueue(hmq);
  1232.         WinTerminate(hab);
  1233.  
  1234.         return 0;
  1235.     }
  1236.  
  1237. Structure of a Simple Presentation Manager Application 
  1238.  
  1239.  
  1240. ΓòÉΓòÉΓòÉ 1.2.2. Creating an Object Window ΓòÉΓòÉΓòÉ
  1241.  
  1242. An application can create an object window by using the WinCreateWindow 
  1243. function and setting the desktop-object window as the parent window.  The code 
  1244. fragment in the following figure shows how to create an object window. 
  1245.  
  1246.     #define ID_OBJWINDOW 2
  1247.  
  1248.     HWND hwndObject;
  1249.  
  1250.     hwndObject = WinCreateWindow(
  1251.         HWND_OBJECT,        /* Parent is object window.            */
  1252.         "MyObjClass",       /* Window class for client             */
  1253.         NULL,               /* Window text                         */
  1254.         0,                  /* No styles for object window         */
  1255.         0, 0,               /* Lower-left corner                   */
  1256.         0, 0,               /* Width and height                    */
  1257.         NULL,               /* No owner                            */
  1258.         HWND_BOTTOM,        /* Inserts window at bottom of z-order */
  1259.         ID_OBJWINDOW,       /* Window identifier                   */
  1260.         NULL,               /* No class-specific data              */
  1261.         NULL);              /* No presentation data                */
  1262.  
  1263.  
  1264. Creating an Object Window 
  1265.  
  1266.  
  1267. ΓòÉΓòÉΓòÉ 1.2.3. Querying Window Data ΓòÉΓòÉΓòÉ
  1268.  
  1269. An application can examine the values in the data structure associated with a 
  1270. window by using the WinQueryWindowUShort and WinQueryWindowULong functions. 
  1271. Each of these functions specifies a structure data item to examine.  The index 
  1272. value can be an integer representing a zero-based byte index or a constant 
  1273. (QWS_) that identifies a specific item of data. The code fragment in the 
  1274. following figure obtains the programmer-defined identifier of the object window 
  1275. defined in the previous example: 
  1276.  
  1277.  
  1278.     HWND hwndObject;
  1279.     USHORT usObjID;
  1280.  
  1281.     usObjID = WinQueryWindowUShort(hwndObject, QWS_ID);
  1282.  
  1283.  
  1284. Getting the Window Identifier 
  1285.  
  1286.  
  1287. ΓòÉΓòÉΓòÉ 1.2.4. Changing the Parent Window ΓòÉΓòÉΓòÉ
  1288.  
  1289. An application can change a window's parent window by using the WinSetParent 
  1290. function.  For example, in an application that uses child windows to display 
  1291. documents, you might want only the active document window to show a system 
  1292. menu.  You can do this by changing that menu's parent window back and forth 
  1293. between the document window and the object window when WM_ACTIVATE messages are 
  1294. received.  This technique is shown in the code fragment in the following 
  1295. figure. 
  1296.  
  1297.  
  1298.     switch (msg) {
  1299.  
  1300.     case WM_ACTIVATE:  {
  1301.  
  1302.     HWND hwndFrame, hwndSysMenu, hwnd;
  1303.  
  1304.         /* Get the handles of the frame window and system menu.        */
  1305.         hwndFrame = WinQueryWindow(hwnd, QW_PARENT);
  1306.         hwndSysMenu = WinWindowFromID(hwndFrame, FID_SYSMENU);
  1307.  
  1308.         /* If the window is being activated, make the frame window the */
  1309.         /* parent of the system menu. Otherwise, hide the system menu  */
  1310.         /* by making the object window the parent.                     */
  1311.  
  1312.         if ( SHORT1FROMMP(mp1))
  1313.             WinSetParent(hwndSysMenu, hwndFrame, TRUE);
  1314.  
  1315.         else
  1316.             WinSetParent(hwndSysMenu, HWND_OBJECT, TRUE);
  1317.  
  1318.         }
  1319.  
  1320.         return 0;
  1321.     }
  1322.  
  1323.  
  1324. Changing the Parent Window 
  1325.  
  1326.  
  1327. ΓòÉΓòÉΓòÉ 1.2.5. Finding a Parent, Child, or Owner Window ΓòÉΓòÉΓòÉ
  1328.  
  1329. An application can determine the parent, child, and owner windows for any 
  1330. window by using the WinQueryWindow function.  This function returns the window 
  1331. handle of the requested window. 
  1332.  
  1333. The code fragment in the following figure determines the parent window of the 
  1334. given window: 
  1335.  
  1336.     HWND hwndParent;
  1337.     HWND hwndMyWindow;
  1338.  
  1339.     hwndParent = WinQueryWindow(hwndMyWindow, QW_PARENT);
  1340.  
  1341.  
  1342. Finding the Parent Window 
  1343.  
  1344. The code fragment in the following figure determines the topmost child window 
  1345. (the child window in the top z-order position): 
  1346.  
  1347.     HWND hwndTopChild;
  1348.     HWND hwndParent;
  1349.  
  1350.     hwndTopChild = WinQueryWindow(hwndParent, QW_TOP);
  1351.  
  1352.  
  1353. Finding the Topmost Child Window 
  1354.  
  1355. If a given window does not have an owner or child window, WinQueryWindow 
  1356. returns NULL. 
  1357.  
  1358.  
  1359. ΓòÉΓòÉΓòÉ 1.2.6. Setting an Owner Window ΓòÉΓòÉΓòÉ
  1360.  
  1361. An application can set the owner for a window by using the WinSetOwner 
  1362. function.  Typically, after setting the owner, a window notifies the owner 
  1363. window of the new relationship by sending it a message. 
  1364.  
  1365. The code fragment in the following figure shows how to set the owner window and 
  1366. send it a message: 
  1367.  
  1368.     #define NEW_OWNER 1
  1369.  
  1370.     HWND hwndMyWindow;
  1371.     HWND hwndNewOwner;
  1372.  
  1373.     if (WinSetOwner(hwndMyWindow, hwndNewOwner))
  1374.  
  1375.         /* Send a notification message.                                 */
  1376.         WinSendMsg(hwndNewOwner,   /* Sends to owner                    */
  1377.             WM_CONTROL,            /* Control message for notification  */
  1378.             (MPARAM) NEW_OWNER,    /* Notification code                 */
  1379.             NULL);                 /* No extra data                     */
  1380.  
  1381.  
  1382. Setting the Owner Window 
  1383.  
  1384. A window can have only one owner, so WinSetOwner removes any previous owner. 
  1385.  
  1386.  
  1387. ΓòÉΓòÉΓòÉ 1.2.7. Retrieving the Handle of a Child or Owned Window ΓòÉΓòÉΓòÉ
  1388.  
  1389. A parent or owner window can retrieve the handle of a child or owned window by 
  1390. using the WinWindowFromID function and supplying the identifier of the child or 
  1391. owned window.  WinWindowFromID searches all child and owned windows to locate 
  1392. the window with the given identifier.  The window identifier is set when the 
  1393. application creates the child or owned window. 
  1394.  
  1395. Typically, an owned window uses WinQueryWindow to get the handle of the owner 
  1396. window; then uses WinSendMsg to issue a notification message to its owner 
  1397. window. 
  1398.  
  1399. The code fragment in the following figure retrieves the window handle of an 
  1400. owner window and sends the window a WM_ENABLE message: 
  1401.  
  1402.     HWND hwndOwned;
  1403.     HWND hwndOwner;
  1404.  
  1405.     case WM_CONTROL:
  1406.         switch (SHORT2FROMMP (mp2)) {
  1407.             case BN_CLICKED:
  1408.                 hwndOwned = WinWindowFromID(hwndOwner,
  1409.                 (ULONG)SHORT1FROMMP(mp1));
  1410.                 WinSendMsg(hwndOwned, WM_ENABLE,
  1411.                 (MPARAM)TRUE, (MPARAM) NULL);
  1412.                 return 0;
  1413.             .
  1414.             . /* Check for other notification codes. */
  1415.             .
  1416.  
  1417.             }
  1418.  
  1419.  
  1420. Getting a Handle to an Owner or Child Window 
  1421.  
  1422. An application also can retrieve the handle of a child window by using the 
  1423. WinWindowFromPoint function and supplying a point in the corresponding parent 
  1424. window. 
  1425.  
  1426.  
  1427. ΓòÉΓòÉΓòÉ 1.2.8. Enumerating Top-Level Windows ΓòÉΓòÉΓòÉ
  1428.  
  1429. An application can enumerate all top-level windows in the system by using the 
  1430. WinBeginEnumWindows and WinGetNextWindow functions.  An application also can 
  1431. create a list of all child windows for a given parent window using 
  1432. WinBeginEnumWindows.  This list contains the window handles of immediate child 
  1433. windows.  By using WinGetNextWindow, the application then can retrieve the 
  1434. window handles, one at a time, from the list.  When the application has 
  1435. finished using the list, it must release the list with the WinEndEnumWindows 
  1436. function. 
  1437.  
  1438. The code fragment in the following figure shows how to enumerate all top-level 
  1439. windows (all immediate child windows of the desktop window): 
  1440.  
  1441.  
  1442.     HWND hwndTop;
  1443.     HENUM henum;
  1444.  
  1445.     /* Enumerate all top-level windows.           */
  1446.     henum = WinBeginEnumWindows(HWND_DESKTOP);
  1447.  
  1448.     /* Loop through all enumerated windows.       */
  1449.     while (hwndTop = WinGetNextWindow(henum)) {
  1450.         .
  1451.         . /* Perform desired task on each window. */
  1452.         .
  1453.     }
  1454.  
  1455.     WinEndEnumWindows(henum);
  1456.  
  1457.  
  1458. Enumerating Top-Level Windows 
  1459.  
  1460.  
  1461. ΓòÉΓòÉΓòÉ 1.2.9. Moving and Sizing a Window ΓòÉΓòÉΓòÉ
  1462.  
  1463. An application can move a window by using the WinSetWindowPos function and 
  1464. specifying the SWP_MOVE constant.  The function changes the position of the 
  1465. window to the specified position.  The position is always given in coordinates 
  1466. relative to the parent window. 
  1467.  
  1468. The code fragment in the following figure moves the window to the position 
  1469. (10,10): 
  1470.  
  1471.     HWND hwnd;
  1472.  
  1473.     WinSetWindowPos(
  1474.         hwnd,                 /* Window handle                  */
  1475.         NULL,                 /* Not used for moving and sizing */
  1476.         10, 10,               /* New position                   */
  1477.         0, 0,                 /* Not used for moving            */
  1478.         SWP_MOVE);            /* Move window                    */
  1479.  
  1480.  
  1481. Moving a Window 
  1482.  
  1483. An application can set the size of a window by using the WinSetWindowPos 
  1484. function and specifying the SWP_SIZE constant.  WinSetWindowPos changes the 
  1485. width and height of the window to the specified width and height. 
  1486.  
  1487. An application can combine moving and sizing in a single function call, as 
  1488. shown in the following figure. 
  1489.  
  1490.  
  1491.     HWND hwnd;
  1492.  
  1493.     WinSetWindowPos(
  1494.         hwnd,                 /* Window handle                  */
  1495.         NULL,                 /* Not used for moving and sizing */
  1496.         10, 10,               /* New position                   */
  1497.         200, 200,             /* Width and height               */
  1498.         SWP_MOVE | SWP_SIZE); /* Move and size window.          */
  1499.  
  1500.  
  1501. Moving and Sizing a Window 
  1502.  
  1503. An application can retrieve the current size and position of a window by using 
  1504. the WinQueryWindowPos function.  This function copies the current information 
  1505. to an SWP structure. 
  1506.  
  1507. The code fragment in the following figure uses the current size and position to 
  1508. change the height of the window, leaving the width and position unchanged: 
  1509.  
  1510.  
  1511.     HWND hwnd;
  1512.     SWP swp;
  1513.  
  1514.     WinQueryWindowPos(hwnd, &swp);
  1515.     WinSetWindowPos(
  1516.         hwnd,                /* Window handle                  */
  1517.         NULL,                /* Not used for moving and sizing */
  1518.         0, 0,                /* Not used for sizing            */
  1519.         swp.cx,              /* Current width                  */
  1520.         swp.cy + 200,        /* New height                     */
  1521.         SWP_SIZE);           /* Change the size.               */
  1522.  
  1523.  
  1524. Changing the Size of a Window 
  1525.  
  1526. An application also can move and change the size of several windows at once by 
  1527. using the WinSetMultWindowPos function. This function takes an array of SWP 
  1528. structures. Each structure specifies the window to be moved or changed. 
  1529.  
  1530. An application can move and size a window even if it is not visible, although 
  1531. the user is not able to see the effects of the moving and sizing until the 
  1532. window is visible. 
  1533.  
  1534.  
  1535. ΓòÉΓòÉΓòÉ 1.2.10. Redrawing Windows ΓòÉΓòÉΓòÉ
  1536.  
  1537. When the system moves a window or changes its size, it can invalidate all or 
  1538. part of that window.  The system attempts to preserve the contents of the 
  1539. window and copy them to the new position; but if the window's size is 
  1540. increased, the window must fill the area exposed by the size change.  If a 
  1541. window is moved from behind an overlapping window, any area formerly obscured 
  1542. by the other window must be drawn.  In these cases, the system invalidates the 
  1543. exposed areas and sends a WM_PAINT message to the window. 
  1544.  
  1545. An application can require that the system invalidate an entire window every 
  1546. time the window moves or changes size.  To do this, the application sets the 
  1547. CS_SIZEREDRAW class style in the corresponding window class.  Typically, this 
  1548. class style is selected for use in an application that uses a window's current 
  1549. size and position to determine how to draw the window.  For example, a clock 
  1550. application always would draw the face of the clock so that it filled the 
  1551. window exactly. 
  1552.  
  1553. An application also can explicitly specify which parts of the window to 
  1554. preserve during a move or size change.  Before any change is made, the system 
  1555. sends a WM_CALCVALIDRECTS message to windows that do not have the style 
  1556. CS_SIZEREDRAW.  This enables the window procedure to specify what part of the 
  1557. window to save and where to align it after the move or size change. 
  1558.  
  1559.  
  1560. ΓòÉΓòÉΓòÉ 1.2.11. Changing the Z-Order of Windows ΓòÉΓòÉΓòÉ
  1561.  
  1562. An application can move a window to the top or bottom of the z-order by passing 
  1563. the SWP_ZORDER constant to the WinSetWindowPos function. An application 
  1564. specifies where to move the window by specifying the HWND_TOP or HWND_BOTTOM 
  1565. constants. 
  1566.  
  1567. The code fragment in the following figure uses WinSetWindowPos to change the 
  1568. z-order of a window: 
  1569.  
  1570.     HWND hwndParent;
  1571.     HWND hwndNext;
  1572.     HENUM henum;
  1573.  
  1574.         WinSetWindowPos(
  1575.             hwndNext,       /* Next window to move  */
  1576.             HWND_TOP,       /* Put window on top    */
  1577.             0, 0, 0, 0,     /* Not used for z-order */
  1578.             SWP_ZORDER);    /* Change z-order       */
  1579.  
  1580.  
  1581. Changing the Z-order of a Window 
  1582.  
  1583. An application also can specify the window that the given window is to move 
  1584. behind.  In this case, the application specifies the window handle instead of 
  1585. the HWND_TOP or HWND_BOTTOM constant. 
  1586.  
  1587.     HWND hwndParent;
  1588.     HWND hwndNext;
  1589.     HWND hwndExchange;
  1590.     HENUM henum;
  1591.  
  1592.     henum = WinBeginEnumWindows(hwndParent);
  1593.  
  1594.     hwndExchange = WinGetNextWindow(henum);
  1595.  
  1596.     /* hwndNext has top window; hwndExchange has window under the top. */
  1597.     WinSetWindowPos(
  1598.         hwndNext,       /* Next window to move     */
  1599.         hwndExchange,   /* Put lower window on top */
  1600.         0, 0, 0, 0,     /* Not used for z-order    */
  1601.         SWP_ZORDER);    /* Change z-order          */
  1602.  
  1603.     WinEndEnumWindows(henum);
  1604.  
  1605.  
  1606. Exchanging the Z-order of Windows 
  1607.  
  1608.  
  1609. ΓòÉΓòÉΓòÉ 1.2.12. Showing or Hiding a Window ΓòÉΓòÉΓòÉ
  1610.  
  1611. An application can show or hide a window by using the WinShowWindow function. 
  1612. This function changes the WS_VISIBLE style of a window to the specified 
  1613. setting.  An application can also use the WinIsWindowVisible function to check 
  1614. the visibility of a window.  This function returns TRUE if the window is 
  1615. visible. 
  1616.  
  1617.  
  1618. ΓòÉΓòÉΓòÉ 1.2.13. Maximizing, Minimizing, and Restoring a Frame Window ΓòÉΓòÉΓòÉ
  1619.  
  1620. An application can maximize, minimize, or restore a frame window by using the 
  1621. WinSetWindowPos function and specifying the constant SWP_MAXIMIZE, 
  1622. SWP_MINIMIZE, or SWP_RESTORE.  Only a frame window can maximize and minimize by 
  1623. default.  For any other window, an application must provide support for these 
  1624. actions in the corresponding window procedure. 
  1625.  
  1626. The following figure shows how to maximize a frame window: 
  1627.  
  1628.  
  1629.     SWP swpCurrent;
  1630.     HWND hwndFrame;
  1631.  
  1632.     WinQueryWindowPos(hwndFrame, &swpCurrent);
  1633.     WinSetWindowPos(
  1634.         hwndFrame,           /* Window handle               */
  1635.         NULL,                /* Not used to maximize        */
  1636.         swpCurrent.x,
  1637.         swpCurrent.y,        /* Stored for restoring window */
  1638.         swpCurrent.cx,
  1639.         swpCurrent.cy,       /* Stored for restoring window */
  1640.         SWP_MAXIMIZE | SWP_SIZE | SWP_MOVE);    /* Maximize */
  1641.  
  1642.  
  1643. Maximizing a Frame Window 
  1644.  
  1645.  
  1646. ΓòÉΓòÉΓòÉ 1.2.14. Destroying a Window ΓòÉΓòÉΓòÉ
  1647.  
  1648. An application can destroy a window by using the WinDestroyWindow function. The 
  1649. following figure shows how to create and then destroy a control window: 
  1650.  
  1651.     HWND hwndCtrl;
  1652.     HWND hwndParent;
  1653.  
  1654.     hwndCtrl = WinCreateWindow(hwndParent, WC_BUTTON, ...);
  1655.  
  1656.     WinDestroyWindow(hwndCtrl);
  1657.  
  1658.  
  1659. Destroying a Window 
  1660.  
  1661.  
  1662. ΓòÉΓòÉΓòÉ 1.3. Summary ΓòÉΓòÉΓòÉ
  1663.  
  1664. Following are the OS/2 functions, messages, and data structures used with 
  1665. windows. 
  1666.  
  1667. Window Functions 
  1668.  
  1669. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1670. ΓöéWindow Creation         Γöé                                    Γöé
  1671. ΓöéFunctions               Γöé                                    Γöé
  1672. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1673. ΓöéWinCreateWindow         ΓöéThe most direct way of creating a   Γöé
  1674. Γöé                        Γöéwindow.  The window is of class     Γöé
  1675. Γöé                        ΓöéClassName and returns hwnd.         Γöé
  1676. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1677. ΓöéWinCreateStdWindow      ΓöéCreates a main window.  Requires an Γöé
  1678. Γöé                        Γöéanchor block.                       Γöé
  1679. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1680. ΓöéWindow Destruction      Γöé                                    Γöé
  1681. ΓöéFunctions               Γöé                                    Γöé
  1682. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1683. ΓöéWinDestroyWindow        ΓöéDestroys a window and its child     Γöé
  1684. Γöé                        Γöéwindows, and releases all their     Γöé
  1685. Γöé                        Γöéresources.                          Γöé
  1686. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1687. ΓöéWindow Data Functions   Γöé                                    Γöé
  1688. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1689. ΓöéWinQueryWindowUShort    ΓöéObtains the unsigned short integer  Γöé
  1690. Γöé                        Γöévalue of a given window at a        Γöé
  1691. Γöé                        Γöéspecified offset from the reserved  Γöé
  1692. Γöé                        Γöéwindow word's memory.               Γöé
  1693. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1694. ΓöéWinSetWindowUShort      ΓöéSets an unsigned, short integer     Γöé
  1695. Γöé                        Γöévalue into the memory of the        Γöé
  1696. Γöé                        Γöéreserved window words.              Γöé
  1697. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1698. ΓöéWinQueryWindowULong     ΓöéObtains the unsigned long integer   Γöé
  1699. Γöé                        Γöévalue of a given window, at a       Γöé
  1700. Γöé                        Γöéspecified offset, from the memory ofΓöé
  1701. Γöé                        Γöéa reserved window word.             Γöé
  1702. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1703. ΓöéWinSetWindowULong       ΓöéSets an unsigned, long integer valueΓöé
  1704. Γöé                        Γöéinto the memory of the reserved     Γöé
  1705. Γöé                        Γöéwindow words.                       Γöé
  1706. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1707. ΓöéWinQueryWindowPtr       ΓöéRetrieves a pointer value from the  Γöé
  1708. Γöé                        Γöémemory of the reserved window word. Γöé
  1709. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1710. ΓöéWinSetWindowPtr         ΓöéSets a pointer value into the memoryΓöé
  1711. Γöé                        Γöéof the reserved window words.       Γöé
  1712. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1713. ΓöéWinSetWindowBits        ΓöéSets a number of bits into the      Γöé
  1714. Γöé                        Γöémemory of the reserved window words.Γöé
  1715. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1716. ΓöéWindow Relationship     Γöé                                    Γöé
  1717. ΓöéFunctions               Γöé                                    Γöé
  1718. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1719. ΓöéWinSetParent            ΓöéSets the parent for hwnd to         Γöé
  1720. Γöé                        ΓöéNewParent.                          Γöé
  1721. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1722. ΓöéWinQueryWindow          ΓöéReturns the handle of a window that Γöé
  1723. Γöé                        Γöéhas a specified relationship to a   Γöé
  1724. Γöé                        Γöéspecified window.                   Γöé
  1725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1726. ΓöéWinSetOwner             ΓöéChanges the owner of a specified    Γöé
  1727. Γöé                        Γöéwindow.                             Γöé
  1728. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1729. ΓöéWinBeginEnumWindows     ΓöéBegins the enumeration process for  Γöé
  1730. Γöé                        Γöéall the immediate child windows of aΓöé
  1731. Γöé                        Γöéspecified window.                   Γöé
  1732. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1733. ΓöéWinGetNextWindow        ΓöéGets the window handle of the next  Γöé
  1734. Γöé                        Γöéwindow in a specified enumeration   Γöé
  1735. Γöé                        Γöélist.                               Γöé
  1736. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1737. ΓöéWinEndEnumWindows       ΓöéEnds the specified enumeration      Γöé
  1738. Γöé                        Γöéprocess.                            Γöé
  1739. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1740. ΓöéWinIsChild              ΓöéTests to determine whether one      Γöé
  1741. Γöé                        Γöéwindow is a descendant of another.  Γöé
  1742. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1743. ΓöéWinQueryDesktopWindow   ΓöéReturns the desktop window handle.  Γöé
  1744. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1745. ΓöéWinQueryObjectWindow    ΓöéReturns the desktop-object window   Γöé
  1746. Γöé                        Γöéhandle.                             Γöé
  1747. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1748. ΓöéWinWindowFromID         ΓöéReturns the handle of the child     Γöé
  1749. Γöé                        Γöéwindow with the specified ID.       Γöé
  1750. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1751. ΓöéWinWindowFromPoint      ΓöéFinds the window, below a specified Γöé
  1752. Γöé                        Γöépoint, that is a descendant of a    Γöé
  1753. Γöé                        Γöéspecified window.                   Γöé
  1754. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1755. ΓöéWinMultWindowFromIDs    ΓöéFinds the handles of child windows  Γöé
  1756. Γöé                        Γöéthat belong to a specified window   Γöé
  1757. Γöé                        Γöéand that have window IDs within a   Γöé
  1758. Γöé                        Γöéspecified range.                    Γöé
  1759. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1760. ΓöéWindow Size and PositionΓöé                                    Γöé
  1761. ΓöéFunctions               Γöé                                    Γöé
  1762. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1763. ΓöéWinSetWindowPos         ΓöéFacilitates the general positioning Γöé
  1764. Γöé                        Γöéof a window.                        Γöé
  1765. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1766. ΓöéWinQueryWindowPos       ΓöéObtains the size and position of a  Γöé
  1767. Γöé                        Γöéwindow.                             Γöé
  1768. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1769. ΓöéWinSetMultWindowPos     ΓöéAn efficient means of repositioning Γöé
  1770. Γöé                        Γöémultiple windows with one call,     Γöé
  1771. Γöé                        Γöéprovided all windows being          Γöé
  1772. Γöé                        Γöépositioned have the same parent.    Γöé
  1773. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1774. ΓöéWinQueryWindowRect      ΓöéReturns a window rectangle.         Γöé
  1775. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1776. ΓöéWinGetMinPosition       ΓöéReturns the position to which a     Γöé
  1777. Γöé                        Γöéwindow is minimized.                Γöé
  1778. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1779. ΓöéWindow Visibility       Γöé                                    Γöé
  1780. ΓöéFunctions               Γöé                                    Γöé
  1781. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1782. ΓöéWinIsWindowShowing      ΓöéDetermines whether any part of the  Γöé
  1783. Γöé                        Γöéwindow, hwnd, is physically visible.Γöé
  1784. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1785. ΓöéWinShowWindow           ΓöéSets the visibility state of a      Γöé
  1786. Γöé                        Γöéwindow.                             Γöé
  1787. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1788. ΓöéWinIsWindowVisible      ΓöéReturns the visibility state of a   Γöé
  1789. Γöé                        Γöéwindow.                             Γöé
  1790. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1791. ΓöéWindow Input Functions  Γöé                                    Γöé
  1792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1793. ΓöéWinQueryActiveWindow    ΓöéReturns the active window for       Γöé
  1794. Γöé                        ΓöéHWND_DESKTOP or other parent window.Γöé
  1795. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1796. ΓöéWinSetActiveWindow      ΓöéSets the main window as the active  Γöé
  1797. Γöé                        Γöéwindow.                             Γöé
  1798. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1799. ΓöéWinQueryFocus           ΓöéReturns the focus window; NULL if   Γöé
  1800. Γöé                        Γöéthere is no focus window.           Γöé
  1801. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1802. ΓöéWinSetFocus             ΓöéSets the focus window.              Γöé
  1803. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1804. ΓöéWinQuerySysModalWindow  ΓöéReturns the current system-modal    Γöé
  1805. Γöé                        Γöéwindow.                             Γöé
  1806. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1807. ΓöéWinRequestMutexSem      ΓöéRequests the ownership of a mutex   Γöé
  1808. Γöé                        Γöésemaphore or waits for a PM message.Γöé
  1809. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1810. ΓöéWinSetSysModalWindow    ΓöéEither sets a system-modal window orΓöé
  1811. Γöé                        Γöéends the system-modal state.        Γöé
  1812. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1813. ΓöéWinStartApp             ΓöéStarts an application.              Γöé
  1814. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1815. ΓöéWinTerminate            ΓöéTerminates an application thread's  Γöé
  1816. Γöé                        Γöéuse of PM and releases all of its   Γöé
  1817. Γöé                        Γöéassociated resources.               Γöé
  1818. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1819. ΓöéWinTerminateApp         ΓöéTerminates an application started   Γöé
  1820. Γöé                        Γöéwith WinStartApp.                   Γöé
  1821. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1822. ΓöéWinWaitEventSem         ΓöéWaits for an event semaphore to be  Γöé
  1823. Γöé                        Γöéposted or for a PM message.         Γöé
  1824. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1825. ΓöéWinWaitMuxWaitSem       ΓöéWaits for a muxwait semaphore to    Γöé
  1826. Γöé                        Γöéclear or for a PM message.          Γöé
  1827. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1828.  
  1829. Window Messages 
  1830.  
  1831. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1832. ΓöéMessage                       ΓöéDescription                   Γöé
  1833. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1834. ΓöéWM_ACTIVATE                   ΓöéSent to a window as it gains  Γöé
  1835. Γöé                              Γöéor loses activation.          Γöé
  1836. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1837. ΓöéWM_ADJUSTWINDOWPOS            ΓöéSent to adjust a window's     Γöé
  1838. Γöé                              Γöéposition.  Not sent if        Γöé
  1839. Γöé                              ΓöéSWP_NOADJUST is specified.    Γöé
  1840. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1841. ΓöéWM_CALCFRAMERECT              ΓöéOccurs when an application    Γöé
  1842. Γöé                              Γöéuses the WinCalcFrameRect     Γöé
  1843. Γöé                              Γöécall.                         Γöé
  1844. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1845. ΓöéWM_CALCVALIDRECTS             ΓöéSent from WinSetWindowPos and Γöé
  1846. Γöé                              ΓöéWinSetMultWindowPos to        Γöé
  1847. Γöé                              Γöédetermine which areas of a    Γöé
  1848. Γöé                              Γöéwindow will be preserved if a Γöé
  1849. Γöé                              Γöéwindow is sized and which     Γöé
  1850. Γöé                              Γöéshould be redisplayed.        Γöé
  1851. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1852. ΓöéWM_CLOSE                      ΓöéSent to a frame window to     Γöé
  1853. Γöé                              Γöéindicate that the window is   Γöé
  1854. Γöé                              Γöébeing closed by the user.     Γöé
  1855. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1856. ΓöéWM_CREATE                     ΓöéOccurs when the application   Γöé
  1857. Γöé                              Γöérequests creation of a window.Γöé
  1858. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1859. ΓöéWM_DESTROY                    ΓöéOccurs when the application   Γöé
  1860. Γöé                              Γöérequests destruction of a     Γöé
  1861. Γöé                              Γöéwindow.                       Γöé
  1862. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1863. ΓöéWM_ENABLE                     ΓöéSets the enable state of a    Γöé
  1864. Γöé                              Γöéwindow.                       Γöé
  1865. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1866. ΓöéWM_MOVE                       ΓöéOccurs when a window with the Γöé
  1867. Γöé                              Γöéstyle CS_MOVENOTIFY changes   Γöé
  1868. Γöé                              Γöéits absolute position.        Γöé
  1869. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1870. ΓöéWM_PAINT                      ΓöéOccurs when a window needs    Γöé
  1871. Γöé                              Γöérepainting.                   Γöé
  1872. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1873. ΓöéWM_QUERYWINDOWPARAMS          ΓöéOccurs when an application    Γöé
  1874. Γöé                              Γöéqueries the window parameters.Γöé
  1875. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1876. ΓöéWM_SETWINDOWPARAMS            ΓöéOccurs when an application    Γöé
  1877. Γöé                              Γöésets or changes the window    Γöé
  1878. Γöé                              Γöéparameters.                   Γöé
  1879. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1880. ΓöéWM_SHOW                       ΓöéOccurs when a window's        Γöé
  1881. Γöé                              ΓöéWS_VISIBLE state is being     Γöé
  1882. Γöé                              Γöéchanged.                      Γöé
  1883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1884. ΓöéWM_SIZE                       ΓöéOccurs when a window changes  Γöé
  1885. Γöé                              Γöéits size.                     Γöé
  1886. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1887. ΓöéWM_WINDOWPOSCHANGED           ΓöéSent to the window procedure  Γöé
  1888. Γöé                              Γöéof the window whose position  Γöé
  1889. Γöé                              Γöéis changed.                   Γöé
  1890. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1891.  
  1892. Window Data Structures 
  1893.  
  1894. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1895. ΓöéData Structure          ΓöéDescription                         Γöé
  1896. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1897. ΓöéCREATESTRUC             ΓöéCreate window.                      Γöé
  1898. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1899. ΓöéWNDPARAMS               ΓöéWindow parameters.                  Γöé
  1900. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1901.  
  1902.  
  1903. ΓòÉΓòÉΓòÉ 2. Messages and Message Queues ΓòÉΓòÉΓòÉ
  1904.  
  1905. The OS/2 operating system uses messages and message queues to communicate with 
  1906. applications and the windows belonging to those applications.  This chapter 
  1907. explains how to create and use messages and message queues in PM applications. 
  1908.  
  1909.  
  1910. ΓòÉΓòÉΓòÉ 2.1. About Messages and Message Queues ΓòÉΓòÉΓòÉ
  1911.  
  1912. Unlike traditional applications that take complete control of the computer's 
  1913. keyboard, mouse, and screen, PM applications must share these resources with 
  1914. other applications that are running at the same time.  All applications run 
  1915. independently and rely on the operating system to help them manage shared 
  1916. resources.  The operating system does this by controlling the operation of each 
  1917. application, communicating with each application when there is keyboard or 
  1918. mouse input or when an application must move and size its windows. 
  1919.  
  1920.  
  1921. ΓòÉΓòÉΓòÉ 2.1.1. Messages ΓòÉΓòÉΓòÉ
  1922.  
  1923. A message is information, a request for information, or a request for an action 
  1924. to be carried out by a window in an application. 
  1925.  
  1926. The operating system, or an application, sends or posts a message to a window 
  1927. so that the window can use the information or respond to the request. 
  1928.  
  1929. There are three types of messages: 
  1930.  
  1931. o User-initiated 
  1932. o Application-initiated 
  1933. o System-initiated. 
  1934.  
  1935. A user-initiated message is the direct result of a user action, such as 
  1936. selecting a menu item or pressing a key.  An application-initiated message is 
  1937. generated by one window in the application to communicate with another window. 
  1938. System-initiated messages are generated by the interface as the indirect result 
  1939. of a user action (for example, resizing a window) or as the direct result of a 
  1940. system event (such as creating a window). 
  1941.  
  1942. A message that requires an immediate response from a window is sent directly to 
  1943. the window by passing the message data as arguments to the window procedure. 
  1944. The window procedure carries out the request or lets the operating system carry 
  1945. out default processing for the message. 
  1946.  
  1947. A message that does not require an immediate response from a window is posted 
  1948. (the message data is copied) to the application's message queue.  The message 
  1949. queue is a storage area that the application creates to receive and hold its 
  1950. posted messages.  Then, the application can retrieve a message at the 
  1951. appropriate time, sending it to the addressed window for processing. 
  1952.  
  1953. Every message contains a message identifier, which is a 16-bit integer that 
  1954. indicates the purpose of the message.  When a window processes a message, it 
  1955. uses the message identifier to determine what to do. 
  1956.  
  1957. Every message contains a window handle, which identifies the window the message 
  1958. is for.  The window handle is important because most message queues and window 
  1959. procedures serve more than one window.  The window handle ensures that the 
  1960. application forwards the message to the proper window. 
  1961.  
  1962. A message contains two message parameters-32-bit values that specify data or 
  1963. the location of data that a window uses when processing the message.  The 
  1964. meaning and value of a message parameter depend on the message.  A message 
  1965. parameter can contain an integer, packed bit flags, a pointer to a structure 
  1966. that contains additional data, and so forth.  Some messages do not use message 
  1967. parameters and, typically, set the parameters to NULL.  An application always 
  1968. checks the message identifier to determine how to interpret the message 
  1969. parameters. 
  1970.  
  1971. A queue message is a QMSG data structure that contains six data items, 
  1972. representing the window handle, message identifier, two message parameters, 
  1973. message time, and mouse-pointer position.  The time and position are included 
  1974. because most queue messages are input messages, representing keyboard or mouse 
  1975. input from the user.  The time and position also help the application identify 
  1976. the context of the message.  The operating system posts a queue message by 
  1977. filling the QMSG structure and copying it to a message queue. 
  1978.  
  1979. A window message consists of the window handle, the message identifier, and two 
  1980. message parameters.  A window message does not include the message time and 
  1981. mouse-pointer position, because most window messages are requests to perform a 
  1982. task that is not related to the current time or mouse-pointer position.  The 
  1983. operating system sends a window message by passing these values, as individual 
  1984. arguments, to a window procedure. 
  1985.  
  1986.  
  1987. ΓòÉΓòÉΓòÉ 2.1.2. Message Queues ΓòÉΓòÉΓòÉ
  1988.  
  1989. Every PM application must have a message queue. A message queue is the only 
  1990. means an application has to receive input from the keyboard or mouse.  Only 
  1991. applications that create message queues can create windows. 
  1992.  
  1993. An application creates a message queue by using the WinCreateMsgQueue function. 
  1994. This function returns a handle that the application can use to access the 
  1995. message queue.  After an application creates a message queue, the system posts 
  1996. messages intended for windows in the application to that queue.  The 
  1997. application can retrieve queue messages by specifying the message-queue handle 
  1998. in the WinGetMsg function. It also can examine messages, without retrieving 
  1999. them, by using the WinPeekMsg function. When an application no longer needs the 
  2000. message queue, it can destroy the queue by using the WinDestroyMsgQueue 
  2001. function. 
  2002.  
  2003. One message queue serves all the windows in a thread. This means a queue can 
  2004. hold messages for several windows. A message specifies the handle of the window 
  2005. to which it belongs so the application can forward a message easily to the 
  2006. appropriate window. The message loop recognizes a NULL window handle and the 
  2007. message is processed within the message loop rather than passed to 
  2008. WinDispatchMessage. See the following figure for an example of an input-message 
  2009. processing loop. 
  2010.  
  2011. An application that has more than one thread can create more than one message 
  2012. queue.  The system allows one message queue for each thread. A message queue 
  2013. created by a thread belongs to that thread and has no connection to other 
  2014. queues in the application.  When an application creates a window in a given 
  2015. thread, the system associates the window with the message queue in that thread. 
  2016. The system then posts all subsequent messages intended for that window to that 
  2017. queue. 
  2018.  
  2019. Note:  The recommended way to structure PM applications is to have at least two 
  2020.        threads and two message queues.  The first thread and message queue 
  2021.        control all the user-interface windows, and the second thread and 
  2022.        message queue control all the object windows. 
  2023.  
  2024. Several windows can use one message queue; it is important that the message 
  2025. queue be large enough to hold all messages that possibly can be posted to it. 
  2026. An application can set the size of the message queue when it creates the queue 
  2027. by specifying the maximum number of messages the queue can hold.  The default 
  2028. maximum number of messages is 10. 
  2029.  
  2030. To minimize queue size, several types of posted messages are not actually 
  2031. stored in a message queue.  Instead, the operating system keeps a record in the 
  2032. queue of the message being posted and combines any information contained in the 
  2033. message with information from previous messages.  Timer, semaphore, and paint 
  2034. messages are handled this way.  For example, if more than one WM_PAINT message 
  2035. is posted, the operating system combines the update regions for each into a 
  2036. single update region.  Although there is no actual WM_PAINT message in the 
  2037. queue, the operating system constructs one WM_PAINT message with the single 
  2038. update region when an application uses the WinGetMsg function. 
  2039.  
  2040. The operating system handles mouse and keyboard input messages differently from 
  2041. the way it handles other types of messages.  The operating system receives all 
  2042. keyboard and mouse events, such as keystrokes and mouse movements, into the 
  2043. system message queue.  The operating system converts these events into messages 
  2044. and posts them, one at a time, to the appropriate application message queue. 
  2045. The application retrieves the messages from its queue and dispatches them to 
  2046. the appropriate window, which processes the messages. 
  2047.  
  2048. The operating system message queue usually is large enough to hold all input 
  2049. messages, even if the user types or moves the mouse very quickly.  If the 
  2050. operating system message queue does run out of space, the system ignores the 
  2051. most recent keyboard input (usually by beeping to indicate the input is 
  2052. ignored) and collects mouse motions into a WM_MOUSEMOVE message. 
  2053.  
  2054. Every message queue has a corresponding MQINFO data structure that specifies 
  2055. the identifiers of the process and thread that own the message queue and gives 
  2056. a count of the maximum number of messages the queue can receive.  An 
  2057. application can retrieve the structure by using the WinQueryQueueInfo function. 
  2058.  
  2059. A message queue also has a current status that indicates the types of messages 
  2060. currently in the queue.  An application can retrieve the queue status by using 
  2061. the WinQueryQueueStatus function.  An application also can use the WinPeekMsg 
  2062. function to examine the contents of a message queue.  WinPeekMsg checks for a 
  2063. specific message or range of messages in the queue and gives the application 
  2064. the option of removing messages from the queue.  An application can call the 
  2065. WinQueryQueueStatus function to determine the contents of the queue before 
  2066. calling the WinPeekMsg or WinGetMsg function to remove a message from the 
  2067. queue. 
  2068.  
  2069.  
  2070. ΓòÉΓòÉΓòÉ 2.1.3. Message Handling ΓòÉΓòÉΓòÉ
  2071.  
  2072. To handle and process messages, an application can use a message loop and the 
  2073. window procedure. These terms are explained in the following two sections. 
  2074.  
  2075.  
  2076. ΓòÉΓòÉΓòÉ 2.1.3.1. Message Loops ΓòÉΓòÉΓòÉ
  2077.  
  2078. Every application with a message queue is responsible for retrieving the 
  2079. messages from that queue.  An application can do this by using a message loop, 
  2080. usually in the application's main function, that retrieves messages from the 
  2081. message queue and dispatches them to the appropriate windows.  The message loop 
  2082. consists of two calls: one to the WinGetMsg function; the other to the 
  2083. WinDispatchMsg function.  The message loop has the following form: 
  2084.  
  2085.     HAB hab;
  2086.     QMSG qmsg;
  2087.  
  2088.     while (WinGetMsg(hab, &qmsg, NULL, 0, 0))
  2089.         WinDispatchMsg(hab, &qmsg);
  2090.  
  2091. An application starts the message loop after creating the message queue and at 
  2092. least one application window.  Once started, the message loop continues to 
  2093. retrieve messages from the message queue and to dispatch (send) them to the 
  2094. appropriate windows.  WinDispatchMsg sends each message to the window specified 
  2095. by the window handle in the message. 
  2096.  
  2097. The following figure illustrates the typical routing of an input message 
  2098. through the operating system's and application's message loops. 
  2099.  
  2100.             Mouse ΓöÇΓöÇΓöÇΓöÉ   ΓöîΓöÇΓöÇΓöÇ Keystrokes
  2101.                         
  2102.                    ΓöîΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÉ
  2103.                    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ System
  2104.                    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Event (time ordered)
  2105.                    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Queue
  2106.                    ΓööΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÿ
  2107.                        Γöé
  2108.                        
  2109.                   ΓöîΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÉ
  2110.                   Γöé Input  Γöé Scancode
  2111.            ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Router Γöé Translation
  2112.            Γöé      ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2113.            
  2114.    ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2115.    Γöé Message      Γöé Accelerator
  2116.    Γöé Preprocessor Γöé Key Translation
  2117.    ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2118.  ΓöîΓöÇ  ΓöÇΓöÇ  ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÉ
  2119.        ΓöîΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÉ
  2120.  Γöé     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Appl    Priority         Γöé
  2121.        Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ MssgQ   Ordered
  2122.  Γöé     Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γöé
  2123.        ΓööΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÿ
  2124.  Γöé         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                     Γöé
  2125.                     
  2126.  Γöé          ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇWinGetMsgQ          Γöé
  2127.                         WinDispatchMsg
  2128.  Γöé          Γöé               Γöé             Γöé
  2129.     App's   Γöé               
  2130.  Γöé  Message Γöé         Window Procedure    Γöé
  2131.     Loop    Γöé               Γöé
  2132.  Γöé          Γöé                            Γöé
  2133.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn;
  2134.  ΓööΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÿ
  2135.  
  2136. Input Message Processing Loop Only one message loop is needed for a message 
  2137. queue, even if the queue contains messages for more than one window. Each queue 
  2138. message is a QMSG structure that contains the handle of the window to which the 
  2139. message belongs.  WinDispatchMsg always dispatches the message to the proper 
  2140. window.  WinGetMsg retrieves messages from the queue in first-in, first-out 
  2141. (FIFO) order, so the messages are dispatched to windows in the same order they 
  2142. are received. 
  2143.  
  2144. If there are no messages in the queue, the operating system temporarily stops 
  2145. processing the WinGetMsg function until a message arrives.  This means that CPU 
  2146. time that, otherwise, would be spent waiting for a message can be given to the 
  2147. applications (or threads) that do have messages in their queues. 
  2148.  
  2149. The message loop continues to retrieve and dispatch messages until WinGetMsg 
  2150. retrieves a WM_QUIT message.  This message causes the function to return FALSE, 
  2151. terminating the loop.  In most cases, terminating the message loop is the first 
  2152. step in terminating the application.  An application can terminate its own loop 
  2153. by posting the WM_QUIT message in its own queue. 
  2154.  
  2155. An application can modify its message loop in a variety of ways.  For example, 
  2156. it can retrieve messages from the queue without dispatching them to a window. 
  2157. This is useful for applications that post messages without specifying a window. 
  2158. (These messages apply to the application rather than a specific window; they 
  2159. have NULL window handles.)  Also, an application can direct the WinGetMsg 
  2160. function to search for specific messages, leaving other messages in the queue. 
  2161. This is useful for applications that temporarily need to bypass the usual FIFO 
  2162. order of the message queue. 
  2163.  
  2164.  
  2165. ΓòÉΓòÉΓòÉ 2.1.3.2. Window Procedures ΓòÉΓòÉΓòÉ
  2166.  
  2167. A window procedure is a function that receives and processes all input and 
  2168. requests for action sent to the windows.  Every window class has a window 
  2169. procedure; every window created using that class uses that window procedure to 
  2170. respond to messages. 
  2171.  
  2172. The system sends a message to the window procedure by passing the message data 
  2173. as arguments.  The window procedure takes the appropriate action for the given 
  2174. message.  Most  window procedures check the message identifier, then use the 
  2175. information specified by the message parameters to carry out the request.  When 
  2176. it has completed processing the message, the window procedure returns a message 
  2177. result.  Each message has a particular set of possible return values.  The 
  2178. window procedure must return the appropriate value for the processing it 
  2179. performed. 
  2180.  
  2181. A window procedure cannot ignore a message.  If it does not process a message, 
  2182. it must pass the message back to the operating system for default processing. 
  2183. The window procedure does this by calling the WinDefWindowProc function to 
  2184. carry out a default action and return the message result.  Then, the window 
  2185. procedure must return this value as its own message result. 
  2186.  
  2187. A window procedure commonly processes messages for several windows.  It uses 
  2188. the window handle specified in the message to identify the appropriate window. 
  2189. Most window procedures process just a few types of messages and pass the others 
  2190. on to the operating system by calling WinDefWindowProc. 
  2191.  
  2192.  
  2193. ΓòÉΓòÉΓòÉ 2.1.4. Posting and Sending Messages ΓòÉΓòÉΓòÉ
  2194.  
  2195. Any application can post and send messages.  Like the operating system, an 
  2196. application posts a message by copying it to a message queue.  It sends a 
  2197. message by passing the message data as arguments to a window procedure.  To 
  2198. post and send messages, an application uses the WinPostMsg and WinSendMsg 
  2199. functions. 
  2200.  
  2201. An application posts a message to notify a specific window to perform a task. 
  2202. The WinPostMsg function creates a QMSG structure for the message and copies the 
  2203. message to the message queue corresponding to the given window.  The 
  2204. application's message loop eventually retrieves the message and dispatches it 
  2205. to the appropriate window procedure.  For example, one message commonly posted 
  2206. is WM_QUIT.  This message terminates the application by terminating the message 
  2207. loop. 
  2208.  
  2209. An application sends a message to cause a specific window procedure to carry 
  2210. out a task immediately.  The WinSendMsg function passes the message to the 
  2211. window procedure corresponding to the given window.  The function waits until 
  2212. the window procedure completes processing and then returns the message result. 
  2213. Parent and child windows often communicate by sending messages to each other. 
  2214. For example, a parent window that has an entry-field control as its child 
  2215. window can set the text of the control by sending a message to the child 
  2216. window.  The control can notify the parent window of changes to the text 
  2217. (carried out by the user) by sending messages back to the parent window. 
  2218.  
  2219. Occasionally, an application might need to send or post a message to all 
  2220. windows in the system.  For example, if the application changes a system value, 
  2221. it must notify all windows about the change by sending a WM_SYSVALUECHANGED 
  2222. message.  An application can send or post messages to any number of windows by 
  2223. using the WinBroadcastMsg function.  The options in WinBroadcastMsg determine 
  2224. whether the message is sent or posted and specify the windows that will receive 
  2225. the message. 
  2226.  
  2227. Any thread in the application can post a message to a message queue, even if 
  2228. the thread has no message queue of its own.  However, only a thread that has a 
  2229. message queue can send a message.  Sending a message between threads is 
  2230. relatively uncommon.  For one reason, sending a message is costly in terms of 
  2231. system performance.  If an application posts a message between threads, it is 
  2232. likely to be a semaphore message, which permits window procedures to manage a 
  2233. shared resource jointly. 
  2234.  
  2235. An application can post a message without specifying a window.  If the 
  2236. application supplies a NULL window handle when it calls the WinPostMsg 
  2237. function, the function posts the message to the queue associated with the 
  2238. current thread.  The application must process the message in the message loop. 
  2239. This is one way to create a message that applies to the entire application 
  2240. instead of to a specific window. 
  2241.  
  2242. A window procedure can determine whether it is processing a message sent by 
  2243. another thread by using the WinInSendMsg function.  This is useful when message 
  2244. processing depends on the origin of the message. 
  2245.  
  2246. A common programming error is to assume that the WinPostMsg function always 
  2247. succeeds.  It fails when the message queue is full.  An application should 
  2248. check the return value of the WinPostMsg function to see whether the message 
  2249. was posted.  In general, if an application intends to post many messages to the 
  2250. queue, it should set the message queue to an appropriate size when it creates 
  2251. the queue.  The default message-queue size is 10 messages. 
  2252.  
  2253.  
  2254. ΓòÉΓòÉΓòÉ 2.1.5. Message Types ΓòÉΓòÉΓòÉ
  2255.  
  2256. This section describes the three types of OS/2 messages: 
  2257.  
  2258. o System-defined 
  2259. o Application-defined 
  2260. o Semaphore. 
  2261.  
  2262.  
  2263. ΓòÉΓòÉΓòÉ 2.1.5.1. System-Defined Messages ΓòÉΓòÉΓòÉ
  2264.  
  2265. There are many system-defined messages that are used to control the operations 
  2266. of applications and to provide input and other information for applications to 
  2267. process.  The system sends or posts a system-defined message when it 
  2268. communicates with an application.  An application also can send or post 
  2269. system-defined messages.  Usually, applications use these messages to control 
  2270. the operation of control windows created by using preregistered window classes. 
  2271.  
  2272. Each system message has a unique message identifier and a corresponding 
  2273. symbolic constant.  The symbolic constant, defined in the system header files, 
  2274. states the purpose of the message.  For example, the WM_PAINT constant 
  2275. represents the paint message, which requests that a window paint its contents. 
  2276.  
  2277. The symbolic constants also specify the message category.  System-defined 
  2278. messages can belong to several categories; the prefix identifies the type of 
  2279. window that can interpret and process the messages.  The following table lists 
  2280. the prefixes and their related message categories: 
  2281.  
  2282. Message Categories 
  2283.  
  2284. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2285. ΓöéPrefix         ΓöéMessage category                             Γöé
  2286. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2287. ΓöéBKM_           ΓöéNotebook control                             Γöé
  2288. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2289. ΓöéBM_            ΓöéButton control                               Γöé
  2290. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2291. ΓöéCBM_           ΓöéCombination-box control                      Γöé
  2292. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2293. ΓöéCM_            ΓöéContainer control                            Γöé
  2294. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2295. ΓöéEM_            ΓöéEntry-field control                          Γöé
  2296. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2297. ΓöéLM_            ΓöéList-box control                             Γöé
  2298. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2299. ΓöéMLM_           ΓöéMultiple-line entry field control            Γöé
  2300. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2301. ΓöéMM_            ΓöéMenu control                                 Γöé
  2302. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2303. ΓöéSBM_           ΓöéScroll-bar control                           Γöé
  2304. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2305. ΓöéSLM_           ΓöéSlider control                               Γöé
  2306. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2307. ΓöéSM_            ΓöéStatic control                               Γöé
  2308. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2309. ΓöéTBM_           ΓöéTitle-bar control                            Γöé
  2310. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2311. ΓöéVM_            ΓöéValue set control                            Γöé
  2312. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2313. ΓöéWM_            ΓöéGeneral window                               Γöé
  2314. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2315.  
  2316. General window messages cover a wide range of information and requests, 
  2317. including: 
  2318.  
  2319. o Mouse and keyboard-input 
  2320. o Menu- and dialog-input 
  2321. o Window creation and management 
  2322. o Dynamic data exchange (DDE). 
  2323.  
  2324.  
  2325. ΓòÉΓòÉΓòÉ 2.1.5.2. Application-Defined Messages ΓòÉΓòÉΓòÉ
  2326.  
  2327. An application can create messages to use in its own windows.  If an 
  2328. application does create messages, the window procedure that receives the 
  2329. messages must interpret them and provide the appropriate processing. 
  2330.  
  2331. The operating system reserves the message-identifier values in the range 0x0000 
  2332. through 0x0FFF (the value of WM_USER - 1) for system-defined messages. 
  2333. Applications cannot use these values for their private messages. 
  2334.  
  2335. Values in the range 0x1000 (the value of WM_USER) through 0xBFFF, however, are 
  2336. available for message identifiers, defined by an application, for use in that 
  2337. application. 
  2338.  
  2339. Warning: It is very important that applications do not broadcast messages in 
  2340. the 0x1000 through 0xBFFF range because of the risk of misinterpretation by 
  2341. other applications. 
  2342.  
  2343. Values in the range 0xC000 through 0xFFFF are reserved for message identifiers 
  2344. that an application defines and registers with the system atom table; these can 
  2345. be used in any application.  Values above 0xFFFF (0x00010000 through 
  2346. 0xFFFFFFFF) are reserved for future use; applications must not use messages in 
  2347. this range. 
  2348.  
  2349.  
  2350. ΓòÉΓòÉΓòÉ 2.1.5.3. Semaphore Messages ΓòÉΓòÉΓòÉ
  2351.  
  2352. A semaphore message provides a way of signaling, through the message queue, the 
  2353. end of an event.  An application uses a semaphore message the same way it uses 
  2354. system semaphore functions-to coordinate events by passing signals.  A 
  2355. semaphore message often is used in conjunction with system semaphores. 
  2356.  
  2357. There are four semaphore messages: 
  2358.  
  2359. WM_SEM1 
  2360. WM_SEM2 
  2361. WM_SEM3 
  2362. WM_SEM4. 
  2363.  
  2364. An application posts one of these messages to signal the end of a given event. 
  2365. The window that is waiting for the given event receives the semaphore message 
  2366. when the message loop retrieves and dispatches the message. 
  2367.  
  2368. Each semaphore message includes a bit flag that an application can use to 
  2369. uniquely identify the 32 possible semaphores for each semaphore message.  The 
  2370. application passes the bit flag (with the appropriate bit set) as a message 
  2371. parameter with the message.  The window procedure that receives the message 
  2372. then uses the bit flag to identify the semaphore. 
  2373.  
  2374. To save space, the system does not store semaphore messages in the message 
  2375. queue.  Instead, it sets a record in the queue, indicating that the semaphore 
  2376. message has been received, and then combines the bit flag for the message with 
  2377. the bit flags from previous messages.  When the window procedure eventually 
  2378. receives the message, the bit flag specifies each semaphore message posted 
  2379. since the last message was retrieved. 
  2380.  
  2381.  
  2382. ΓòÉΓòÉΓòÉ 2.1.6. Message Priorities ΓòÉΓòÉΓòÉ
  2383.  
  2384. The WinGetMsg function retrieves messages from the message queue based on 
  2385. message priority.  WinGetMsg retrieves messages with higher priority first.  If 
  2386. it finds more than one message at a particular priority level, it retrieves the 
  2387. oldest message first.  Messages have the following priorities: 
  2388.  
  2389. Message Priorities 
  2390.  
  2391. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2392. ΓöéPriority       ΓöéMessage                                      Γöé
  2393. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2394. Γöé1              ΓöéWM_SEM1                                      Γöé
  2395. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2396. Γöé2              ΓöéMessages posted using WinPostMsg             Γöé
  2397. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2398. Γöé3              ΓöéInput messages from the keyboard or mouse    Γöé
  2399. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2400. Γöé4              ΓöéWM_SEM2                                      Γöé
  2401. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2402. Γöé5              ΓöéWM_PAINT                                     Γöé
  2403. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2404. Γöé6              ΓöéWM_SEM3                                      Γöé
  2405. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2406. Γöé7              ΓöéWM_TIMER                                     Γöé
  2407. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2408. Γöé8              ΓöéWM_SEM4                                      Γöé
  2409. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2410.  
  2411.  
  2412. ΓòÉΓòÉΓòÉ 2.1.7. Message Filtering ΓòÉΓòÉΓòÉ
  2413.  
  2414. An application can choose specific messages to retrieve from the message queue 
  2415. (and ignore other messages) by specifying a message filter with the WinGetMsg 
  2416. or WinPeekMsg functions.  The message filter is a range of message identifiers 
  2417. (specified by a first and last identifier), a window handle, or both.  The 
  2418. WinGetMsg and WinPeekMsg functions use the message filter to select the 
  2419. messages to retrieve from the queue.  Message filtering is useful if an 
  2420. application needs to search ahead in the message queue for messages that have a 
  2421. lower priority or that arrived in the queue later than other less important 
  2422. messages. 
  2423.  
  2424. Any application that filters messages must ensure that a message satisfying the 
  2425. message filter can be posted.  For example, filtering for a WM_CHAR message in 
  2426. a window that does not receive keyboard input prevents the WinGetMsg function 
  2427. from returning.  Some messages, such as WM_COMMAND, are generated from other 
  2428. messages; filtering for them also can prevent WinGetMsg from returning. 
  2429.  
  2430. To filter for mouse, button, and DDE messages, an application can use the 
  2431. following constants: 
  2432.  
  2433. WM_MOUSEFIRST and WM_MOUSELAST 
  2434. WM_BUTTONCLICKFIRST and WM_BUTTONCLICKLAST 
  2435. WM_DDE_FIRST and WM_DDE_LAST. 
  2436.  
  2437.  
  2438. ΓòÉΓòÉΓòÉ 2.2. Using Messages ΓòÉΓòÉΓòÉ
  2439.  
  2440. This section explains how to perform the following tasks: 
  2441.  
  2442. o Create a message queue and message loop. 
  2443. o Examine the message queue. 
  2444. o Post and send messages between windows. 
  2445. o Broadcast a message to multiple windows. 
  2446. o Use message macros. 
  2447.  
  2448.  
  2449. ΓòÉΓòÉΓòÉ 2.2.1. Creating a Message Queue and Message Loop ΓòÉΓòÉΓòÉ
  2450.  
  2451. An application needs a message queue and message loop to process messages for 
  2452. its windows.  An application creates a message queue by using the 
  2453. WinCreateMsgQueue function.  An application creates a message loop by using the 
  2454. WinGetMsg and WinDispatchMsg functions.  The application must create and show 
  2455. at least one window after creating the queue but before starting the message 
  2456. loop. The following code fragment shows how to create a message queue and 
  2457. message loop: 
  2458.  
  2459.  
  2460. CreatingaMessageQueueandMessageLoop
  2461.  
  2462.     MRESULT EXPENTRY ClientWndProc(HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2);
  2463.  
  2464.     HAB hab;
  2465.  
  2466.     int main(VOID)
  2467.     {
  2468.         HMQ hmq;
  2469.         QMSG qmsg;
  2470.         HWND hwndFrame, hwndClient;
  2471.         ULONG flFrameFlags = FCF_TITLEBAR      | FCF_SYSMENU |
  2472.                              FCF_SIZEBORDER    | FCF_MINMAX  |
  2473.                              FCF_SHELLPOSITION | FCF_TASKLIST;
  2474.  
  2475.         /* Initialize the application for Presentation Manager interface.     */
  2476.         hab = WinInitialize(0);
  2477.  
  2478.         /* Create the application message queue.                              */
  2479.         hmq = WinCreateMsgQueue(hab, 0);
  2480.  
  2481.         /* Register the window class for your client window.                  */
  2482.         WinRegisterClass(hab,                  /* Anchor block handle         */
  2483.                          "MyClientClass",      /* Class name                  */
  2484.                          (PFNWP) ClientWndProc,/* Window procedure            */
  2485.                          CS_SIZEREDRAW,        /* Class style                 */
  2486.                          0);                   /* Extra bytes to reserve      */
  2487.  
  2488.         /* Create a main window.                                              */
  2489.         hwndFrame = WinCreateStdWindow(
  2490.                         HWND_DESKTOP,          /* Parent window handle        */
  2491.                         WS_VISIBLE,            /* Style of frame window       */
  2492.                         &flFrameFlags,         /* Frame controls              */
  2493.                         "MyClientClass",       /* Window class for client     */
  2494.                         (PSZ) NULL,            /* No title-bar text           */
  2495.                         WS_VISIBLE,            /* Style of client window      */
  2496.                         (HMODULE) NULL,        /* Module handle for resources */
  2497.                         0,                     /* No resource identifier      */
  2498.                         &hwndClient);          /* Pointer to client handle    */
  2499.  
  2500.         /* Start the message loop.             */
  2501.         while (WinGetMsg(hab, &qmsg, (HWND) NULL, 0, 0))
  2502.             WinDispatchMsg(hab, &qmsg);
  2503.  
  2504.         /*. Destroy the main window.           */
  2505.         WinDestroyWindow(hwndFrame);
  2506.  
  2507.         /* Destroy the message queue.          */
  2508.         WinDestroyMsgQueue(hmq);
  2509.  
  2510.         /* Terminate the application.          */
  2511.         WinTerminate(hab);
  2512.     }
  2513.  
  2514. Both the WinGetMsg and WinDispatchMsg functions take a pointer to a QMSG 
  2515. structure as a parameter.  If a message is available, WinGetMsg copies it to 
  2516. the QMSG structure; WinDispatchMsg then uses the data in the structure as 
  2517. arguments for the window procedure. 
  2518.  
  2519. Occasionally, an application might need to process a message before dispatching 
  2520. it.  For example, if a message is posted but the destination window is not 
  2521. specified (that is, the message contains a NULL window handle), the application 
  2522. must process the message to determine which window should receive the message. 
  2523. Then the WinDispatchMsg function can forward the message to the proper window. 
  2524. The following code fragment shows how the message loop can process messages 
  2525. that have NULL window handles: 
  2526.  
  2527.  
  2528.     HAB hab;
  2529.     QMSG qmsg;
  2530.  
  2531.     while (WinGetMsg (hab, &qmsg, (HWND) NULL, 0, 0)) {
  2532.         if (qmsg.hwnd == NULL) {
  2533.             .
  2534.             . /* Process the message. */
  2535.             .
  2536.         }
  2537.         else
  2538.             WinDispatchMsg (hab, &qmsg);
  2539.         }
  2540.  
  2541.  
  2542. ΓòÉΓòÉΓòÉ 2.2.2. Examining the Message Queue ΓòÉΓòÉΓòÉ
  2543.  
  2544. An application can examine the contents of the message queue by using the 
  2545. WinPeekMsg or WinQueryQueueStatus function.  It is useful to examine the queue 
  2546. if the application starts a lengthy operation that additional user input might 
  2547. affect, or if the application needs to look ahead in the queue to anticipate a 
  2548. response to user input. 
  2549.  
  2550. An application can use WinPeekMsg to check for specific messages in the message 
  2551. queue.  This function is useful for extracting messages for a specific window 
  2552. from the queue.  It returns immediately if there is no message in the queue. 
  2553. An application can use WinPeekMsg in a loop without requiring the loop to wait 
  2554. for a message to arrive.  The following code fragment checks the queue for 
  2555. WM_CHAR messages: 
  2556.  
  2557.     HAB hab;
  2558.     QMSG qmsg;
  2559.  
  2560.     if (WinPeekMsg(hab, &qmsg, (HWND) NULL, WM_CHAR, WM_CHAR, PM_NOREMOVE)){
  2561.               .
  2562.               . /* Process the message. */
  2563.               .
  2564.     }
  2565.  
  2566. An application also can use the WinQueryQueueStatus function to check for 
  2567. messages in the queue.  This function is very fast and returns information 
  2568. about the kinds of messages available in the queue and which messages have been 
  2569. posted recently.  Most applications use this function in message loops that 
  2570. need to be as fast as possible. 
  2571.  
  2572.  
  2573. ΓòÉΓòÉΓòÉ 2.2.3. Posting a Message to a Window ΓòÉΓòÉΓòÉ
  2574.  
  2575. An application can use the WinPostMsg function to post a message to a window. 
  2576. The message goes to the window's message queue.  The following code fragment 
  2577. posts the WM_QUIT message: 
  2578.  
  2579.     HWND hwnd;
  2580.  
  2581.     if (!WinPostMsg(hwnd, WM_QUIT, NULL, NULL)){
  2582.  
  2583.         /* Message was not posted. */
  2584.     }
  2585.  
  2586. The WinPostMsg function returns FALSE if the queue is full, and the message 
  2587. cannot be posted. 
  2588.  
  2589.  
  2590. ΓòÉΓòÉΓòÉ 2.2.4. Sending a Message to a Window ΓòÉΓòÉΓòÉ
  2591.  
  2592. An application can use the WinSendMsg function to send a message directly to a 
  2593. window.  An application uses this function to send messages to child windows. 
  2594. For example, the following code fragment sends an LM_INSERTITEM message to 
  2595. direct a list-box control to add an item to the end of its list: 
  2596.  
  2597.     HWND hwndListBox;
  2598.     static CHAR szWeekday[] = "Tuesday";
  2599.  
  2600.     WinSendMsg(hwndListBox,
  2601.                LM_INSERTITEM,
  2602.                (MPARAM)LIT_END,
  2603.                MPFROMP(szWeekday));
  2604.  
  2605. WinSendMsg calls the window's window procedure and waits for it to handle the 
  2606. message and return a result.  An application can send a message to any window 
  2607. in the system, as long as the application has the handle of the target window. 
  2608. The message queue does not store the message; however, the thread making the 
  2609. call must have a message queue. 
  2610.  
  2611.  
  2612. ΓòÉΓòÉΓòÉ 2.2.5. Broadcasting a Message ΓòÉΓòÉΓòÉ
  2613.  
  2614. An application can send a message to multiple windows by using the 
  2615. WinBroadcastMsg function.  Often this function is used to broadcast the 
  2616. WM_SYSVALUECHANGED message after an application changes a system value.  The 
  2617. following code fragment shows how to broadcast this message to all frame 
  2618. windows in all applications: 
  2619.  
  2620.     HWND hwnd;
  2621.  
  2622.     WinBroadcastMsg(
  2623.         hwnd,                                /* Window handle         */
  2624.         WM_SYSVALUECHANGED,                  /* Message identifier    */
  2625.         NULL,                                /* No message parameters */
  2626.         NULL,
  2627.         BMSG_FRAMEONLY | BMSG_POSTQUEUE);    /* All frame windows     */
  2628.  
  2629. An application can broadcast messages to all windows, just frame windows, or 
  2630. just the windows in the application. 
  2631.  
  2632.  
  2633. ΓòÉΓòÉΓòÉ 2.2.6. Using Message Macros ΓòÉΓòÉΓòÉ
  2634.  
  2635. The system header files define several macros that help create and interpret 
  2636. message parameters. 
  2637.  
  2638. One set of macros helps you construct message parameters.  These macros are 
  2639. useful for sending and posting messages.  For example, the following code 
  2640. fragment uses the MPFROMSHORT macro to convert a 16-bit integer into the 32-bit 
  2641. message parameter: 
  2642.  
  2643.  
  2644.     HWND hwndButton;
  2645.  
  2646.     WinSendMsg(hwndButton, BM_SETCHECK, MPFROMSHORT(1), NULL);
  2647.  
  2648. A second set of macros helps you extract values from a message parameter. 
  2649. These macros are useful for handling messages in a window procedure.  The 
  2650. following code fragment determines whether the window receiving the 
  2651. WM_FOCUSCHANGE message is gaining or losing the keyboard focus.  The fragment 
  2652. uses the SHORT1FROMMP macro to extract the focus-change flag, the SHORT2FROMMP 
  2653. macro to extract the focus flag, and the HWNDFROMMP macro to extract the window 
  2654. handle. 
  2655.  
  2656.     USHORT fsFocusChange;
  2657.     MPARAM mp1, mp2;
  2658.     HWND hwndGainFocus;
  2659.  
  2660.  
  2661.     case WM_FOCUSCHANGE:
  2662.         fsFocusChange = SHORT2FROMMP(mp2);    /* Gets focus-change flags  */
  2663.         if (SHORT1FROMMP(mp2))                /* Gaining or losing focus? */
  2664.             hwndGainFocus = HWNDFROMMP(mp1);
  2665.  
  2666. A third set of macros helps you construct a message result.  These macros are 
  2667. useful for returning message results in a window procedure, as the following 
  2668. code fragment illustrates: 
  2669.  
  2670.     return (MRFROM2SHORT(1, 2));
  2671.  
  2672.  
  2673. ΓòÉΓòÉΓòÉ 2.3. Summary ΓòÉΓòÉΓòÉ
  2674.  
  2675. Following are the functions and structures used with OS/2 messages and message 
  2676. queues. 
  2677.  
  2678. Commonly Used Message and Message Queue Functions 
  2679.  
  2680. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2681. ΓöéFunction Name           ΓöéDescription                         Γöé
  2682. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2683. ΓöéWinCreateMsgQueue       ΓöéCreates a message queue.            Γöé
  2684. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2685. ΓöéWinDefDlgProc           ΓöéInvokes the default dialog          Γöé
  2686. Γöé                        Γöéprocedure.                          Γöé
  2687. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2688. ΓöéWinDefWindowProc        ΓöéInvokes the default window          Γöé
  2689. Γöé                        Γöéprocedure.                          Γöé
  2690. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2691. ΓöéWinDestroyMsgQueue      ΓöéDestroys the message queue.         Γöé
  2692. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2693. ΓöéWinDispatchMsg          ΓöéInvokes a window procedure.         Γöé
  2694. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2695. ΓöéWinGetMsg               ΓöéGets a message from the thread's    Γöé
  2696. Γöé                        Γöémessage queue and returns msg when aΓöé
  2697. Γöé                        Γöémessage conforming to the filtering Γöé
  2698. Γöé                        Γöécriteria is available.              Γöé
  2699. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2700. ΓöéWinPeekMsg              ΓöéInspects the thread's message queue Γöé
  2701. Γöé                        Γöéand returns to the application with Γöé
  2702. Γöé                        Γöéor without a message.               Γöé
  2703. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2704. ΓöéWinPostMsg              ΓöéPosts a message to the message queueΓöé
  2705. Γöé                        Γöéassociated with the window defined  Γöé
  2706. Γöé                        Γöéby hwnd.                            Γöé
  2707. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2708. ΓöéWinSendDlgItemMsg       ΓöéSends a message to the dialog item  Γöé
  2709. Γöé                        Γöédefined by item in the dialog windowΓöé
  2710. Γöé                        Γöéspecified by Dlg                    Γöé
  2711. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2712. ΓöéWinSendMsg              ΓöéSends a message with identity Msgid Γöé
  2713. Γöé                        Γöéto hwnd.                            Γöé
  2714. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2715.  
  2716. Seldom-Used Message and Message Queue Functions 
  2717.  
  2718. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2719. ΓöéFunction Name           ΓöéDescription                         Γöé
  2720. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2721. ΓöéWinBroadcastMsg         ΓöéBroadcasts a message to multiple    Γöé
  2722. Γöé                        Γöéwindows.                            Γöé
  2723. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2724. ΓöéWinCallMsgFilter        ΓöéCalls a message-filter hook.        Γöé
  2725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2726. ΓöéWinInSendMsg            ΓöéDetermines whether the current      Γöé
  2727. Γöé                        Γöéthread is processing a message sent Γöé
  2728. Γöé                        Γöéby another thread.                  Γöé
  2729. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2730. ΓöéWinPostQueueMsg         ΓöéPosts a message to a message queue. Γöé
  2731. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2732.  
  2733. Almost-Never Used Message and Message Queue Functions 
  2734.  
  2735. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2736. ΓöéFunction Name           ΓöéDescription                         Γöé
  2737. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2738. ΓöéWinQueryMsgPos          ΓöéReturns the pointer position, in    Γöé
  2739. Γöé                        Γöéscreen coordinates, when the last   Γöé
  2740. Γöé                        Γöémessage obtained from the current   Γöé
  2741. Γöé                        Γöémessage queue is posted.            Γöé
  2742. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2743. ΓöéWinQueryQueueInfo       ΓöéReturns the information for the     Γöé
  2744. Γöé                        Γöéspecified queue.                    Γöé
  2745. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2746. ΓöéWinQueryQueueStatus     ΓöéReturns a code indicating the statusΓöé
  2747. Γöé                        Γöéof the message queue associated withΓöé
  2748. Γöé                        Γöéthe caller.                         Γöé
  2749. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2750. ΓöéWinRegisterUserMsg      ΓöéRegisters a user message and definesΓöé
  2751. Γöé                        Γöéits parameters.                     Γöé
  2752. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2753. ΓöéWinSetClassMsgInterest  ΓöéSets the message interest of a      Γöé
  2754. Γöé                        Γöémessage class.                      Γöé
  2755. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2756. ΓöéWinSetMsgInterest       ΓöéSets a window's message interest.   Γöé
  2757. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2758. ΓöéWinSetMsgMode           ΓöéIndicates the mode for the          Γöé
  2759. Γöé                        Γöégeneration and processing of        Γöé
  2760. Γöé                        Γöémessages for the private window     Γöé
  2761. Γöé                        Γöéclass of an application.            Γöé
  2762. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2763. ΓöéWinTranslateAccel       ΓöéTranslates a WM_CHAR message.       Γöé
  2764. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2765. ΓöéWinWaitMsg              ΓöéWaits for a filtered message.       Γöé
  2766. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2767.  
  2768. Message and Message Queue Structures 
  2769.  
  2770. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2771. ΓöéStructure Name          ΓöéDescription                         Γöé
  2772. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2773. ΓöéHMQ                     ΓöéMessage-queue handle.               Γöé
  2774. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2775. ΓöéMQINFO                  ΓöéMessage-queue information structure.Γöé
  2776. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2777. ΓöéQMSG                    ΓöéMessage structure.                  Γöé
  2778. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2779.  
  2780.  
  2781. ΓòÉΓòÉΓòÉ 3. Window Classes ΓòÉΓòÉΓòÉ
  2782.  
  2783. A window class determines which styles and which window procedure are given to 
  2784. a window when it is created.  This chapter explains how a PM application 
  2785. creates and uses window classes. 
  2786.  
  2787.  
  2788. ΓòÉΓòÉΓòÉ 3.1. About Window Classes ΓòÉΓòÉΓòÉ
  2789.  
  2790. Every window is a member of a window class.  An application must specify a 
  2791. window class when it creates a window.  Each window class has an associated 
  2792. window procedure that is used by all windows of the same class.  The window 
  2793. procedure handles messages for all windows of that class and, therefore, 
  2794. controls the behavior and appearance of the window. 
  2795.  
  2796. A window class must be registered before an application can create a window of 
  2797. that class.  Registering a window class associates a window procedure and class 
  2798. styles with a class name.  When an application specifies the class name in a 
  2799. window-creation function such as WinCreateWindow, the system creates a window 
  2800. that uses the window procedure and styles associated with the class name. 
  2801.  
  2802. An application can register private classes or use preregistered public window 
  2803. classes. 
  2804.  
  2805.  
  2806. ΓòÉΓòÉΓòÉ 3.1.1. Private Window Classes ΓòÉΓòÉΓòÉ
  2807.  
  2808. A private window class is any class registered within an application.  An 
  2809. application registers a private class by calling the WinRegisterClass function. 
  2810. A private class cannot be shared with other applications.  When an application 
  2811. terminates, the system removes any data associated with the application's 
  2812. private window classes. 
  2813.  
  2814. An application can register a private class anytime but, typically, does so as 
  2815. part of application initialization.  To register a private class during 
  2816. application initialization, the application also must call WinInitialize and, 
  2817. usually, WinCreateMsgQueue before class registration. 
  2818.  
  2819. An application cannot de-register a private window class; it remains registered 
  2820. and available until the application terminates. 
  2821.  
  2822. When an application registers a private window class, it must supply the 
  2823. following information: 
  2824.  
  2825. o Class name 
  2826. o Class styles 
  2827. o Window procedure 
  2828. o Window data size. 
  2829.  
  2830.  
  2831. ΓòÉΓòÉΓòÉ 3.1.1.1. Class Name ΓòÉΓòÉΓòÉ
  2832.  
  2833. The class name identifies the window class.  The application uses this name in 
  2834. the window-creation functions to specify the class of the window being created. 
  2835. The class name can be a character string or an atom, and it must be unique 
  2836. within the application.  The system checks as to whether a public class or a 
  2837. class already registered by the application has the same name.  If the class 
  2838. name is not unique to that application, the system returns an error. 
  2839.  
  2840.  
  2841. ΓòÉΓòÉΓòÉ 3.1.1.2. Class Styles ΓòÉΓòÉΓòÉ
  2842.  
  2843. Each window class has one or more values, called class styles, that tell the 
  2844. system which initial window styles to give a window created with that class. 
  2845. An application sets the class styles for a private window class when it 
  2846. registers the class.  Once a class is registered, the application cannot change 
  2847. the styles. 
  2848.  
  2849. An application can specify one or more of the following class styles in the 
  2850. WinRegisterClass function, combining them as necessary by using the bitwise OR 
  2851. operator: 
  2852.  
  2853. Class Styles 
  2854.  
  2855. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2856. ΓöéStyle Name     ΓöéDescription                                  Γöé
  2857. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2858. ΓöéCS_CLIPCHILDRENΓöéPrevents a window from painting over its     Γöé
  2859. Γöé               Γöéchild windows, but increases the time        Γöé
  2860. Γöé               Γöénecessary to calculate the visible region.   Γöé
  2861. Γöé               ΓöéThis style usually is not necessary, because Γöé
  2862. Γöé               Γöéif the parent and child windows overlap and  Γöé
  2863. Γöé               Γöéare both invalidated, the operating system   Γöé
  2864. Γöé               Γöédraws the parent window before drawing the   Γöé
  2865. Γöé               Γöéchild window. If the child window is         Γöé
  2866. Γöé               Γöéinvalidated independently of the parent      Γöé
  2867. Γöé               Γöéwindow, the system redraws only the child    Γöé
  2868. Γöé               Γöéwindow. If the update region of the parent   Γöé
  2869. Γöé               Γöéwindow does not intersect the child window,  Γöé
  2870. Γöé               Γöédrawing the parent window causes the child   Γöé
  2871. Γöé               Γöéwindow to be redrawn. This style is useful toΓöé
  2872. Γöé               Γöéprevent a child window containing a complex  Γöé
  2873. Γöé               Γöégraphic from being redrawn unnecessarily.    Γöé
  2874. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2875. ΓöéCS_CLIPSIBLINGSΓöéPrevents a window from painting over its     Γöé
  2876. Γöé               Γöésibling windows. This style protects sibling Γöé
  2877. Γöé               Γöéwindows but increases the time necessary to  Γöé
  2878. Γöé               Γöécalculate the visible region. This style is  Γöé
  2879. Γöé               Γöéappropriate for windows that overlap and haveΓöé
  2880. Γöé               Γöéthe same parent window.                      Γöé
  2881. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2882. ΓöéCS_FRAME       ΓöéIdentifies the window as a frame window.     Γöé
  2883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2884. ΓöéCS_HITTEST     ΓöéDirects the operating system to send         Γöé
  2885. Γöé               ΓöéWM_HITTEST messages to the window whenever   Γöé
  2886. Γöé               Γöéthe mouse pointer moves in the window.       Γöé
  2887. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2888. ΓöéCS_MOVENOTIFY  ΓöéDirects the system to send WM_MOVE messages  Γöé
  2889. Γöé               Γöéto the window whenever the user moves the    Γöé
  2890. Γöé               Γöéwindow.                                      Γöé
  2891. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2892. ΓöéCS_PARENTCLIP  ΓöéExtends a window's visible region to include Γöé
  2893. Γöé               Γöéthat of its parent window. This style        Γöé
  2894. Γöé               Γöésimplifies the calculation of the child      Γöé
  2895. Γöé               Γöéwindow's visible region but, potentially, is Γöé
  2896. Γöé               Γöédangerous, because the parent window's       Γöé
  2897. Γöé               Γöévisible region is usually larger than the    Γöé
  2898. Γöé               Γöéchild window.                                Γöé
  2899. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2900. ΓöéCS_SAVEBITS    ΓöéSaves the screen area under a window as a bitΓöé
  2901. Γöé               Γöémap. When the user hides or moves the window,Γöé
  2902. Γöé               Γöéthe system restores the image by copying the Γöé
  2903. Γöé               Γöébits; there is no need to add the area to theΓöé
  2904. Γöé               Γöéuncovered window's update region. This style Γöé
  2905. Γöé               Γöécan improve system performance, but also can Γöé
  2906. Γöé               Γöéconsume a great deal of memory. It is        Γöé
  2907. Γöé               Γöérecommended only for transient windows such  Γöé
  2908. Γöé               Γöéas menus and dialog windows-not for main     Γöé
  2909. Γöé               Γöéapplication windows.                         Γöé
  2910. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2911. ΓöéCS_SIZEREDRAW  ΓöéCauses the window to receive a WM_PAINT      Γöé
  2912. Γöé               Γöémessage and be completely invalidated        Γöé
  2913. Γöé               Γöéwhenever the window is resized, even if it isΓöé
  2914. Γöé               Γöémade smaller. (Typically, only the uncovered Γöé
  2915. Γöé               Γöéarea of a window is invalidated when a windowΓöé
  2916. Γöé               Γöéis resized.) This class style is useful when Γöé
  2917. Γöé               Γöéan application scales graphics to fill the   Γöé
  2918. Γöé               Γöéwindow.                                      Γöé
  2919. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2920. ΓöéCS_SYNCPAINT   ΓöéCauses the window to receive WM_PAINT        Γöé
  2921. Γöé               Γöémessages immediately after a part of the     Γöé
  2922. Γöé               Γöéwindow becomes invalid. Without this style,  Γöé
  2923. Γöé               Γöéthe window receives WM_PAINT messages only ifΓöé
  2924. Γöé               Γöéno other message is waiting to be processed. Γöé
  2925. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2926.  
  2927.  
  2928. ΓòÉΓòÉΓòÉ 3.1.1.3. Window Procedure ΓòÉΓòÉΓòÉ
  2929.  
  2930. The window procedure for a window class processes all messages sent or posted 
  2931. to all windows of that class.  It is the chief component of the window class 
  2932. because it controls the appearance and behavior of each window created with the 
  2933. class.  Window procedures are shared by all windows of a class, so an 
  2934. application must ensure that no conflicts arise when two windows of the same 
  2935. class attempt to access the same global data.  In other words, the window 
  2936. procedure must protect global data and other shared resources. 
  2937.  
  2938.  
  2939. ΓòÉΓòÉΓòÉ 3.1.1.4. Window Data Size ΓòÉΓòÉΓòÉ
  2940.  
  2941. The system creates a window data structure for each window, which includes 
  2942. extra space that an application can use to store additional data about a 
  2943. window.  An application specifies the number of extra bytes to allocate in the 
  2944. WinRegisterClass function.  All windows of the same class have the same amount 
  2945. of window data space. 
  2946.  
  2947. An application can store window data in a window's data structure by using the 
  2948. WinSetWindowUShort and WinSetWindowULong functions.  It can retrieve data by 
  2949. using the WinQueryWindowUShort and WinQueryWindowULong functions. 
  2950.  
  2951.  
  2952. ΓòÉΓòÉΓòÉ 3.1.1.5. Custom Window Styles ΓòÉΓòÉΓòÉ
  2953.  
  2954. An application that registers a window class also can support its own set of 
  2955. styles for windows of that class.  Standard window styles-for example, 
  2956. WS_VISIBLE and WS_SYNCPAINT-still apply to these windows.  A window style is a 
  2957. 32-bit integer, and only the high 16 bits are used for the standard window 
  2958. styles; an application can use the low 16 bits for custom styles specific to a 
  2959. window class. 
  2960.  
  2961. The operating system has unique window styles for all preregistered window 
  2962. classes.  Styles such as FS_BORDER and BS_PUSHBUTTON are processed by the 
  2963. window procedure for the corresponding class.  This means that an application 
  2964. can build the support for its own window styles into the window procedure for 
  2965. its private class.  A window style designed for one window class will not work 
  2966. with another window class. 
  2967.  
  2968.  
  2969. ΓòÉΓòÉΓòÉ 3.1.2. Public Window Classes ΓòÉΓòÉΓòÉ
  2970.  
  2971. Public window classes are registered during system initialization.  Their 
  2972. window procedures are in dynamic link libraries.  Therefore, to use a public 
  2973. window class, an application need not register it.  Nor does the application 
  2974. need to import the window procedure for a public window class because the 
  2975. system resolves references to the window procedure. 
  2976.  
  2977. An application cannot use a public window class name when it registers a 
  2978. private window class. 
  2979.  
  2980.  
  2981. ΓòÉΓòÉΓòÉ 3.1.2.1. System-Defined Public Window Classes ΓòÉΓòÉΓòÉ
  2982.  
  2983. The system provides a number of public window classes that support menus, frame 
  2984. windows, control windows, and dialog windows.  An application can create a 
  2985. window of a system-defined public window class by specifying one of the 
  2986. following class name constants in a call to WinCreateWindow: 
  2987.  
  2988. Public Window Classes 
  2989.  
  2990. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2991. ΓöéClass Name     ΓöéDescription                                  Γöé
  2992. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2993. ΓöéWC_BUTTON      ΓöéConsists of buttons and boxes the user can   Γöé
  2994. Γöé               Γöéselect by clicking the pointing device or    Γöé
  2995. Γöé               Γöéusing the keyboard.                          Γöé
  2996. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2997. ΓöéWC_COMBOBOX    ΓöéCreates a combination-box control, which     Γöé
  2998. Γöé               Γöécombines a list-box control and an           Γöé
  2999. Γöé               Γöéentry-field control. It enables the user to  Γöé
  3000. Γöé               Γöéenter data either by typing in the entry     Γöé
  3001. Γöé               Γöéfield or by choosing from the list in the    Γöé
  3002. Γöé               Γöélist box.                                    Γöé
  3003. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3004. ΓöéWC_CONTAINER   ΓöéCreates a control in which the user can groupΓöé
  3005. Γöé               Γöéobjects in a logical manner.  A container canΓöé
  3006. Γöé               Γöédisplay those objects in various formats or  Γöé
  3007. Γöé               Γöéviews.  The container control supports drag  Γöé
  3008. Γöé               Γöéand drop so the user can place information inΓöé
  3009. Γöé               Γöéa container by simply dragging and dropping. Γöé
  3010. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3011. ΓöéWC_ENTRYFIELD  ΓöéConsists of a single line of text that the   Γöé
  3012. Γöé               Γöéuser can edit.                               Γöé
  3013. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3014. ΓöéWC_FRAME       ΓöéA composite window class that can contain    Γöé
  3015. Γöé               Γöéchild windows of many of the other window    Γöé
  3016. Γöé               Γöéclasses.                                     Γöé
  3017. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3018. ΓöéWC_LISTBOX     ΓöéPresents a list of text items from which the Γöé
  3019. Γöé               Γöéuser can make selections.                    Γöé
  3020. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3021. ΓöéWC_MENU        ΓöéPresents a list of items that can be         Γöé
  3022. Γöé               Γöédisplayed horizontally as menu bars, or      Γöé
  3023. Γöé               Γöévertically as pull-down menus.  Usually menusΓöé
  3024. Γöé               Γöéare used to provide a command interface to   Γöé
  3025. Γöé               Γöéapplications.                                Γöé
  3026. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3027. ΓöéWC_NOTEBOOK    ΓöéCreates a control for the user that is       Γöé
  3028. Γöé               Γöédisplayed as a number of pages.  The top pageΓöé
  3029. Γöé               Γöéis visible, and the others are hidden, with  Γöé
  3030. Γöé               Γöétheir presence being indicated by a visible  Γöé
  3031. Γöé               Γöéedge on each of the back pages.              Γöé
  3032. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3033. ΓöéWC_SCROLLBAR   ΓöéConsists of window scroll bars that let the  Γöé
  3034. Γöé               Γöéuser scroll the contents of the associated   Γöé
  3035. Γöé               Γöéwindow.                                      Γöé
  3036. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3037. ΓöéWC_SLIDER      ΓöéCreates a control that is usable for         Γöé
  3038. Γöé               Γöéproducing approximate (analog) values or     Γöé
  3039. Γöé               Γöéproperties.  Scroll bars were used for this  Γöé
  3040. Γöé               Γöéfunction in the past, but the slider providesΓöé
  3041. Γöé               Γöéa more flexible method of achieving the same Γöé
  3042. Γöé               Γöéresult, with less programming effort.        Γöé
  3043. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3044. ΓöéWC_SPINBUTTON  ΓöéCreates a control that presents itself to theΓöé
  3045. Γöé               Γöéuser as a scrollable ring of choices, giving Γöé
  3046. Γöé               Γöéthe user quick access to the data.  The user Γöé
  3047. Γöé               Γöéis presented only one item at a time, so the Γöé
  3048. Γöé               Γöéspin button should be used with data that is Γöé
  3049. Γöé               Γöéintuitively related.                         Γöé
  3050. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3051. ΓöéWC_STATIC      ΓöéSimple display items that do not respond to  Γöé
  3052. Γöé               Γöékeyboard or pointing device events.          Γöé
  3053. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3054. ΓöéWC_TITLEBAR    ΓöéDisplays the window title or caption and letsΓöé
  3055. Γöé               Γöéthe user move the window's owner.            Γöé
  3056. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3057. ΓöéWC_VALUESET    ΓöéCreates a control similar in function to     Γöé
  3058. Γöé               Γöéradio buttons but provides additional        Γöé
  3059. Γöé               Γöéflexibility to display graphical, textual,   Γöé
  3060. Γöé               Γöéand numeric formats.  The values set with    Γöé
  3061. Γöé               Γöéthis control are mutually exclusive.         Γöé
  3062. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3063.  
  3064. Each system-defined public window class has a corresponding set of window 
  3065. styles that an application can use to customize a window of that class.  For 
  3066. example, a window created with the WC_BUTTON class has styles that include 
  3067. BS_PUSHBUTTON and BS_CHECKBOX.  Window styles enable you to customize aspects 
  3068. of a window's behavior and appearance.  The application specifies the window 
  3069. styles in the WinCreateWindow function. 
  3070.  
  3071.  
  3072. ΓòÉΓòÉΓòÉ 3.1.2.2. Custom Public Window Classes ΓòÉΓòÉΓòÉ
  3073.  
  3074. An application can create a custom public window class, but it must do so 
  3075. during system initialization.  Only the shell can register a public window 
  3076. class, and it can do so only when the system starts.  Registering a public 
  3077. window class requires a special load entry in the os2.ini file.  That entry 
  3078. instructs the shell to load a dynamic link library whose initialization routine 
  3079. registers the window class.  Custom public window classes must be registered 
  3080. using WinRegisterClass and must have the class style CS_PUBLIC.  If a custom 
  3081. public window class registered this way has the same name as an existing public 
  3082. window class, the custom class replaces the original class. 
  3083.  
  3084. If a dynamic link library replaces an existing public window class, the library 
  3085. can save the address of the original window procedure and use the address to 
  3086. subclass the original window class.  The dynamic link library retrieves the 
  3087. original window procedure address using the WinQueryClassInfo function.  The 
  3088. custom window procedure then passes unprocessed messages to the original window 
  3089. procedure instead of calling WinDefWindowProc. 
  3090.  
  3091. When subclassing a public window class, the custom public window procedure must 
  3092. not make the window data size smaller than the original window data size, 
  3093. because all public window classes that the operating system defines use 4 extra 
  3094. bytes for storing a pointer to custom window data.  This size is guaranteed 
  3095. only for public window classes defined by the operating system dynamic link 
  3096. libraries. 
  3097.  
  3098.  
  3099. ΓòÉΓòÉΓòÉ 3.1.3. Class Data ΓòÉΓòÉΓòÉ
  3100.  
  3101. An application can examine public window class data by using the 
  3102. WinQueryClassInfo and WinQueryClassName functions.  An application retrieves 
  3103. the name of the class for a given window by using the WinQueryClassName 
  3104. function.  If the window is one of the preregistered public window classes, the 
  3105. name returned is in the form #nnnnn, where nnnnn is up to 5 digits, 
  3106. representing the value of the window class constant.  Using this window class 
  3107. name, the application can call WinQueryClassInfo to retrieve the window class 
  3108. data.  WinQueryClassInfo copies the class style, window procedure address, and 
  3109. window data size to a CLASSINFO data structure. 
  3110.  
  3111.  
  3112. ΓòÉΓòÉΓòÉ 3.2. Using Window Classes ΓòÉΓòÉΓòÉ
  3113.  
  3114. This section explains how to perform the following tasks: 
  3115.  
  3116. o Register a private window class. 
  3117. o Register an imported window procedure. 
  3118.  
  3119.  
  3120. ΓòÉΓòÉΓòÉ 3.2.1. Registering a Private Window Class ΓòÉΓòÉΓòÉ
  3121.  
  3122. An application can register a private window class at any time by using the 
  3123. WinRegisterClass function.  You must define the window procedure in the 
  3124. application, choose a unique name, and set the window styles for the class. 
  3125.  
  3126. The following code fragment shows how to register the window class name 
  3127. "MyPrivateClass": 
  3128.  
  3129.  
  3130.     MRESULT EXPENTRY ClientWndProc(HWND hwnd,ULONG msg,MPARAM mp1, MPARAM mp2);
  3131.  
  3132.     HAB hab;
  3133.  
  3134.     WinRegisterClass(hab,      /* Anchor block handle            */
  3135.         "MyPrivateClass",      /* Name of class being registered */
  3136.         ClientWndProc,         /* Window procedure for class     */
  3137.         CS_SIZEREDRAW |        /* Class style                    */
  3138.         CS_HITTEST,            /* Class style                    */
  3139.         0);                    /* Extra bytes to reserve         */
  3140.  
  3141.  
  3142. ΓòÉΓòÉΓòÉ 3.3. Summary ΓòÉΓòÉΓòÉ
  3143.  
  3144. Following are the operating system functions and the structure used with window 
  3145. classes. 
  3146.  
  3147. Window Class Functions 
  3148.  
  3149. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3150. ΓöéFunction Name           ΓöéDescription                         Γöé
  3151. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3152. ΓöéWinQueryClassInfo       ΓöéReturns window class information.   Γöé
  3153. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3154. ΓöéWinQueryClassName       ΓöéCopies, into a buffer, the window   Γöé
  3155. Γöé                        Γöéclass name as a null-terminated     Γöé
  3156. Γöé                        Γöéstring.                             Γöé
  3157. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3158. ΓöéWinRegisterClass        ΓöéRegisters a window class.           Γöé
  3159. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3160. ΓöéWinSubclassWindow       ΓöéSubclasses the indicated window by  Γöé
  3161. Γöé                        Γöéreplacing its window procedure with Γöé
  3162. Γöé                        Γöéanother window procedure.           Γöé
  3163. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3164.  
  3165. Window Class Structure 
  3166.  
  3167. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3168. ΓöéStructure Name          ΓöéDescription                         Γöé
  3169. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3170. ΓöéCLASSINFO               ΓöéClass-information structure.        Γöé
  3171. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3172.  
  3173.  
  3174. ΓòÉΓòÉΓòÉ 4. Window Procedures ΓòÉΓòÉΓòÉ
  3175.  
  3176. Windows have an associated window procedure-a function that processes all 
  3177. messages sent or posted to a window.  Every aspect of a window's appearance and 
  3178. behavior depends on the window procedure's response to the messages.  This 
  3179. chapter explains how window procedures function, in general, and describes the 
  3180. default window procedure. 
  3181.  
  3182.  
  3183. ΓòÉΓòÉΓòÉ 4.1. About Window Procedures ΓòÉΓòÉΓòÉ
  3184.  
  3185. Every window belongs to a window class that determines which window procedure a 
  3186. particular window uses to process its messages.  All windows of the same class 
  3187. use the same window procedure.  For example, the operating system defines a 
  3188. window procedure for the frame window class (WC_FRAME), and all frame windows 
  3189. use that window procedure. 
  3190.  
  3191. An application typically defines at least one new window class and an 
  3192. associated window procedure.  Then, the application can create many windows of 
  3193. that class, all of which use the same window procedure.  This means that the 
  3194. same piece of code can be called from several sources simultaneously; 
  3195. therefore, you must be careful when modifying shared resources from a window 
  3196. procedure. 
  3197.  
  3198. Dialog procedures have the same structure and function as window procedures. 
  3199. The primary difference between a dialog procedure and a window procedure is the 
  3200. absence of a client window in the dialog procedure; that is, the controls in a 
  3201. dialog procedure are the immediate child windows of the frame, whereas the 
  3202. controls in a normal window are the grandchildren of the frame.  This makes 
  3203. significant differences in the code between the two; for example, 
  3204. WinSendDlgItemMsg does not work from a client window if you pass the client 
  3205. window handle as the first parameter. 
  3206.  
  3207.  
  3208. ΓòÉΓòÉΓòÉ 4.1.1. Structure of a Window Procedure ΓòÉΓòÉΓòÉ
  3209.  
  3210. A window procedure is a function that takes 4 arguments and returns a 32-bit 
  3211. pointer.  The arguments of a window procedure consist of a window handle, a 
  3212. ULONG message identifier, and two arguments, called message parameters, that 
  3213. are declared with the MPARAM data type.  The system defines an MPARAM as a 
  3214. 32-bit pointer to a VOID data type (a generic pointer).  The message parameters 
  3215. actually might contain any of the standard data types.  The message parameters 
  3216. are interpreted differently, depending on the value of the message identifier. 
  3217. OS/2 2.0 includes several macros that enable the application to cast the 
  3218. information from the MPARAM values into the actual data type.  SHORT1FROMMP, 
  3219. for example, extracts a 16-bit value from a 32-bit MPARAM. 
  3220.  
  3221. The window-procedure arguments are described in the following table: 
  3222.  
  3223. Window Procedure Arguments 
  3224.  
  3225. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3226. ΓöéArgument       ΓöéDescription                                  Γöé
  3227. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3228. Γöéhwnd           ΓöéHandle of the window receiving the message.  Γöé
  3229. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3230. Γöémsg            ΓöéMessage identifier. The message will         Γöé
  3231. Γöé               Γöécorrespond to one of the predefined constantsΓöé
  3232. Γöé               Γöé(for example, WM_CREATE) defined in the      Γöé
  3233. Γöé               Γöésystem include files or be an                Γöé
  3234. Γöé               Γöéapplication-defined message identifier.  The Γöé
  3235. Γöé               Γöévalue of an application-defined message      Γöé
  3236. Γöé               Γöéidentifier must be greater than the value of Γöé
  3237. Γöé               ΓöéWM_USER, and less than or equal to 0xffff.   Γöé
  3238. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3239. Γöémp1,mp2        ΓöéMessage parameters. Their interpretation     Γöé
  3240. Γöé               Γöédepends on the particular message.           Γöé
  3241. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3242.  
  3243. The return value of a window procedure is defined as an MRESULT data type.  The 
  3244. interpretation of the return value depends on the particular message.  Consult 
  3245. the description of each message to determine the appropriate return value. 
  3246.  
  3247.  
  3248. ΓòÉΓòÉΓòÉ 4.1.2. Default Window Procedure ΓòÉΓòÉΓòÉ
  3249.  
  3250. All windows in the system share certain fundamental behavior, defined in the 
  3251. default window-procedure function, WinDefWindowProc.  The default window 
  3252. procedure provides the minimal functionality for a window.  An 
  3253. application-defined window procedure should pass any messages it does not 
  3254. process to WinDefWindowProc for default processing. 
  3255.  
  3256.  
  3257. ΓòÉΓòÉΓòÉ 4.1.3. Window-Procedure Subclassing ΓòÉΓòÉΓòÉ
  3258.  
  3259. Subclassing enables an application to intercept and process messages sent or 
  3260. posted to a window before that window has a chance to process them. 
  3261. Subclassing most often is used to add functionality to a particular window or 
  3262. to alter a window's default behavior. 
  3263.  
  3264. An application subclasses a window by using the WinSubclassWindow function to 
  3265. replace the window's original window procedure with an application-defined 
  3266. window procedure.  Thereafter, the new window procedure processes any messages 
  3267. that are sent or posted to the window.  If the new window procedure does not 
  3268. process a particular message, it must pass the message to the original window 
  3269. procedure, not to WinDefWindowProc, for default processing. 
  3270.  
  3271.  
  3272. ΓòÉΓòÉΓòÉ 4.2. Using Window Procedures ΓòÉΓòÉΓòÉ
  3273.  
  3274. This section explains how to: 
  3275.  
  3276. o Design a window procedure 
  3277. o Associate a window procedure with a window class 
  3278. o Subclass a window. 
  3279.  
  3280.  
  3281. ΓòÉΓòÉΓòÉ 4.2.1. Designing a Window Procedure ΓòÉΓòÉΓòÉ
  3282.  
  3283. The following code fragment shows the structure of a typical window procedure 
  3284. and how to use the message argument in a switch statement, with individual 
  3285. messages handled by separate case statements.  Notice that each case returns a 
  3286. specific value for each message.  For messages that it does not handle itself, 
  3287. the window procedure calls WinDefWindowProc. 
  3288.  
  3289.     MRESULT ClientWndProc(
  3290.     HWND hwnd,
  3291.     ULONG msg,
  3292.     MPARAM mp1,
  3293.     MPARAM mp2)
  3294.     {
  3295.         /* Define local variables here, if required. */
  3296.         switch (msg) {
  3297.             case WM_CREATE:
  3298.  
  3299.         /* Initialize private window data.           */
  3300.             return (MRESULT) FALSE;
  3301.  
  3302.             case WM_PAINT:
  3303.  
  3304.         /* Paint the window.                         */
  3305.             return 0;
  3306.  
  3307.             case WM_DESTROY:
  3308.  
  3309.         /* Clean up private window data.             */
  3310.             return 0;
  3311.  
  3312.             default:
  3313.             break;
  3314.          }
  3315.          return WinDefWindowProc (hwnd, msg, mp1, mp2);
  3316.     }
  3317.  
  3318. A dialog window procedure does not receive the WM_CREATE message; however, it 
  3319. does receive a WM_INITDLG message when all of its control windows have been 
  3320. created. 
  3321.  
  3322. At the very least, a window procedure should handle the WM_PAINT message to 
  3323. draw itself.  Typically, it should handle mouse and keyboard messages as well. 
  3324. Consult the descriptions of individual messages to determine whether your 
  3325. window procedure should handle them. 
  3326.  
  3327. An application can call WinDefWindowProc as part of the processing of a 
  3328. message.  In such a case, the application can modify the message parameters 
  3329. before passing the message to WinDefWindowProc or can continue with the default 
  3330. processing after performing its own operations. 
  3331.  
  3332.  
  3333. ΓòÉΓòÉΓòÉ 4.2.2. Associating a Window Procedure with a Window Class ΓòÉΓòÉΓòÉ
  3334.  
  3335. To associate a window procedure with a window class, an application must pass a 
  3336. pointer to that window procedure to the WinRegisterClass function.  Once an 
  3337. application has registered the window procedure, the procedure automatically is 
  3338. associated with each new window created with that class. 
  3339.  
  3340. The following code fragment shows how to associate the window procedure in the 
  3341. previous example with a window class: 
  3342.  
  3343.     HAB hab;
  3344.     CHAR szClientClass[] = "My Window Class";
  3345.  
  3346.     WinRegisterClass(hab,      /* Anchor-block handle  */
  3347.         szClientClass,         /* Class name           */
  3348.         ClientWndProc,         /* Pointer to procedure */
  3349.         CS_SIZEREDRAW,         /* Class style          */
  3350.         0);                    /* Window data          */
  3351.  
  3352.  
  3353. ΓòÉΓòÉΓòÉ 4.2.3. Subclassing a Window ΓòÉΓòÉΓòÉ
  3354.  
  3355. To subclass a window, an application calls the WinSubclassWindow function, 
  3356. specifying the handle of the window to subclass and a pointer to the new window 
  3357. procedure.  The WinSubclassWindow function returns a pointer to the original 
  3358. window procedure; the application can use this pointer to pass unprocessed 
  3359. messages to the original procedure. 
  3360.  
  3361. The following code fragment subclasses a push button control window.  The new 
  3362. window procedure generates a beep whenever the user clicks the push button. 
  3363.  
  3364.     PFNWP pfnPushBtn;
  3365.     CHAR szCancel[] = "Cancel";
  3366.     HWND hwndClient;
  3367.     HWND hwndPushBtn;
  3368.         .
  3369.         .
  3370.         .
  3371.  
  3372.     /* Create a push button control.                  */
  3373.     hwndPushBtn = WinCreateWindow(
  3374.         hwndClient,     /* Parent-window handle       */
  3375.         WC_BUTTON,      /* Window class               */
  3376.         szCancel,       /* Window text                */
  3377.         WS_VISIBLE   |  /* Window style               */
  3378.         WS_SYNCPAINT |  /* Window style               */
  3379.         BS_PUSHBUTTON,  /* Button style               */
  3380.         50, 50,         /* Physical position          */
  3381.         70, 30,         /* Width and height           */
  3382.         hwndClient,     /* Owner-window handle        */
  3383.         HWND_TOP,       /* Z-order position           */
  3384.         1,              /* Window identifier          */
  3385.         NULL,           /* No control data            */
  3386.         NULL);          /* No presentation parameters */
  3387.  
  3388.     /* Subclass the push button control.              */
  3389.     pfnPushBtn = WinSubclassWindow(hwndPushBtn,
  3390.         SubclassPushBtnProc);
  3391.         .
  3392.         .
  3393.         .
  3394. }
  3395.     /* This procedure subclasses the push button.     */
  3396.     MRESULT EXPENTRY SubclassPushBtnProc(HWND hwnd,ULONG msg,MPARAM mp1, MPARAM mp2)
  3397.     {
  3398.         switch (msg) {
  3399.  
  3400.     /* Beep when the user clicks the push button.     */
  3401.             case WM_BUTTON1DOWN:
  3402.                 DosBeep(1000, 250);
  3403.                 break;
  3404.  
  3405.             default:
  3406.                 break;
  3407.         }
  3408.  
  3409.     /* Pass all messages to the original window procedure. */
  3410.         return (MRESULT) pfnPushBtn(hwnd, msg, mp1, mp2);
  3411.     }
  3412.  
  3413.  
  3414. ΓòÉΓòÉΓòÉ 4.3. Summary ΓòÉΓòÉΓòÉ
  3415.  
  3416. Following are the window-procedure functions and messages processed by the 
  3417. default window procedure. 
  3418.  
  3419. Window Procedure Functions 
  3420.  
  3421. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3422. ΓöéFunction Name           ΓöéDescription                         Γöé
  3423. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3424. ΓöéWinDefDlgProc           ΓöéThe default dialog procedure.       Γöé
  3425. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3426. ΓöéWinDefWindowProc        ΓöéThe default window procedure.       Γöé
  3427. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3428. ΓöéWinRegisterClass        ΓöéRegisters a window class.           Γöé
  3429. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3430. ΓöéWinSubclassWindow       ΓöéSubclasses the indicated window by  Γöé
  3431. Γöé                        Γöéreplacing its window procedure.     Γöé
  3432. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3433.  
  3434. Default Window Procedure Messages 
  3435.  
  3436. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3437. ΓöéMessage                 ΓöéDescription                         Γöé
  3438. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3439. ΓöéWM_BUTTON1DBLCLK        ΓöéOccurs when the user presses button Γöé
  3440. Γöé                        Γöé1 of the pointing device twice.     Γöé
  3441. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3442. ΓöéWM_BUTTON1DOWN          ΓöéOccurs when the user presses pointerΓöé
  3443. Γöé                        Γöébutton 1.                           Γöé
  3444. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3445. ΓöéWM_BUTTON1UP            ΓöéOccurs when the user releases       Γöé
  3446. Γöé                        Γöépointer button 1.                   Γöé
  3447. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3448. ΓöéWM_BUTTON2DBLCLK        ΓöéOccurs when the user presses button Γöé
  3449. Γöé                        Γöé2 of the pointing device twice.     Γöé
  3450. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3451. ΓöéWM_BUTTON2DOWN          ΓöéOccurs when the user presses pointerΓöé
  3452. Γöé                        Γöébutton 2.                           Γöé
  3453. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3454. ΓöéWM_BUTTON2UP            ΓöéOccurs when the user releases       Γöé
  3455. Γöé                        Γöépointer button 2.                   Γöé
  3456. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3457. ΓöéWM_BUTTON3DBLCLK        ΓöéOccurs when the user presses button Γöé
  3458. Γöé                        Γöé3 of the pointing device twice.     Γöé
  3459. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3460. ΓöéWM_BUTTON3DOWN          ΓöéOccurs when the user presses pointerΓöé
  3461. Γöé                        Γöébutton 3.                           Γöé
  3462. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3463. ΓöéWM_BUTTON3UP            ΓöéOccurs when the user releases       Γöé
  3464. Γöé                        Γöépointer button 3.                   Γöé
  3465. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3466. ΓöéWM_CALCVALIDRECTS       ΓöéSent to determine which areas of a  Γöé
  3467. Γöé                        Γöéwindow can be preserved if a window Γöé
  3468. Γöé                        Γöéis sized and which can be           Γöé
  3469. Γöé                        Γöéredisplayed.                        Γöé
  3470. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3471. ΓöéWM_CHAR                 ΓöéOccurs when the user presses a key. Γöé
  3472. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3473. ΓöéWM_CLOSE                ΓöéSent to a frame window to indicate  Γöé
  3474. Γöé                        Γöéthat the window is being closed by  Γöé
  3475. Γöé                        Γöéthe user.                           Γöé
  3476. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3477. ΓöéWM_CONTROLPOINTER       ΓöéSent to a control's owner window    Γöé
  3478. Γöé                        Γöéwhen the pointer moves over the     Γöé
  3479. Γöé                        Γöécontrol window, allowing the user toΓöé
  3480. Γöé                        Γöéset the pointer.                    Γöé
  3481. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3482. ΓöéWM_DDE_INITIATE         ΓöéSent by an application to one or    Γöé
  3483. Γöé                        Γöémore other applications to request  Γöé
  3484. Γöé                        Γöéinitiation of a conversation.       Γöé
  3485. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3486. ΓöéWM_DDE_INITIATEACK      ΓöéSent by a server application in     Γöé
  3487. Γöé                        Γöéresponse to a WM_DDE_INITIATE       Γöé
  3488. Γöé                        Γöémessage.                            Γöé
  3489. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3490. ΓöéWM_FOCUSCHANGE          ΓöéOccurs when the focus window is     Γöé
  3491. Γöé                        Γöéchanged.                            Γöé
  3492. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3493. ΓöéWM_HELP                 ΓöéOccurs when a control has a         Γöé
  3494. Γöé                        Γöésignificant event to notify to its  Γöé
  3495. Γöé                        Γöéowner, or when a key stroke has beenΓöé
  3496. Γöé                        Γöétranslated into a WM_HELP by an     Γöé
  3497. Γöé                        Γöéaccelerator table.                  Γöé
  3498. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3499. ΓöéWM_HITTEST              ΓöéSent to determine which window is   Γöé
  3500. Γöé                        Γöéassociated with an input from the   Γöé
  3501. Γöé                        Γöépointing device.                    Γöé
  3502. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3503. ΓöéWM_MENUSELECT           ΓöéOccurs when a menu item is selected.Γöé
  3504. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3505. ΓöéWM_MOUSEMOVE            ΓöéOccurs when the pointing device     Γöé
  3506. Γöé                        Γöépointer moves.                      Γöé
  3507. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3508. ΓöéWM_PAINT                ΓöéOccurs when a window needs          Γöé
  3509. Γöé                        Γöérepainting.                         Γöé
  3510. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3511. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  3512. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  3513. Γöé                        ΓöéDBCS conversion.                    Γöé
  3514. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3515. ΓöéWM_QUERYFOCUSCHAIN      ΓöéRequests the handle of a window in  Γöé
  3516. Γöé                        Γöéthe focus chain.                    Γöé
  3517. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3518. ΓöéWM_QUERYFRAMECTLCOUNT   ΓöéSent to the frame window in responseΓöé
  3519. Γöé                        Γöéto receipt of a WM_SIZE or          Γöé
  3520. Γöé                        ΓöéWM_UPDATEFRAME message.             Γöé
  3521. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3522. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  3523. Γöé                        Γöéthe window parameters.              Γöé
  3524. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3525. ΓöéWM_TIMER                ΓöéPosted when a timer times out.      Γöé
  3526. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3527. ΓöéWM_TRANSLATEACCEL       ΓöéSent to the focus window when a     Γöé
  3528. Γöé                        ΓöéWM_CHAR message occurs.             Γöé
  3529. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3530.  
  3531.  
  3532. ΓòÉΓòÉΓòÉ 5. Mouse and Keyboard Input ΓòÉΓòÉΓòÉ
  3533.  
  3534. An OS/2 Presentation Manager application can accept input from both a mouse (or 
  3535. other pointing device) and the keyboard.  This chapter explains how these input 
  3536. events should be received and processed. 
  3537.  
  3538.  
  3539. ΓòÉΓòÉΓòÉ 5.1. About Mouse and Keyboard Input ΓòÉΓòÉΓòÉ
  3540.  
  3541. Only one window at a time can receive keyboard input, and only one window at a 
  3542. time can receive mouse input; but they do not have to be the same window.  All 
  3543. keyboard input goes to the window with the input focus, and, normally, all 
  3544. mouse input goes to the window under the mouse pointer. 
  3545.  
  3546.  
  3547. ΓòÉΓòÉΓòÉ 5.1.1. System Message Queue ΓòÉΓòÉΓòÉ
  3548.  
  3549. The operating system routes all keystrokes and mouse input to the system 
  3550. message queue, converting these input events into messages, and posts them, one 
  3551. at a time, to the proper application-defined message queues.  An application 
  3552. retrieves messages from its queue and dispatches them to the appropriate window 
  3553. procedures, which process the messages. 
  3554.  
  3555. Mouse and keyboard input events in the system message queue are strictly 
  3556. ordered so that a new event cannot be processed until all previous events are 
  3557. fully processed: the system cannot determine the destination window of an input 
  3558. event until then.  For example, if a user types a command in one window, clicks 
  3559. the mouse to activate another window, then types a command in the second 
  3560. window, the destination of the second command depends on how the application 
  3561. handles the mouse click.  The second command would go to the second window only 
  3562. if that window became active as a result of the mouse click. 
  3563.  
  3564. It is important for an application to process all messages quickly to avoid 
  3565. slowing user interaction with the system.  A message must be responded to 
  3566. immediately in the current thread, but the processing it initiates should be 
  3567. done asynchronously in another thread that has no windows in the desktop tree. 
  3568.  
  3569. OS/2 can display multiple windows belonging to several applications at the same 
  3570. time.  To manage input among these windows, the system uses the concepts of 
  3571. window activation and keyboard focus. 
  3572.  
  3573.  
  3574. ΓòÉΓòÉΓòÉ 5.1.2. Window Activation ΓòÉΓòÉΓòÉ
  3575.  
  3576. Although the operating system can display windows from many different 
  3577. applications simultaneously during a PM session, the user can interact with 
  3578. only one application at a time-the active application.  The other applications 
  3579. continue to run, but they cannot receive user input until they become active. 
  3580.  
  3581. To enable the user to easily identify the active application, the system 
  3582. activates all frames in the tree between HWND_DESKTOP and the window with input 
  3583. focus.  That is, the system positions the active frame window above all other 
  3584. top-level windows on the screen.  If the active window is a standard frame 
  3585. window, the window's title bar and sizing border are highlighted. 
  3586.  
  3587. The user can control which application is active by clicking on a window or by 
  3588. pressing the Alt+Tab or Alt+Esc key combinations.  An application can set the 
  3589. active frame window by calling WinSetActiveWindow; it also can obtain the 
  3590. handle of the active frame window by using WinQueryActiveWindow. 
  3591.  
  3592. When one window is deactivated and another activated, the system sends a 
  3593. WM_ACTIVATE message, first to the window being deactivated, then to the window 
  3594. being activated.  The fActive parameter of the WM_ACTIVATE message is set to 
  3595. FALSE for the window being deactivated and set to TRUE for the window being 
  3596. activated.  An application can use this message to track the activation state 
  3597. of a client window. 
  3598.  
  3599.  
  3600. ΓòÉΓòÉΓòÉ 5.1.3. Keyboard Focus ΓòÉΓòÉΓòÉ
  3601.  
  3602. The keyboard focus is a temporary attribute of a window; the window that has 
  3603. the keyboard focus receives all keyboard input until the focus changes to a 
  3604. different window.  The system converts keyboard input events into WM_CHAR 
  3605. messages and posts them to the message queue of the window that has the 
  3606. keyboard focus. 
  3607.  
  3608. An application can set the keyboard focus to a particular window by calling 
  3609. WinSetFocus.  If the application does not use WinSetFocus to explicitly set the 
  3610. keyboard-focus window, the system sets the focus to the active frame window. 
  3611.  
  3612. The following events occur when an application uses WinSetFocus to shift the 
  3613. keyboard focus from one window (the original window) to another (the new 
  3614. window): 
  3615.  
  3616.  1. The system sends the original window a WM_SETFOCUS message (with the fFocus 
  3617.     parameter set to FALSE), indicating that that window has lost the keyboard 
  3618.     focus. 
  3619.  
  3620.  2. The system then sends the original window a WM_SETSELECTION message, 
  3621.     indicating that the window should remove the highlight from the current 
  3622.     selection. 
  3623.  
  3624.  3. If the original (frame) window is being deactivated, the system sends it a 
  3625.     WM_ACTIVATE message (with the fActive parameter set to FALSE), indicating 
  3626.     that the window is no longer active. 
  3627.  
  3628.  4. The system then sends the new application a WM_ACTIVATE message (with 
  3629.     fActive set to TRUE), indicating that the new application is now active. 
  3630.  
  3631.  5. If the new (main) window is being activated, the system sends it a 
  3632.     WM_ACTIVATE message (with fActive set to TRUE), indicating that the main 
  3633.     window is now active. 
  3634.  
  3635.  6. The system sends the new window a WM_SETSELECTION message, indicating that 
  3636.     the window should highlight the current selection. 
  3637.  
  3638.  7. Finally, the system sends the new window a WM_SETFOCUS message (with fFocus 
  3639.     set to TRUE), indicating that the new window has the keyboard focus. 
  3640.  
  3641. If, while processing a WM_SETFOCUS message, an application calls 
  3642. WinQueryActiveWindow, that function returns the handle of the previously-active 
  3643. window until the application establishes a new active window.  Similarly, if 
  3644. the application, while processing WM_SETFOCUS, calls WinQueryFocus, that 
  3645. function returns the handle of the previous keyboard-focus window until the 
  3646. application establishes a new keyboard-focus window.  In other words, even 
  3647. though the system has sent WM_ACTIVATE and WM_SETFOCUS messages (with the 
  3648. fActive and fFocus parameters set to FALSE) to the previous windows, those 
  3649. windows are considered the active and focus windows until the system 
  3650. establishes new active and focus windows. 
  3651.  
  3652. If the application calls WinSetFocus while processing a WM_ACTIVATE message, 
  3653. the system does not send a WM_SETFOCUS message (with fFocus set to FALSE), 
  3654. because no window has the focus. 
  3655.  
  3656. A client window receives a WM_ACTIVATE message when its parent frame window is 
  3657. being activated or deactivated.  The activation or deactivation message usually 
  3658. is followed by a WM_SETFOCUS message that specifies whether the client window 
  3659. is gaining or losing the keyboard focus.  Therefore, if the client window needs 
  3660. to change the keyboard focus, it should do so during the WM_SETFOCUS message, 
  3661. not during the WM_ACTIVATE message. 
  3662.  
  3663.  
  3664. ΓòÉΓòÉΓòÉ 5.1.4. Keyboard Messages ΓòÉΓòÉΓòÉ
  3665.  
  3666. The system sends keyboard input events as WM_CHAR messages to the message queue 
  3667. of the keyboard-focus window.  If no window has the keyboard focus, the system 
  3668. posts WM_CHAR messages to the message queue of the active frame window. 
  3669. Following are two typical situations in which an application receives WM_CHAR 
  3670. messages: 
  3671.  
  3672. An application has a client window or custom control window, either of which 
  3673. can have the keyboard focus.  If the window procedure for the client or control 
  3674. window does not process WM_CHAR messages, it should pass them to 
  3675. WinDefWindowProc, which will pass them to the owner.  Dialog control windows, 
  3676. in particular, should pass unprocessed WM_CHAR messages to the WinDefDlgProc 
  3677. function, because this is how the user interface implements control processing 
  3678. for the Tab and Arrow keys. 
  3679.  
  3680. An application window owns a control window whose window procedure can handle 
  3681. some, but not all, WM_CHAR messages.  This is common in dialog windows.  If the 
  3682. window procedure of a control in a dialog window cannot process a WM_CHAR 
  3683. message, the procedure can pass the message to the WinDefDlgProc function. 
  3684. This function sends the message to the control window's owner, which usually is 
  3685. a dialog frame window.  The application's dialog procedure then receives the 
  3686. WM_CHAR message.  This also is the case when an application client window owns 
  3687. a control window. 
  3688.  
  3689. A WM_CHAR message can represent a key-down or key-up transition.  It might 
  3690. contain a character code, virtual-key code, or scan code.  This message also 
  3691. contains information about the state of the Shift, Ctrl, and Alt keys. 
  3692.  
  3693. Each time a user presses a key, at least two WM_CHAR messages are generated: 
  3694. one when the key is pressed, and one when the key is released.  If the user 
  3695. holds down the key long enough to trigger the keyboard repeat, multiple WM_CHAR 
  3696. key-down messages are generated.  If the keyboard repeats faster than the 
  3697. application can retrieve the input events from its message queue, the system 
  3698. combines repeating character events into one WM_CHAR message and increments a 
  3699. count byte that indicates the number of keystrokes represented by the message. 
  3700. Generally, this byte is set to 1, but an application should check each WM_CHAR 
  3701. message to avoid missing any keystrokes. 
  3702.  
  3703. An application can ignore the repeat count.  For example, an application might 
  3704. ignore the repeat count on Arrow keys to prevent the cursor from skipping 
  3705. characters when the system is slow. 
  3706.  
  3707.  
  3708. ΓòÉΓòÉΓòÉ 5.1.4.1. Message Flags ΓòÉΓòÉΓòÉ
  3709.  
  3710. Applications decode WM_CHAR messages by examining individual bits in the flag 
  3711. word contained in the first message parameter (mp1) that the system passes with 
  3712. every WM_CHAR message.  The type of flag word indicates the nature of the 
  3713. message.  The system can set the bits in the flag word in various combinations. 
  3714. For example, a WM_CHAR message can have the KC_CHAR, KC_SCANCODE, and KC_SHIFT 
  3715. attribute bits all set at the same time.  An application can use the following 
  3716. list of flag values to test the flag word and determine the nature of a WM_CHAR 
  3717. message: 
  3718.  
  3719. Keyboard Character Flags 
  3720.  
  3721. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3722. ΓöéFlag Name      ΓöéDescription                                  Γöé
  3723. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3724. ΓöéKC_ALT         ΓöéIndicates that the Alt key was down when the Γöé
  3725. Γöé               Γöémessage was generated.                       Γöé
  3726. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3727. ΓöéKC_CHAR        ΓöéIndicates that the message contains a valid  Γöé
  3728. Γöé               Γöécharacter code for a key, typically an ASCII Γöé
  3729. Γöé               Γöécharacter code.                              Γöé
  3730. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3731. ΓöéKC_COMPOSITE   ΓöéIn combination with the KC_CHAR flag, this   Γöé
  3732. Γöé               Γöéflag indicates that the character code is a  Γöé
  3733. Γöé               Γöécombination of the key that was pressed and  Γöé
  3734. Γöé               Γöéthe previous dead key.  This flag is used to Γöé
  3735. Γöé               Γöécreate characters with diacritical marks.    Γöé
  3736. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3737. ΓöéKC_CTRL        ΓöéIndicates that the Ctrl key was down when theΓöé
  3738. Γöé               Γöémessage was generated.                       Γöé
  3739. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3740. ΓöéKC_DEADKEY     ΓöéIn combination with the KC_CHAR flag, this   Γöé
  3741. Γöé               Γöéflag indicates that the character code       Γöé
  3742. Γöé               Γöérepresents a dead-key glyph (such as an      Γöé
  3743. Γöé               Γöéaccent).  An application displays the        Γöé
  3744. Γöé               Γöédead-key glyph and does not advance the      Γöé
  3745. Γöé               Γöécursor.  Typically, the next WM_CHAR message Γöé
  3746. Γöé               Γöéis a KC_COMPOSITE message, containing the    Γöé
  3747. Γöé               Γöéglyph associated with the dead key.          Γöé
  3748. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3749. ΓöéKC_INVALIDCHAR ΓöéIndicates that the character is not valid forΓöé
  3750. Γöé               Γöéthe current translation tables.              Γöé
  3751. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3752. ΓöéKC_INVALIDCOMP ΓöéIndicates that the character code is not     Γöé
  3753. Γöé               Γöévalid in combination with the previous dead  Γöé
  3754. Γöé               Γöékey.                                         Γöé
  3755. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3756. ΓöéKC_KEYUP       ΓöéIndicates that the message was generated whenΓöé
  3757. Γöé               Γöéthe user released the key. If this flag is   Γöé
  3758. Γöé               Γöéclear, the message was generated when the    Γöé
  3759. Γöé               Γöéuser pressed the key.  An application can useΓöé
  3760. Γöé               Γöéthis flag to determine key-down and key-up   Γöé
  3761. Γöé               Γöéevents.                                      Γöé
  3762. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3763. ΓöéKC_LONEKEY     ΓöéIn combination with the KC_KEYUP flag, this  Γöé
  3764. Γöé               Γöéflag indicates that the user pressed no otherΓöé
  3765. Γöé               Γöékey while this key was down.                 Γöé
  3766. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3767. ΓöéKC_PREVDOWN    ΓöéIn combination with the KC_VIRTUALKEY flag,  Γöé
  3768. Γöé               Γöéthis flag indicates that the virtual key was Γöé
  3769. Γöé               Γöépressed previously. If this flag is clear,   Γöé
  3770. Γöé               Γöéthe virtual key was not previously pressed.  Γöé
  3771. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3772. ΓöéKC_SCANCODE    ΓöéIndicates that the message contains a valid  Γöé
  3773. Γöé               Γöéscan code generated by the keyboard when the Γöé
  3774. Γöé               Γöéuser pressed the key. The system uses the    Γöé
  3775. Γöé               Γöéscan code to identify the character code in  Γöé
  3776. Γöé               Γöéthe current code page; therefore, most       Γöé
  3777. Γöé               Γöéapplications do not need the scan code unlessΓöé
  3778. Γöé               Γöéthey cannot identify the key that the user   Γöé
  3779. Γöé               Γöépressed. WM_CHAR messages generated by user  Γöé
  3780. Γöé               Γöékeyboard input generally have a valid scan   Γöé
  3781. Γöé               Γöécode, but WM_CHAR messages posted to the     Γöé
  3782. Γöé               Γöéqueue by other applications might not containΓöé
  3783. Γöé               Γöéa scan code.                                 Γöé
  3784. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3785. ΓöéKC_SHIFT       ΓöéIndicates that the Shift key was down when   Γöé
  3786. Γöé               Γöéthe message was generated.                   Γöé
  3787. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3788. ΓöéKC_TOGGLE      ΓöéToggles on and off every time the user       Γöé
  3789. Γöé               Γöépresses a specified key. This is important   Γöé
  3790. Γöé               Γöéfor keys like NumLock, which have an on or   Γöé
  3791. Γöé               Γöéoff state.                                   Γöé
  3792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3793. ΓöéKC_VIRTUALKEY  ΓöéIndicates that the message contains a valid  Γöé
  3794. Γöé               Γöévirtual-key code for a key. Virtual keys     Γöé
  3795. Γöé               Γöétypically correspond to function keys.       Γöé
  3796. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3797.  
  3798. The mp1 and mp2 parameters of the WM_CHAR message contain information 
  3799. describing the nature of a keyboard input event, as follows: 
  3800.  
  3801. o SHORT1FROMMP (mp1) contains the flag word. 
  3802. o CHAR3FROMMP (mp1) contains the key-repeat count. 
  3803. o CHAR4FROMMP (mp1) contains the scan code. 
  3804. o SHORT1FROMMP (mp2) contains the character code. 
  3805. o SHORT2FROMMP (mp2) contains the virtual key code. 
  3806.  
  3807. An application window procedure should return TRUE if it processes a particular 
  3808. WM_CHAR message or FALSE if it does not. Typically, applications respond to 
  3809. key-down events and ignore key-up events. 
  3810.  
  3811. The following sections describe the different types of WM_CHAR messages. 
  3812. Generally, an application decodes these messages by creating layers of 
  3813. conditional statements that discriminate among the different combinations of 
  3814. flag and code attributes that can occur in a keyboard message. 
  3815.  
  3816.  
  3817. ΓòÉΓòÉΓòÉ 5.1.4.2. Key-Down or Key-Up Events ΓòÉΓòÉΓòÉ
  3818.  
  3819. Typically, the first attribute that an application checks in a WM_CHAR message 
  3820. is the key-down or key-up event.  If the KC_KEYUP bit of the flags word is set, 
  3821. the message is from a key-up event. If the flag is clear, the message is from a 
  3822. key-down event. 
  3823.  
  3824.  
  3825. ΓòÉΓòÉΓòÉ 5.1.4.3. Repeat-Count Events ΓòÉΓòÉΓòÉ
  3826.  
  3827. An application can check the key-repeat count of a WM_CHAR message to determine 
  3828. whether the message represents more than 1 keystroke.  The count is greater 
  3829. than 1 if the keyboard is sending characters to the system queue faster than 
  3830. the application can retrieve them.  If the system queue fills up, the system 
  3831. combines consecutive keyboard input events for each key into a single WM_CHAR 
  3832. message, with the key-repeat count set to the number of combined events. 
  3833.  
  3834.  
  3835. ΓòÉΓòÉΓòÉ 5.1.4.4. Character Codes ΓòÉΓòÉΓòÉ
  3836.  
  3837. The most typical use of WM_CHAR messages is to extract a character code from 
  3838. the message and display the character on the screen.  When the KC_CHAR flag is 
  3839. set in the WM_CHAR message, the low word of mp2 contains a character code based 
  3840. on the current code page.  Generally, this value is a character code 
  3841. (typically, an ASCII code) for the key that was pressed. 
  3842.  
  3843.  
  3844. ΓòÉΓòÉΓòÉ 5.1.4.5. Virtual-Key Codes ΓòÉΓòÉΓòÉ
  3845.  
  3846. WM_CHAR messages often contain virtual-key codes that correspond to various 
  3847. function keys and direction keys on a typical keyboard.  These keys do not 
  3848. correspond to any particular glyph code but are used to initiate operations. 
  3849. When the KC_VIRTUALKEY flag is set in the flag word of a WM_CHAR message, the 
  3850. high word of mp2 contains a virtual-key code for the key. 
  3851.  
  3852. Note:  Some keys, such as the Enter key, have both a valid character code and a 
  3853.        virtual-key code.  WM_CHAR messages for these keys will contain 
  3854.        character codes for both newline characters (ASCII 11) and virtual-key 
  3855.        codes (VK_ENTER). 
  3856.  
  3857.  
  3858. ΓòÉΓòÉΓòÉ 5.1.4.6. Scan Codes ΓòÉΓòÉΓòÉ
  3859.  
  3860. A third possible value in a WM_CHAR message is the scan code of the key that 
  3861. was pressed.  The scan code represents the value that the keyboard hardware 
  3862. generates when the user presses a key.  An application can use the scan code to 
  3863. identify the physical key pressed, as opposed to the character code represented 
  3864. by the same key. 
  3865.  
  3866.  
  3867. ΓòÉΓòÉΓòÉ 5.1.4.7. Accelerator-Table Entries ΓòÉΓòÉΓòÉ
  3868.  
  3869. The system checks all incoming keyboard messages to see whether they match any 
  3870. existing accelerator-table entries (in either the system message queue or the 
  3871. application message queue).  The system first checks the accelerator table 
  3872. associated with the active frame window; if it does not find a match, the 
  3873. system uses the accelerator table associated with the message queues.  If the 
  3874. keyboard input event corresponds to an accelerator-table entry, the system 
  3875. changes the WM_CHAR message to a WM_COMMAND, WM_SYSCOMMAND, or WM_HELP message, 
  3876. depending on the attributes of the accelerator table.  If the keyboard input 
  3877. event does not correspond to an accelerator-table entry, the system passes the 
  3878. WM_CHAR message to the keyboard-focus window. 
  3879.  
  3880. Applications should use accelerator tables to implement keyboard shortcuts 
  3881. rather than translate command keystrokes.  For example, if an application uses 
  3882. the F2 key to save a document, the application should create a keyboard 
  3883. accelerator entry for the F2 virtual key so that, when pressed, the F2 key 
  3884. generates a WM_COMMAND message rather than a WM_CHAR message. 
  3885.  
  3886.  
  3887. ΓòÉΓòÉΓòÉ 5.1.5. Mouse Messages ΓòÉΓòÉΓòÉ
  3888.  
  3889. Mouse messages occur when a user presses or releases one of the mouse buttons 
  3890. (a click) and when the mouse moves.  All mouse messages contain the x and y 
  3891. coordinates of the mouse-pointer hot spot (relative to the coordinates of the 
  3892. window receiving the message) at the time the event occurs.  The mouse-pointer 
  3893. hot spot is the location in the mouse-pointer bit map that the system tracks 
  3894. and recognizes as the position of the mouse pointer. 
  3895.  
  3896. If a window has the CS_HITTEST style, the system sends the window a WM_HITTEST 
  3897. message when the window is about to receive a mouse message.  Most applications 
  3898. pass WM_HITTEST messages on to WinDefWindowProc by default, so disabled windows 
  3899. do not receive mouse messages.  Windows that specifically respond to WM_HITTEST 
  3900. messages can change this default behavior.  If the window is enabled and should 
  3901. receive the mouse message, the WinDefWindowProc function (using the default 
  3902. processing for WM_HITTEST) returns the value HT_NORMAL.  If the window is 
  3903. disabled, WinDefWindowProc returns HT_ERROR, in which case the window does not 
  3904. receive the mouse message. 
  3905.  
  3906. The default window procedure processes the WM_HITTEST message and the usHit 
  3907. parameter in the WM_MOUSEMOVE message.  Therefore, unless an application needs 
  3908. to return special values for the WM_HITTEST message or the usHit parameter, it 
  3909. can ignore them.  One possible reason for processing the WM_HITTEST message is 
  3910. for the application to react differently to a mouse click in a disabled window. 
  3911.  
  3912. The contents of the mouse-message parameters (mp1 and mp2) are as follows: 
  3913.  
  3914. o SHORT1FROMMP (mp1) contains the x position. 
  3915. o SHORT2FROMMP (mp1) contains the y position. 
  3916. o SHORT1FROMMP (mp2) contains the hit-test parameter. 
  3917.  
  3918.  
  3919. ΓòÉΓòÉΓòÉ 5.1.6. Capturing Mouse Input ΓòÉΓòÉΓòÉ
  3920.  
  3921. The operating system generally posts mouse messages to the window that is under 
  3922. the mouse pointer at the time the system reads the mouse input events from the 
  3923. system message queue.  An application can change this by using the 
  3924. WinSetCapture function to route all mouse messages to a specific window or to 
  3925. the message queue associated with the current thread.  If mouse messages are 
  3926. routed to a specific window, that window receives all mouse input until either 
  3927. the window releases the mouse or the application specifies another capture 
  3928. window.  If mouse messages are routed to the current message queue, the system 
  3929. posts each mouse message to the queue with the hwnd member of the QMSG 
  3930. structure for each message set to NULL.  Because no window handle is specified, 
  3931. the WinDispatchMsg function in the application's main message loop cannot pass 
  3932. these messages to a window procedure for processing.  Therefore, the 
  3933. application must process these messages in the main loop. 
  3934.  
  3935. Capturing mouse input is useful if a window needs to receive all mouse input, 
  3936. even when the pointer moves outside the window.  For example, applications 
  3937. commonly track the mouse-pointer position after a mouse "button down" event, 
  3938. following the pointer until a "button up" event is received from the system. 
  3939. If an application does not call WinSetCapture for a window and the user 
  3940. releases the mouse button, the application does not receive the button-up 
  3941. message.  If the application sets a window to capture the mouse and tracks the 
  3942. mouse pointer, the application receives the button-up message even if the user 
  3943. moves the mouse pointer outside the window. 
  3944.  
  3945. Some applications are designed to require a button-up message to match a 
  3946. button-down message.  When processing a button-down message, these applications 
  3947. call WinSetCapture to set the capture to their own window; then, when 
  3948. processing a matching button-up message, they call WinSetCapture, with a NULL 
  3949. window handle, to release the mouse. 
  3950.  
  3951.  
  3952. ΓòÉΓòÉΓòÉ 5.1.6.1. Button Clicks ΓòÉΓòÉΓòÉ
  3953.  
  3954. An application window's response to a mouse click depends on whether the window 
  3955. is active.  The first click in an inactive window should activate the window. 
  3956. Subsequent clicks in the active window produce an application-specific action. 
  3957.  
  3958. A common problem for an application that processes WM_BUTTON1DOWN or similar 
  3959. messages is failing to activate the window or set the keyboard focus.  If the 
  3960. window processes WM_CHAR messages, the window procedure should call WinSetFocus 
  3961. to make sure the window receives the keyboard focus and is activated.  If the 
  3962. window does not process WM_CHAR messages, the application should call 
  3963. WinSetActiveWindow to activate the window. 
  3964.  
  3965.  
  3966. ΓòÉΓòÉΓòÉ 5.1.6.2. Mouse Movement ΓòÉΓòÉΓòÉ
  3967.  
  3968. The system sends WM_MOUSEMOVE messages to the window that is under the mouse 
  3969. pointer, or to the window that currently has captured the mouse, whenever the 
  3970. mouse pointer moves.  This is useful for tracking the mouse pointer and 
  3971. changing its shape, based on its location in a window.  For example, the mouse 
  3972. pointer changes shape when it passes over the size border of a standard frame 
  3973. window. 
  3974.  
  3975. All standard control windows use WM_MOUSEMOVE messages to set the mouse-pointer 
  3976. shape.  If an application handles WM_MOUSEMOVE messages in some situations but 
  3977. not others, unused messages should be passed to the WinDefWindowProc function 
  3978. to change the mouse-pointer shape. 
  3979.  
  3980.  
  3981. ΓòÉΓòÉΓòÉ 5.2. Using the Mouse and Keyboard ΓòÉΓòÉΓòÉ
  3982.  
  3983. This section explains how to perform the following tasks: 
  3984.  
  3985. o Determine the active status of a frame window. 
  3986. o Check for a key-up or key-down event. 
  3987. o Respond to a character message. 
  3988. o Handle virtual-key codes. 
  3989. o Handle a scan code. 
  3990.  
  3991.  
  3992. ΓòÉΓòÉΓòÉ 5.2.1. Determining the Active Status of a Frame Window ΓòÉΓòÉΓòÉ
  3993.  
  3994. The activated state of a window is a frame-window characteristic.  The system 
  3995. does not provide an easy way to determine whether a client window is part of 
  3996. the active frame window.  That is, the window handle returned by the 
  3997. WinQueryActiveWindow function identifies the active frame window rather than 
  3998. the client window owned by the frame window. 
  3999.  
  4000. Following are two methods for determining the activated state of a frame window 
  4001. that owns a particular client window: 
  4002.  
  4003. o Call WinQueryActiveWindow and compare the window handle it returns with the 
  4004.   handle of the frame window that contains the client window, as shown in the 
  4005.   following code fragment: 
  4006.  
  4007.         HWND hwndClient;
  4008.         BOOL fActivated;
  4009.  
  4010.         fActivated = (WinQueryWindow(hwndClient, QW_PARENT) ==
  4011.                       WinQueryActiveWindow(HWND_DESKTOP));
  4012.  
  4013. o Each time the frame window is activated, the client window receives a 
  4014.   WM_ACTIVATE message with the low word of the mp2 equal to TRUE.  When the 
  4015.   frame window is deactivated, the client window receives a WM_ACTIVATE message 
  4016.   with a FALSE activation indicator. 
  4017.  
  4018.  
  4019. ΓòÉΓòÉΓòÉ 5.2.2. Checking for a Key-Up or Key-Down Event ΓòÉΓòÉΓòÉ
  4020.  
  4021. The following code fragment shows how to decode a WM_CHAR message to determine 
  4022. whether it indicates a key-up event or a key-down event: 
  4023.  
  4024.     USHORT fsKeyFlags;
  4025.  
  4026.     case WM_CHAR:  {
  4027.     USHORT fsKeyFlags = SHORT1FROMMP(mp1);
  4028.  
  4029.     if (fsKeyFlags & KC_KEYUP) {
  4030.          .
  4031.          . /* Perform key-up processing.   */
  4032.          .
  4033.  
  4034.     } else {
  4035.          .
  4036.          . /* Perform key-down processing. */
  4037.          .
  4038.     }
  4039.  
  4040.     return;
  4041.  
  4042.     }
  4043.  
  4044.  
  4045. ΓòÉΓòÉΓòÉ 5.2.3. Responding to a Character Message ΓòÉΓòÉΓòÉ
  4046.  
  4047. The following code fragment shows how to respond to a character message: 
  4048.  
  4049.     USHORT fsKeyFlags;
  4050.     UCHAR  uchChr1;
  4051.  
  4052.     case WM_CHAR:
  4053.     fsKeyFlags = (USHORT) SHORT1FROMMP(mp1);
  4054.  
  4055.     if (fsKeyFlags & KC_CHAR) {
  4056.  
  4057.         /* Get the character code from mp2. */
  4058.         uchChr1 = (UCHAR) CHAR1FROMMP(mp2);
  4059.         .
  4060.         . /* Process the character.         */
  4061.         .
  4062.  
  4063.         return TRUE;
  4064.     }
  4065.  
  4066. If the KC_CHAR flag is not set, the mp2 parameter from CHAR1FROMMP still might 
  4067. contain useful information.  If either the Alt key or the Ctrl key, or both, 
  4068. are down, the KC_CHAR bit is not set when the user presses another key.  For 
  4069. example, if the user presses the a key when the Alt key is down, the low word 
  4070. of mp2 contains the ASCII value for "a" (0x0061), the KC_ALT flag is set, and 
  4071. the KC_CHAR flag is clear.  If the translation does not generate any valid 
  4072. characters, the char field is set to 0. 
  4073.  
  4074.  
  4075. ΓòÉΓòÉΓòÉ 5.2.4. Handling Virtual-Key Codes ΓòÉΓòÉΓòÉ
  4076.  
  4077. The following code fragment shows how to decode a WM_CHAR message containing a 
  4078. valid virtual-key code: 
  4079.  
  4080.     USHORT fsKeyFlags;
  4081.  
  4082.     case WM_CHAR:
  4083.     fsKeyFlags = (USHORT) SHORT1FROMMP(mp1);
  4084.  
  4085.     if (fsKeyFlags & KC_VIRTUALKEY) {
  4086.  
  4087.         /* Get the virtual key from mp2.       */
  4088.         switch (SHORT2FROMMP(mp2)) {
  4089.          case VK_TAB:
  4090.              .
  4091.              . /* Process the TAB key.         */
  4092.              .
  4093.              return TRUE;
  4094.          case VK_LEFT:
  4095.              .
  4096.              . /* Process the LEFT key.        */
  4097.              .
  4098.              return TRUE;
  4099.          case VK_UP:
  4100.              .
  4101.              . /* Process the UP key.          */
  4102.              .
  4103.              return TRUE;
  4104.          case VK_RIGHT:
  4105.              .
  4106.              . /* Process the RIGHT key.       */
  4107.              .
  4108.              return TRUE;
  4109.          case VK_DOWN:
  4110.              .
  4111.              . /* Process the DOWN key.        */
  4112.              .
  4113.              return TRUE;
  4114.            .
  4115.            . /* Etc...                         */
  4116.            .
  4117.            default:
  4118.                return FALSE;
  4119.            }
  4120.        }
  4121.  
  4122.  
  4123. ΓòÉΓòÉΓòÉ 5.2.5. Handling a Scan Code ΓòÉΓòÉΓòÉ
  4124.  
  4125. All WM_CHAR messages generated by keyboard input events have valid scan codes. 
  4126. WM_CHAR messages posted by other applications might or might not have valid 
  4127. scan codes.  The following code fragment shows how to extract a scan code from 
  4128. a WM_CHAR message: 
  4129.  
  4130.     USHORT fsKeyFlags;
  4131.     UCHAR  uchScanCode;
  4132.  
  4133.     case WM_CHAR:
  4134.     fsKeyFlags = (USHORT) SHORT1FROMMP(mp1);
  4135.  
  4136.     if (fsKeyFlags & KC_SCANCODE) {
  4137.  
  4138.         /* Get the scan code from mp1.   */
  4139.         uchScanCode = CHAR4FROMMP(mp1);
  4140.         .
  4141.         . /* Process the scan code.      */
  4142.         .
  4143.  
  4144.         return (MRESULT) TRUE;
  4145.        }
  4146.  
  4147.  
  4148. ΓòÉΓòÉΓòÉ 5.3. Summary ΓòÉΓòÉΓòÉ
  4149.  
  4150. Following are the OS/2 functions and messages used with activation and 
  4151. keyboard/mouse input. 
  4152.  
  4153. Mouse/Keyboard Functions 
  4154.  
  4155. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4156. ΓöéFunction Name                 ΓöéDescription                   Γöé
  4157. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4158. ΓöéWinEnablePhysInput            ΓöéEnables or disables queuing ofΓöé
  4159. Γöé                              Γöéphysical input.               Γöé
  4160. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4161. ΓöéWinFocusChange                ΓöéChanges the focus window.     Γöé
  4162. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4163. ΓöéWinGetKeyState                ΓöéReturns the state of the key  Γöé
  4164. Γöé                              Γöéat the time the last message  Γöé
  4165. Γöé                              Γöéfrom the message queue was    Γöé
  4166. Γöé                              Γöéposted.                       Γöé
  4167. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4168. ΓöéWinGetPhysKeyState            ΓöéReturns the physical key      Γöé
  4169. Γöé                              Γöéstate.                        Γöé
  4170. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4171. ΓöéWinIsPhysInputEnabled         ΓöéReturns the status of the     Γöé
  4172. Γöé                              Γöéhardware (on/off)             Γöé
  4173. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4174. ΓöéWinQueryActiveWindow          ΓöéReturns the active window for Γöé
  4175. Γöé                              ΓöéHWND_DESKTOP or other parent  Γöé
  4176. Γöé                              Γöéwindow.                       Γöé
  4177. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4178. ΓöéWinQueryCapture               ΓöéReturns the handle of the     Γöé
  4179. Γöé                              Γöéwindow the pointer has        Γöé
  4180. Γöé                              Γöécaptured.                     Γöé
  4181. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4182. ΓöéWinQueryFocus                 ΓöéReturns the focus window; NULLΓöé
  4183. Γöé                              Γöéif there is not focus window. Γöé
  4184. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4185. ΓöéWinSetActiveWindow            ΓöéMakes the frame window the    Γöé
  4186. Γöé                              Γöéactive window.                Γöé
  4187. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4188. ΓöéWinSetCapture                 ΓöéCaptures all pointing device  Γöé
  4189. Γöé                              Γöémessages.                     Γöé
  4190. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4191. ΓöéWinSetFocus                   ΓöéSets the focus window.        Γöé
  4192. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4193. ΓöéWinSetKeyboardStateTable      ΓöéGets or sets the keyboard     Γöé
  4194. Γöé                              Γöéstate.                        Γöé
  4195. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4196.  
  4197. Focus-Change and Activation Messages 
  4198.  
  4199. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4200. ΓöéMessage                 ΓöéDescription                         Γöé
  4201. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4202. ΓöéWM_ACTIVATE             ΓöéSent when a different window becomesΓöé
  4203. Γöé                        Γöéthe active window.                  Γöé
  4204. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4205. ΓöéWM_FOCUSCHANGE          ΓöéOccurs when the window having the   Γöé
  4206. Γöé                        Γöéfocus is changed.                   Γöé
  4207. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4208. ΓöéWM_QUERYFOCUSCHAIN      ΓöéRequests the handle of a window in  Γöé
  4209. Γöé                        Γöéthe focus chain.                    Γöé
  4210. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4211. ΓöéWM_SETFOCUS             ΓöéOccurs when a window is to lose or  Γöé
  4212. Γöé                        Γöégain the input focus.               Γöé
  4213. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4214. ΓöéWM_SETSELECTION         ΓöéOccurs when a window is selected or Γöé
  4215. Γöé                        Γöédeselected.                         Γöé
  4216. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4217.  
  4218. Mouse Messages 
  4219.  
  4220. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4221. ΓöéMessage                 ΓöéDescription                         Γöé
  4222. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4223. ΓöéWM_BUTTON1DBLCLK        ΓöéOccurs when the user presses button Γöé
  4224. Γöé                        Γöé1 of the pointing device twice.     Γöé
  4225. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4226. ΓöéWM_BUTTON1DOWN          ΓöéOccurs when the user presses pointerΓöé
  4227. Γöé                        Γöébutton 1.                           Γöé
  4228. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4229. ΓöéWM_BUTTON1UP            ΓöéOccurs when the user releases       Γöé
  4230. Γöé                        Γöépointer button 1.                   Γöé
  4231. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4232. ΓöéWM_BUTTON2DBLCLK        ΓöéOccurs when the user presses button Γöé
  4233. Γöé                        Γöé2 of the pointing device twice.     Γöé
  4234. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4235. ΓöéWM_BUTTON2DOWN          ΓöéOccurs when the user presses pointerΓöé
  4236. Γöé                        Γöébutton 2.                           Γöé
  4237. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4238. ΓöéWM_BUTTON2UP            ΓöéOccurs when the user releases       Γöé
  4239. Γöé                        Γöépointer button 2.                   Γöé
  4240. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4241. ΓöéWM_BUTTON3DBLCLK        ΓöéOccurs when the user presses button Γöé
  4242. Γöé                        Γöé3 on the pointing device twice.     Γöé
  4243. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4244. ΓöéWM_BUTTON3DOWN          ΓöéOccurs when the user presses pointerΓöé
  4245. Γöé                        Γöébutton 3.                           Γöé
  4246. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4247. ΓöéWM_BUTTON3UP            ΓöéOccurs when the user releases       Γöé
  4248. Γöé                        Γöépointer button 3.                   Γöé
  4249. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4250. ΓöéWM_HITTEST              ΓöéSent to determine which window is   Γöé
  4251. Γöé                        Γöéassociated with an input from the   Γöé
  4252. Γöé                        Γöépointing device.                    Γöé
  4253. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4254. ΓöéWM_MOUSEMOVE            ΓöéOccurs when the pointing device     Γöé
  4255. Γöé                        Γöépointer moves.                      Γöé
  4256. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4257.  
  4258. Keyboard Messages 
  4259.  
  4260. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4261. ΓöéMessage                 ΓöéDescription                         Γöé
  4262. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4263. ΓöéWM_CHAR                 ΓöéOccurs when the user presses a key. Γöé
  4264. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4265. ΓöéWM_COMMAND              ΓöéOccurs when a control has a         Γöé
  4266. Γöé                        Γöésignificant event to notify to its  Γöé
  4267. Γöé                        Γöéowner, or when a keystroke has been Γöé
  4268. Γöé                        Γöétranslated by an accelerator table  Γöé
  4269. Γöé                        Γöéinto WM_COMMAND.                    Γöé
  4270. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4271.  
  4272.  
  4273. ΓòÉΓòÉΓòÉ 6. Frame Windows ΓòÉΓòÉΓòÉ
  4274.  
  4275. A frame window is the basic window used by most Presentation Manager 
  4276. applications to enable the user to perform manipulation functions.  This 
  4277. chapter explains how to create and use frame windows in PM applications. 
  4278.  
  4279.  
  4280. ΓòÉΓòÉΓòÉ 6.1. About Frame Windows ΓòÉΓòÉΓòÉ
  4281.  
  4282. An application nearly always starts with a frame window to create a composite 
  4283. window (for example, a main window) that consists of the frame window, several 
  4284. frame-control windows, and a client window.  The frame controls conform to the 
  4285. Common User Access (CUA) user interface guidlines.  The frame window 
  4286. coordinates the actions of the frame controls and client window, enabling the 
  4287. composite window to act as a single unit. 
  4288.  
  4289. Frame windows have the preregistered public window class WC_FRAME.  The 
  4290. frame-window class, like the preregistered control classes, defines the 
  4291. appearance and behavior of the frame window. 
  4292.  
  4293.  
  4294. ΓòÉΓòÉΓòÉ 6.1.1. Main Window ΓòÉΓòÉΓòÉ
  4295.  
  4296. The main window of an application, typically, is composed of a frame window and 
  4297. a client window.  The frame window usually includes control windows such as a 
  4298. title bar, system menu, menu bar (action bar or menu in user terminology), and 
  4299. scroll bars. The following figure is an example of a typical frame window. 
  4300.  
  4301. Typical Frame Window and Its Components 
  4302.  
  4303. A frame window provides the standard services the user expects from a 
  4304. window-for example, moving, sizing, minimizing, and maximizing.  The frame 
  4305. window receives input from the control windows (called frame controls) and 
  4306. sends messages to both the frame controls and the client window. 
  4307.  
  4308.  
  4309. ΓòÉΓòÉΓòÉ 6.1.1.1. Frame Controls ΓòÉΓòÉΓòÉ
  4310.  
  4311. When creating a frame window, an application also can create one or more frame 
  4312. controls as child windows of the frame window.  Most frame windows contain at 
  4313. least a system menu and title bar.  Other optional controls might include a 
  4314. menu bar and scroll bar as shown above. 
  4315.  
  4316. An application can create a frame window with specified frame controls by 
  4317. calling WinCreateStdWindow with the appropriate frame-control flags. 
  4318.  
  4319. The frame window owns the child frame-control windows, which can send 
  4320. notification messages that tell the frame window what the user is doing with 
  4321. the frame controls.  For example, using a mouse, a user can move a window by 
  4322. clicking the title bar and dragging the window to a new position.  The 
  4323. title-bar control responds to the click by sending a message to the frame 
  4324. window, notifying it of the user's request to move the window.  Then the frame 
  4325. window tracks the mouse motion and moves the frame window and all of its child 
  4326. windows to the new position. 
  4327.  
  4328. PM, rather than the application, handles the processing of the frame controls, 
  4329. thus providing the user a consistent interface for manipulating and interacting 
  4330. with windowed applications on the screen.  Frame controls are described in 
  4331. individual chapters.  For more information about control windows, see Control 
  4332. Windows. 
  4333.  
  4334.  
  4335. ΓòÉΓòÉΓòÉ 6.1.1.2. Client Window ΓòÉΓòÉΓòÉ
  4336.  
  4337. Every main window has a client window, which is the window in which the 
  4338. application displays output and receives mouse and keyboard input from the 
  4339. user.  What an application displays in the client window, how it displays it, 
  4340. and how it interprets input to the window are controlled by the client's 
  4341. application-defined window procedure. 
  4342.  
  4343. An application creates the client window when it creates the frame window.  The 
  4344. client window, which is specific to the application, is nearly always created 
  4345. using a private window class (a class registered by the application).  Like a 
  4346. frame control, the client window is a child window and is owned by the frame 
  4347. window.  This means, for example, that the client window is moved when the 
  4348. frame window moves, is clipped to the frame-window size, and is destroyed when 
  4349. the frame window is destroyed. 
  4350.  
  4351. The relationship between the frame window and the client window allows the 
  4352. frame window to pass messages between other frame controls and the client 
  4353. window.  For example, a client window can send a message to the frame window 
  4354. requesting that the frame window change the window title.  The frame window, in 
  4355. turn, sends a message to the title-bar control, telling it to change the title 
  4356. of the window. 
  4357.  
  4358.  
  4359. ΓòÉΓòÉΓòÉ 6.1.1.3. Additional Frame-Window Items ΓòÉΓòÉΓòÉ
  4360.  
  4361. In addition to its frame controls, a frame window also can contain a sizing 
  4362. border and the minimize and maximize buttons (also known as maximize and 
  4363. minimize icons).  These items are not frame controls, because the frame window 
  4364. draws and maintains them.  (Frame controls are windows that draw and maintain 
  4365. themselves.) 
  4366.  
  4367. The sizing border encloses the frame window and lets the user change the size 
  4368. of the window using a mouse.  The minimize button, at the right end of the 
  4369. title bar, lets the user reduce the frame window to an icon.  The maximize 
  4370. button, to the right of the minimize button, lets the user enlarge the window 
  4371. so that it fills the screen. 
  4372.  
  4373. An application can add these items to a frame window by using the 
  4374. FCF_SIZEBORDER, FCF_MAXBUTTON, and FCF_MINBUTTON (or FCF_MINMAX) styles.  (The 
  4375. FCF_MINMAX style adds both a maximize button and a minimize button.) 
  4376.  
  4377.  
  4378. ΓòÉΓòÉΓòÉ 6.1.1.4. Frame-Control Identifiers ΓòÉΓòÉΓòÉ
  4379.  
  4380. A frame window uses a set of standard constants to identify the frame controls 
  4381. and the client window.  The frame-control identifiers all begin with the prefix 
  4382. FID_ and can be used in functions such as WinWindowFromID to uniquely identify 
  4383. a given control or the client window.  The frame controls also use these 
  4384. identifiers in notification messages sent to the frame window.  The following 
  4385. table describes the frame-control identifiers: 
  4386.  
  4387. Frame-Control Identifiers 
  4388.  
  4389. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4390. ΓöéIdentifier              ΓöéDescription                         Γöé
  4391. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4392. ΓöéFID_CLIENT              ΓöéIdentifies a client window.         Γöé
  4393. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4394. ΓöéFID_HORZSCROLL          ΓöéIdentifies a horizontal scroll bar. Γöé
  4395. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4396. ΓöéFID_MENU                ΓöéIdentifies a menu.                  Γöé
  4397. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4398. ΓöéFID_MINMAX              ΓöéIdentifies the minimize and maximizeΓöé
  4399. Γöé                        Γöé(window-sizing) buttons.            Γöé
  4400. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4401. ΓöéFID_SYSMENU             ΓöéIdentifies a system menu.           Γöé
  4402. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4403. ΓöéFID_TITLEBAR            ΓöéIdentifies a title bar.             Γöé
  4404. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4405. ΓöéFID_VERTSCROLL          ΓöéIdentifies a vertical scroll bar.   Γöé
  4406. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4407.  
  4408.  
  4409. ΓòÉΓòÉΓòÉ 6.1.2. Frame-Window Creation ΓòÉΓòÉΓòÉ
  4410.  
  4411. An application typically creates a frame window by using the WinCreateStdWindow 
  4412. function, which creates a frame window, a client window, and the specified 
  4413. frame controls.  The application also can call WinCreateWindow with the 
  4414. WC_FRAME window class, which creates the frame window and controls but not the 
  4415. client window.  To create the client, the application can call WinCreateWindow, 
  4416. specifying the original frame window as the parent and owner. 
  4417.  
  4418. An application also can use a frame window to create a dialog window.  For a 
  4419. dialog window, the frame window contains control windows but no client window. 
  4420. The application creates the dialog window by using the WinLoadDlg or 
  4421. WinCreateDlg functions.  These functions require an appropriate dialog template 
  4422. from the application's resource-definition file.  The dialog template specifies 
  4423. the styles and dimensions for the frame window and for the control windows that 
  4424. compose the dialog window. 
  4425.  
  4426.  
  4427. ΓòÉΓòÉΓòÉ 6.1.2.1. Frame Window Controls and Styles ΓòÉΓòÉΓòÉ
  4428.  
  4429. An application uses frame-control flags in the WinCreateStdWindow function to 
  4430. specify which frame controls to give to the frame window.  Frame-control flags 
  4431. are constants that have the FCF_ prefix. 
  4432.  
  4433. The frame-window class (WC_FRAME), like other public window classes, provides 
  4434. many class-specific window styles that applications can use to adapt the 
  4435. appearance and behavior of a frame window.  To specify the frame-window styles, 
  4436. an application can use either frame-control flags or the frame-window style 
  4437. constants, which have the FS_ prefix.  Each style constant has a corresponding 
  4438. frame-control flag.  Both produce exactly the same styles in a frame window. 
  4439. Typically, if an application is creating a frame window that uses frame 
  4440. controls, the application uses frame-control flags to specify the frame-window 
  4441. styles-if not, the application uses frame-style constants.  An application can 
  4442. combine the frame-style constants with the standard window styles when creating 
  4443. a frame window. 
  4444.  
  4445. When an application calls WinCreateStdWindow without setting any frame-control 
  4446. flags, the function creates a standard window that is invisible and behind all 
  4447. its sibling windows, that has a width and height of 0, and that is positioned 
  4448. at the lower-left corner of its parent window.  After the call to 
  4449. WinCreateStdWindow returns, the application can use the WinSetWindowPos 
  4450. function to change the window's size, coordinates, z-order position, and 
  4451. visibility. 
  4452.  
  4453. If an application calls WinCreateStdWindow with the FCF_SHELLPOSITION 
  4454. frame-control flag, the function creates the window so that it is in front of 
  4455. its sibling windows and has a standard size and coordinates determined by the 
  4456. system. 
  4457.  
  4458.  
  4459. ΓòÉΓòÉΓòÉ 6.1.2.2. Frame-Window Resources ΓòÉΓòÉΓòÉ
  4460.  
  4461. If an application specifies FCF_ACCELTABLE, FCF_ICON, FCF_MENU, FCF_STANDARD, 
  4462. FS_ACCELTABLE, FS_ICON, or FS_STANDARD when creating a frame window, the 
  4463. application must provide the resources to support the specified style.  Failure 
  4464. to do so causes the window creation to fail.  Depending on the style, a frame 
  4465. window might attempt to load one or more resources from the application's 
  4466. executable files. 
  4467.  
  4468. The following table shows the frame-control flags and frame-window styles that 
  4469. require resources: 
  4470.  
  4471. Frame Window Flags and Styles Requiring Resources 
  4472.  
  4473. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4474. ΓöéFlag                ΓöéStyle               ΓöéDescription         Γöé
  4475. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4476. ΓöéFCF_ACCELTABLE      ΓöéFS_ACCELTABLE       ΓöéRequires an         Γöé
  4477. Γöé                    Γöé                    Γöéaccelerator-table   Γöé
  4478. Γöé                    Γöé                    Γöéresource. The frame Γöé
  4479. Γöé                    Γöé                    Γöéwindow uses the     Γöé
  4480. Γöé                    Γöé                    Γöéaccelerator table toΓöé
  4481. Γöé                    Γöé                    Γöétranslate WM_CHAR   Γöé
  4482. Γöé                    Γöé                    Γöémessages to         Γöé
  4483. Γöé                    Γöé                    ΓöéWM_COMMAND, WM_HELP,Γöé
  4484. Γöé                    Γöé                    Γöéor WM_SYSCOMMAND    Γöé
  4485. Γöé                    Γöé                    Γöémessages.           Γöé
  4486. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4487. ΓöéFCF_ICON            ΓöéFS_ICON             ΓöéRequires an icon    Γöé
  4488. Γöé                    Γöé                    Γöéresource. The frame Γöé
  4489. Γöé                    Γöé                    Γöéwindow draws the    Γöé
  4490. Γöé                    Γöé                    Γöéicon when the user  Γöé
  4491. Γöé                    Γöé                    Γöéminimizes the       Γöé
  4492. Γöé                    Γöé                    Γöéwindow.             Γöé
  4493. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4494. ΓöéFCF_MENU            ΓöéFS_MENU             ΓöéRequires a          Γöé
  4495. Γöé                    Γöé                    Γöémenu-template       Γöé
  4496. Γöé                    Γöé                    Γöéresource. A frame   Γöé
  4497. Γöé                    Γöé                    Γöéwindow uses the menuΓöé
  4498. Γöé                    Γöé                    Γöétemplate to create aΓöé
  4499. Γöé                    Γöé                    Γöémenu containing the Γöé
  4500. Γöé                    Γöé                    Γöécommands and menus  Γöé
  4501. Γöé                    Γöé                    Γöéspecified by the    Γöé
  4502. Γöé                    Γöé                    Γöéresource.           Γöé
  4503. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4504. ΓöéFCF_STANDARD        ΓöéFS_STANDARD         ΓöéRequires a          Γöé
  4505. Γöé                    Γöé                    Γöémenu-template       Γöé
  4506. Γöé                    Γöé                    Γöéresource            Γöé
  4507. Γöé                    Γöé                    Γöé(FCF_STANDARD only),Γöé
  4508. Γöé                    Γöé                    Γöéan accelerator-tableΓöé
  4509. Γöé                    Γöé                    Γöéresource, and an    Γöé
  4510. Γöé                    Γöé                    Γöéicon resource.      Γöé
  4511. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4512.  
  4513. You can use the resource compiler to add icon, menu, and accelerator-table 
  4514. resources to the application's executable file.  Each resource must have a 
  4515. resource identifier that matches the resource identifier specified in the 
  4516. FRAMECDATA structure passed to the WinCreateWindow function, or in the 
  4517. idResources parameter of the WinCreateStdWindow function. 
  4518.  
  4519. Note:  For detailed information about icon, menu, and accelerator-table 
  4520.        resources, see Mouse Pointers and Icons, Menus, and Keyboard 
  4521.        Accelerators respectively. 
  4522.  
  4523. The following sample code illustrates how to use WinCreateStdWindow to load and 
  4524. set up certain resources for a frame window.  Normally the first step is to set 
  4525. up a header file defining the the IDs of the applicable resources: 
  4526.  
  4527.  
  4528. #define ID_RESOURCE 001
  4529.  
  4530. #define IDM_OPTIONS  50
  4531. #define IDM_SHIFT    51
  4532. #define IDM_EXIT     52
  4533.  
  4534.  
  4535. Defining Resources for Header File 
  4536.  
  4537. Then, make a resource (.RC) file, defining each resource: 
  4538.  
  4539.  
  4540. /* Sample Resource */
  4541.  
  4542. #include <os2.h>
  4543.  
  4544. POINTER ID_RESOURCE  sampres.ico             /* Icon              */
  4545.  
  4546. ACCELTABLE ID_RESOURCE
  4547. BEGIN                                        /* Accelerator table */
  4548.      VK_F10,   IDM_SHIFT,   VIRTUALKEY
  4549.      VK_F3 ,   IDM_EXIT,    VIRTUALKEY
  4550. END
  4551.  
  4552. MENU ID_RESOURCE                             /* Menu              */
  4553. BEGIN
  4554.      SUBMENU "~Options", IDM_OPTIONS
  4555.       BEGIN
  4556.          MENUITEM "~Shift Colors\tF10", IDM_SHIFT
  4557.          MENUITEM "~Exit\tF3",          IDM_EXIT
  4558.       END
  4559. END
  4560.  
  4561.  
  4562. Defining Resources for Resource (.RC) File 
  4563.  
  4564. When using WinCreateStdWindow with more than one resource, each resource can 
  4565. have the same ID, as in the above example (ID_RESOURCE or 1), but only if each 
  4566. resource is of a different type.  Resources of the same type must have unique 
  4567. IDs. 
  4568.  
  4569. Use FCF flags to indicate what resources to load: 
  4570.  
  4571.  
  4572.     ULONG flFrameFlags=
  4573.                         FCF_TITLEBAR      |  /*  Title bar              */
  4574.                         FCF_SIZEBORDER    |  /*  Size border            */
  4575.                         FCF_MINMAX        |  /*  Min & Max buttons      */
  4576.                         FCF_SYSMENU       |  /*  System menu            */
  4577.                         FCF_SHELLPOSITION |  /*  System size & position */
  4578.                         FCF_TASKLIST      |  /*  Add name to task list  */
  4579.                         FCF_ICON          |  /***Add icon               */
  4580.                         FCF_ACCELTABLE    |  /***Add accel. table       */
  4581.                         FCF_MENU          ;  /***Add menu               */
  4582.  
  4583.  
  4584. Using FCF Flags to Indicate What Resources to Load 
  4585.  
  4586. Use 0 (or NULL) in the seventh parameter of WinCreateStdWindow to indicate that 
  4587. the resource is stored in the application file, as follows: 
  4588.  
  4589.  
  4590.     hwndFrame = WinCreateStdWindow(
  4591.         HWND_DESKTOP,      /* Parent is desktop window.           */
  4592.         WS_VISIBLE,        /* Make frame window visible.          */
  4593.         &flFrameFlags,     /* Frame controls                      */
  4594.         "ResSamClient",    /* Window class for client             */
  4595.         NULL,              /* No window title                     */
  4596.         WS_VISIBLE,        /* Make client window visible .        */
  4597.         (HMODULE) 0,       /* Resources in application module     */
  4598.         ID_RESOURCE,       /* Resource identifier                 */
  4599.         NULL);             /* Pointer to client window handle     */
  4600.  
  4601.  
  4602. Indicating that a Resource is Stored in the Application File 
  4603.  
  4604. Following is the full listing of the sample program: 
  4605.  
  4606.  
  4607. SampleProgramforLoadingResourcesinaFrameWindow
  4608.  
  4609.  
  4610. #define INCL_PM
  4611. #include <os2.h>
  4612.  
  4613. MRESULT EXPENTRY ClientWndProc(HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2);
  4614.  
  4615. int main(int argc, char *argv, char *envp)
  4616. {
  4617.     HWND hwndFrame;
  4618.     HWND hwndClient;
  4619.     HMQ  hmq;
  4620.     QMSG qmsg;
  4621.     HAB  hab;
  4622.  
  4623.     ULONG flFrameFlags=
  4624.                         FCF_TITLEBAR      |  /*  Title bar              */
  4625.                         FCF_SIZEBORDER    |  /*  Size Border            */
  4626.                         FCF_MINMAX        |  /*  Min & Max Buttons      */
  4627.                         FCF_SYSMENU       |  /*  System Menu            */
  4628.                         FCF_SHELLPOSITION |  /*  System size & position */
  4629.                         FCF_TASKLIST      |  /*  Add name to task list. */
  4630.                         FCF_ICON          |  /***Add icon.              */
  4631.                         FCF_ACCELTABLE    |  /***Add accelerator table. */
  4632.                         FCF_MENU;            /***Add menu.              */
  4633.  
  4634.     hab = WinInitialize(0);
  4635.  
  4636.     hmq = WinCreateMsgQueue(hab, 0);
  4637.  
  4638.     WinRegisterClass(
  4639.         hab,                    /* Anchor block handle            */
  4640.         "ResSamClient",         /* Name of class being registered */
  4641.         (PFNWP)ClientWndProc,   /* Window procedure for class     */
  4642.         CS_SIZEREDRAW |         /* Class style                    */
  4643.         CS_HITTEST,             /* Class style                    */
  4644.         0);                     /* Extra bytes to reserve         */
  4645.  
  4646.     hwndFrame = WinCreateStdWindow(
  4647.         HWND_DESKTOP,      /* Parent is desktop window.           */
  4648.         WS_VISIBLE,        /* Make frame window visible.          */
  4649.         &flFrameFlags,     /* Frame controls                      */
  4650.         "ResSamClient",    /* Window class for client             */
  4651.         NULL,              /* No window title                     */
  4652.         WS_VISIBLE,        /* Make client window visible .        */
  4653.         (HMODULE) 0,       /* Resources in application module     */
  4654.         ID_RESOURCE,       /* Resource identifier                 */
  4655.         NULL);             /* Pointer to client window handle     */
  4656.  
  4657.  
  4658.     while (WinGetMsg(hab, &qmsg, 0, 0, 0))
  4659.            WinDispatchMsg(hab, &qmsg);
  4660.  
  4661.     WinDestroyWindow(hwndFrame);
  4662.     WinDestroyMsgQueue(hmq);
  4663.     WinTerminate(hab);
  4664.  
  4665.     return 0;
  4666. }
  4667.  
  4668. MRESULT EXPENTRY ClientWndProc(HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2)
  4669. {
  4670.     RECTL rcl;
  4671.     HPS   hps;
  4672.     static LONG  lColor=CLR_RED;
  4673.     switch (msg) {
  4674.  
  4675.         case WM_PAINT:
  4676.               hps=WinBeginPaint(hwnd,(HPS) NULL, &rcl);     /* Get hps           */
  4677.               WinFillRect(hps,&rcl,lColor);                 /* Fill the window   */
  4678.               WinEndPaint(hps);                             /* Free hps          */
  4679.         return 0;
  4680.  
  4681.         case WM_COMMAND:
  4682.  
  4683.              switch (SHORT1FROMMP(mp1)) {
  4684.              case IDM_SHIFT:                                /* Shift selected    */
  4685.                 if (lColor==CLR_RED) lColor=CLR_BLUE;       /* Change the        */
  4686.                 else lColor=CLR_RED;                        /* color             */
  4687.                 WinInvalidateRect(hwnd,(PRECTL)NULL,0UL);   /* Paint Window      */
  4688.                 return 0;
  4689.              case IDM_EXIT:                                 /* Exit selected     */
  4690.                 WinPostMsg(hwnd,WM_CLOSE,MPVOID,MPVOID);    /* Exit program.     */
  4691.                 return 0;
  4692.              }
  4693.  
  4694.      }
  4695.      return WinDefWindowProc (hwnd, msg, mp1, mp2);
  4696. }
  4697.  
  4698.  
  4699. ΓòÉΓòÉΓòÉ 6.1.3. Frame-Window Class Data ΓòÉΓòÉΓòÉ
  4700.  
  4701. An application can specify class-specific data for a frame window by passing to 
  4702. the WinCreateWindow function a pointer to the FRAMECDATA structure.  The 
  4703. class-specific data contains the frame-control flags (FCF_ flags), 
  4704. resource-module handle, and resource identifier to be used when creating the 
  4705. frame window.  The resource-module handle and the resource identifier specify 
  4706. where to find resources for the frame window. 
  4707.  
  4708. Supplying class-specific data with WinCreateWindow is similar to using the 
  4709. WinCreateStdWindow function without creating a client window. 
  4710.  
  4711.  
  4712. ΓòÉΓòÉΓòÉ 6.1.4. Frame-Window Data ΓòÉΓòÉΓòÉ
  4713.  
  4714. Frame-window data specifies the state of the frame window at a given time.  An 
  4715. application can retrieve the frame-window data by calling the 
  4716. WinQueryWindowUShort function.  A frame window has the following state flags: 
  4717.  
  4718. Frame Window State Flags and Their Meanings 
  4719.  
  4720. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4721. ΓöéFlag                    ΓöéDescription                         Γöé
  4722. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4723. ΓöéFF_ACTIVE               ΓöéIndicates that the frame window is  Γöé
  4724. Γöé                        Γöéactive.                             Γöé
  4725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4726. ΓöéFF_DLGDISMISSED         ΓöéIndicates that a dialog window has  Γöé
  4727. Γöé                        Γöébeen dismissed by a call to the     Γöé
  4728. Γöé                        ΓöéWinDismissDlg function.             Γöé
  4729. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4730. ΓöéFF_FLASHHILITE          ΓöéIndicates that the frame window is  Γöé
  4731. Γöé                        Γöéflashing and its flash state is     Γöé
  4732. Γöé                        ΓöéTRUE.                               Γöé
  4733. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4734. ΓöéFF_FLASHWINDOW          ΓöéIndicates that the frame window     Γöé
  4735. Γöé                        Γöéflashes as the result of either a   Γöé
  4736. Γöé                        Γöécall to the WinFlashWindow function Γöé
  4737. Γöé                        Γöéor a WM_FLASHWINDOW message.        Γöé
  4738. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4739. ΓöéFF_NOACTIVATESWP        ΓöéIndicates that the system should do Γöé
  4740. Γöé                        Γöéno z-ordering on this frame window. Γöé
  4741. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4742. ΓöéFF_OWNERDISABLE         ΓöéFor a frame window that is part of aΓöé
  4743. Γöé                        Γöédialog window, this flag indicates  Γöé
  4744. Γöé                        Γöéwhether the owner window was enabledΓöé
  4745. Γöé                        Γöéor disabled when the dialog window  Γöé
  4746. Γöé                        Γöéwas loaded.                         Γöé
  4747. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4748. ΓöéFF_OWNERHIDDEN          ΓöéIndicates that the frame window's   Γöé
  4749. Γöé                        Γöéowner window is hidden or minimized,Γöé
  4750. Γöé                        Γöéin which case the frame window also Γöé
  4751. Γöé                        Γöéis hidden.                          Γöé
  4752. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4753. ΓöéFF_SELECTED             ΓöéIndicates that the frame window has Γöé
  4754. Γöé                        Γöébeen selected.                      Γöé
  4755. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4756. ΓöéFI_ACTIVATEOK           ΓöéIndicates that the window can be    Γöé
  4757. Γöé                        Γöéactivated.                          Γöé
  4758. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4759. ΓöéFI_FRAME                ΓöéIndicates that the window is a frameΓöé
  4760. Γöé                        Γöéwindow.                             Γöé
  4761. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4762. ΓöéFI_NOMOVEWITHOWNER      ΓöéIndicates that the window should    Γöé
  4763. Γöé                        Γöémove when its owner window moves.   Γöé
  4764. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4765. ΓöéFI_OWNERHIDE            ΓöéIndicates that the frame window     Γöé
  4766. Γöé                        Γöéshould be hidden or shown as a      Γöé
  4767. Γöé                        Γöéresult of its owner window being    Γöé
  4768. Γöé                        Γöéhidden, shown, minimized, or        Γöé
  4769. Γöé                        Γöémaximized.                          Γöé
  4770. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4771.  
  4772.  
  4773. ΓòÉΓòÉΓòÉ 6.1.5. Frame-Window Operation ΓòÉΓòÉΓòÉ
  4774.  
  4775. The frame window maintains the size, position, and visibility of itself, its 
  4776. frame controls, and its client window.  The frame window responds to user 
  4777. requests to move, size, minimize, maximize, and redraw itself.  It also 
  4778. responds to requests to close (destroy) itself and to change the focus and 
  4779. activation state. 
  4780.  
  4781. The frame window, when being moved or sized, maintains the position of each 
  4782. owned window relative to its owner window's lower-left corner. 
  4783.  
  4784. Whenever the frame window redraws itself (for example, after being moved or 
  4785. sized), it draws the frame controls and then lets the application draw the 
  4786. client window.  This order ensures that the rapidly drawn frame controls are 
  4787. drawn before the client window. 
  4788.  
  4789. The order in which the frame controls are drawn depends on the z-order position 
  4790. of the controls.  The following list specifies the z-order position of the 
  4791. frame controls (from top to bottom): 
  4792.  
  4793. FID_SYSMENU 
  4794. FID_TITLEBAR 
  4795. FID_MENU 
  4796. FID_VERTSCROLL 
  4797. FID_HORZSCROLL 
  4798. FID_CLIENT 
  4799.  
  4800. Although an application can change the z-order position of any window, changing 
  4801. the relative positions of frame controls is not recommended. 
  4802.  
  4803. When the user maximizes the frame window, the size of the frame window 
  4804. increases to the size of its parent window, plus an additional amount on each 
  4805. of its four sides equal to the width of its sizing border.  A window always is 
  4806. clipped to its parent window; a maximized standard frame window does not show 
  4807. its sizing border in its normal maximized position. 
  4808.  
  4809. Frame controls owned by a frame window or windows owned by child windows of a 
  4810. frame window are destroyed automatically when the frame window processes the 
  4811. WM_DESTROY message. 
  4812.  
  4813.  
  4814. ΓòÉΓòÉΓòÉ 6.1.6. Nonstandard Frame Windows ΓòÉΓòÉΓòÉ
  4815.  
  4816. Although most applications use frame windows to create their main windows and 
  4817. dialog windows, they are not limited to frame windows.  Applications can create 
  4818. nonstandard frame windows and still use the standard frame controls, such as 
  4819. the title bar and system menu, within the nonstandard windows. 
  4820.  
  4821. An application can create a nonstandard frame window either by subclassing a 
  4822. frame window or by creating a private frame-window class.  An application that 
  4823. subclasses a frame window can intercept the messages sent to the window and 
  4824. process them in new ways.  An application that creates private frame-window 
  4825. classes essentially rewrites the frame-window procedure.  In either case, by 
  4826. creating nonstandard frame windows, the application gains much more control 
  4827. over the arrangement of frame controls in the frame window. 
  4828.  
  4829. The messages WM_FORMATFRAME, WM_UPDATEFRAME, and WM_CALCVALIDRECTS control the 
  4830. arrangement of frame controls for applications that subclass the frame-window 
  4831. procedure.  By intercepting these messages, an application can rearrange the 
  4832. frame controls in a frame window. 
  4833.  
  4834. To maintain the size and position of frame controls, an application that 
  4835. creates private frame-window classes can use the WinCreateFrameControls and 
  4836. WinCalcFrameRect functions.  These functions provide capabilities that are 
  4837. similar to those provided by frame windows. 
  4838.  
  4839.  
  4840. ΓòÉΓòÉΓòÉ 6.1.7. Default Frame-Window Behavior ΓòÉΓòÉΓòÉ
  4841.  
  4842. The following table lists all the messages specifically handled by the window 
  4843. procedure of the predefined frame-window class (WC_FRAME) and describes how the 
  4844. window procedure responds to each message. 
  4845.  
  4846. Default Frame-Window Messages and Behavior 
  4847.  
  4848. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4849. ΓöéMessage                 ΓöéDescription                         Γöé
  4850. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4851. ΓöéWM_ACTIVATE             ΓöéSets the highlighted state of the   Γöé
  4852. Γöé                        Γöétitle bar or border so that it      Γöé
  4853. Γöé                        Γöématches the frame window's          Γöé
  4854. Γöé                        Γöéactivation state.                   Γöé
  4855. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4856. ΓöéWM_BUTTON1DOWN          ΓöéIf the frame window is minimized,   Γöé
  4857. Γöé                        Γöécaptures the mouse; otherwise,      Γöé
  4858. Γöé                        Γöéactivates the frame window.         Γöé
  4859. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4860. ΓöéWM_BUTTON2DOWN          ΓöéActivates the frame window.         Γöé
  4861. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4862. ΓöéWM_BUTTON3DOWN          ΓöéActivates the frame window.         Γöé
  4863. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4864. ΓöéWM_BUTTON1UP            ΓöéProcesses messages from minimized   Γöé
  4865. Γöé                        Γöéwindow frames.                      Γöé
  4866. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4867. ΓöéWM_BUTTON1DBLCLK        ΓöéIf the frame window is minimized,   Γöé
  4868. Γöé                        Γöéposts a WM_SYSCOMMAND message to    Γöé
  4869. Γöé                        Γöéitself; otherwise, activates the    Γöé
  4870. Γöé                        Γöéframe window.                       Γöé
  4871. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4872. ΓöéWM_CALCVALIDRECTS       ΓöéIf the frame window has no client   Γöé
  4873. Γöé                        Γöéwindow or if the client window has  Γöé
  4874. Γöé                        Γöéthe CS_SIZEREDRAW style, returns theΓöé
  4875. Γöé                        ΓöéCVR_REDRAW flag to invalidate the   Γöé
  4876. Γöé                        Γöéentire window.                      Γöé
  4877. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4878. ΓöéWM_CLOSE                ΓöéIf the frame window has a client    Γöé
  4879. Γöé                        Γöéwindow, passes this message to the  Γöé
  4880. Γöé                        Γöéclient; otherwise, returns the      Γöé
  4881. Γöé                        Γöéresult of the WinDefWindowProc      Γöé
  4882. Γöé                        Γöéfunction.                           Γöé
  4883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4884. ΓöéWM_CREATE               ΓöéCreates the specified frame controlsΓöé
  4885. Γöé                        Γöéby calling the                      Γöé
  4886. Γöé                        ΓöéWinCreateFrameControls function.    Γöé
  4887. Γöé                        ΓöéAlso creates any accelerator tables,Γöé
  4888. Γöé                        Γöéloads icons, and adds itself to the Γöé
  4889. Γöé                        ΓöéWindow List. These actions depend onΓöé
  4890. Γöé                        Γöéthe frame-window styles and         Γöé
  4891. Γöé                        Γöéframe-control flags specified for   Γöé
  4892. Γöé                        Γöéthe window.                         Γöé
  4893. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4894. ΓöéWM_DESTROY              ΓöéIf the focus is held by a child     Γöé
  4895. Γöé                        Γöéwindow of the frame window, sets theΓöé
  4896. Γöé                        Γöéfocus to the frame window's parent  Γöé
  4897. Γöé                        Γöéwindow, destroys any owned windows  Γöé
  4898. Γöé                        Γöéor child windows, destroys any iconsΓöé
  4899. Γöé                        Γöécreated by using the FS_ICON style, Γöé
  4900. Γöé                        Γöéand destroys any accelerator tables Γöé
  4901. Γöé                        Γöécreated by using the FS_ACCELTABLE  Γöé
  4902. Γöé                        Γöéstyle.                              Γöé
  4903. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4904. ΓöéWM_ENABLE               ΓöéReturns the result of the           Γöé
  4905. Γöé                        ΓöéWinDefWindowProc function.          Γöé
  4906. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4907. ΓöéWM_ERASEBACKGROUND      ΓöéReturns TRUE, signaling that the    Γöé
  4908. Γöé                        Γöéwindow should erase the             Γöé
  4909. Γöé                        Γöéclient-window area. The frame windowΓöé
  4910. Γöé                        Γöésends this message to itself during Γöé
  4911. Γöé                        ΓöéWM_PAINT processing.                Γöé
  4912. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4913. ΓöéWM_FORMATFRAME          ΓöéCalculates the sizes and positions  Γöé
  4914. Γöé                        Γöéof the frame controls and the clientΓöé
  4915. Γöé                        Γöéwindow.                             Γöé
  4916. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4917. ΓöéWM_HITTEST              ΓöéIf the frame window is minimized andΓöé
  4918. Γöé                        Γöédisabled, returns HT_ERROR;         Γöé
  4919. Γöé                        Γöéotherwise, returns TF_MOVE.         Γöé
  4920. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4921. ΓöéWM_MINMAXFRAME          ΓöéIf the frame window has a client    Γöé
  4922. Γöé                        Γöéwindow, passes this message to the  Γöé
  4923. Γöé                        Γöéclient window; otherwise, passes    Γöé
  4924. Γöé                        Γöéthis message to the WinDefWindowProcΓöé
  4925. Γöé                        Γöéfunction.                           Γöé
  4926. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4927. ΓöéWM_MOUSEMOVE            ΓöéDetermines the correct mouse pointerΓöé
  4928. Γöé                        Γöéto use and returns the result of    Γöé
  4929. Γöé                        ΓöéWinDefWindowProc.                   Γöé
  4930. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4931. ΓöéWM_PAINT                ΓöéIf the frame window is minimized,   Γöé
  4932. Γöé                        Γöésends WM_QUERYICON and              Γöé
  4933. Γöé                        ΓöéWM_ERASEBACKGROUND to itself and    Γöé
  4934. Γöé                        Γöédraws the icon; otherwise, paints   Γöé
  4935. Γöé                        Γöéthe control windows, sends a        Γöé
  4936. Γöé                        ΓöéWM_ERASEBACKGROUND message to the   Γöé
  4937. Γöé                        Γöéclient window, and paints the clientΓöé
  4938. Γöé                        Γöéwindow.                             Γöé
  4939. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4940. ΓöéWM_QUERYTRACKINFO       ΓöéStarts track-move processing of the Γöé
  4941. Γöé                        Γöétitle-bar control window.           Γöé
  4942. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4943. ΓöéWM_SHOW                 ΓöéReturns the result of               Γöé
  4944. Γöé                        ΓöéWinDefWindowProc.                   Γöé
  4945. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4946. ΓöéWM_SIZE                 ΓöéSends a WM_FORMATFRAME message to   Γöé
  4947. Γöé                        Γöéitself.                             Γöé
  4948. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4949. ΓöéWM_SYSCOMMAND           ΓöéIf the frame window has captured theΓöé
  4950. Γöé                        Γöémouse, ignores the system command;  Γöé
  4951. Γöé                        Γöéotherwise, uses one of the followingΓöé
  4952. Γöé                        Γöécommands: SC_APPMENU, SC_CLOSE,     Γöé
  4953. Γöé                        ΓöéSC_MOVE, SC_NEXT, SC_NEXTFRAME,     Γöé
  4954. Γöé                        ΓöéSC_RESTORE, SC_SIZE, SC_SYSMENU,    Γöé
  4955. Γöé                        ΓöéSC_TASKMANAGER.                     Γöé
  4956. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4957. ΓöéWM_UPDATEFRAME          ΓöéReformats and updates the appearanceΓöé
  4958. Γöé                        Γöéof the frame window. Sent after a   Γöé
  4959. Γöé                        Γöéframe control has been added to or  Γöé
  4960. Γöé                        Γöéremoved from the frame window.      Γöé
  4961. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4962.  
  4963.  
  4964. ΓòÉΓòÉΓòÉ 6.2. Using Frame Windows ΓòÉΓòÉΓòÉ
  4965.  
  4966. This section explains how to: 
  4967.  
  4968. o Create a main window 
  4969. o Retrieve a frame-control handle. 
  4970.  
  4971.  
  4972. ΓòÉΓòÉΓòÉ 6.2.1. Creating a Main Window ΓòÉΓòÉΓòÉ
  4973.  
  4974. An application can create a main window by using the WinCreateStdWindow 
  4975. function.  The following code fragment creates a typical main window-a frame 
  4976. window that has a system menu, title bar, menu, vertical and horizontal scroll 
  4977. bars, minimize and maximize (window-sizing) buttons, and a sizing border: 
  4978.  
  4979.     #define IDM_MENU 1
  4980.  
  4981.     HWND hwndFrame;
  4982.  
  4983.     ULONG flFrameControlFlags =
  4984.     FCF_SYSMENU    | FCF_TITLEBAR | FCF_SIZEBORDER |
  4985.     FCF_MENU       | FCF_MINMAX   | FCF_HORZSCROLL |
  4986.     FCF_VERTSCROLL | FCF_SHELLPOSITION;
  4987.  
  4988.     hwndFrame = WinCreateStdWindow(
  4989.     HWND_DESKTOP,           /* Frame-window parent       */
  4990.     WS_VISIBLE,             /* Make window visible       */
  4991.     &flFrameControlFlags,   /* Frame-control flags       */
  4992.     "MyClass",              /* Client-window class       */
  4993.     "Main Window",          /* Window title              */
  4994.     0,                      /* No client-window styles   */
  4995.     (HMODULE)NULL,          /* App. module has resources */
  4996.     IDM_MENU,               /* Resource ID               */
  4997.     0);                     /* Client-window handle      */
  4998.  
  4999. An application also can create a standard main window by creating a frame 
  5000. window with the FCF_STANDARD flag.  The application must include icon, menu, 
  5001. and accelerator-table resources if it uses the FCF_STANDARD flag. 
  5002.  
  5003. The application creates the standard window by using the WinCreateStdWindow 
  5004. function, as shown in the following code fragment: 
  5005.  
  5006.     #define IDM_RESOURCES 1
  5007.  
  5008.     HWND hwndFrame;
  5009.  
  5010.     /* Set the frame-control flags.                               */
  5011.     ULONG flFrameControlFlags = FCF_STANDARD;
  5012.  
  5013.     /* Create the standard main window.                           */
  5014.     hwndFrame = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE,
  5015.     &flFrameControlFlags,
  5016.     "MyClass", "Main Window", 0, (HMODULE) NULL,
  5017.     IDM_RESOURCES, 0);
  5018.  
  5019. Another way to create a main window and its frame controls is to use the 
  5020. WinCreateWindow function to create the frame window and the frame controls, 
  5021. then call WinCreateWindow again to create the client window.  One advantage of 
  5022. this approach is that, when creating the frame window, the application can 
  5023. specify the window's initial size and position. The following figure 
  5024. illustrates this approach: 
  5025.  
  5026.  
  5027. UsingWinCreateWindowtoCreateFrame ,Control ,andClientWindows
  5028.  
  5029.     #define ID_RESOURCES 1
  5030.     #define ID_FRAME     1
  5031.  
  5032.     ULONG flFrameControlFlags =
  5033.     FCF_ACCELTABLE | FCF_ICON       | FCF_MENU    |
  5034.     FCF_MINMAX     | FCF_SIZEBORDER | FCF_SYSMENU |
  5035.     FCF_TASKLIST   | FCF_TITLEBAR;
  5036.  
  5037.     FRAMECDATA fcdata;
  5038.     HWND hwndFrame;
  5039.     HWND hwndClient;
  5040.     SWP swp;
  5041.  
  5042.     fcdata.cb = sizeof(FRAMECDATA);
  5043.     fcdata.flCreateFlags = flFrameControlFlags;
  5044.     fcdata.hmodResources = (HMODULE) NULL;
  5045.     fcdata.idResources  = ID_RESOURCES;
  5046.  
  5047.     /* Create the frame and client windows.             */
  5048.     hwndFrame = WinCreateWindow(
  5049.     HWND_DESKTOP,         /* Frame-window parent        */
  5050.     WC_FRAME,             /* Frame-window class         */
  5051.     "Main Window",        /* Window title               */
  5052.     0,                    /* Initially invisible        */
  5053.     0,0,0,0,              /* Size and position = 0      */
  5054.     NULL,                 /* No owner                   */
  5055.     HWND_TOP,             /* Top z-order position       */
  5056.     ID_FRAME,             /* Frame-window ID            */
  5057.     &fcdata,              /* Pointer to class data      */
  5058.     NULL);                /* No presentation parameters */
  5059.  
  5060.     hwndClient = WinCreateWindow(
  5061.     hwndFrame,            /* Client-window parent       */
  5062.     "MyClass",            /* Client-window class        */
  5063.     NULL,                 /* No title for client window */
  5064.     0,                    /* Initially invisible        */
  5065.     0,0,0,0,              /* Size and position = 0      */
  5066.     hwndFrame,            /* Owner is frame window      */
  5067.     HWND_BOTTOM,          /* Bottom z-order position    */
  5068.     FID_CLIENT,           /* Standard client-window ID  */
  5069.     NULL,                 /* No class data              */
  5070.     NULL);                /* No presentation parameters */
  5071.  
  5072.     .
  5073.     . /* Continue with initialization.                  */
  5074.     .
  5075.  
  5076.     /* Set the size and position of the frame window.   */
  5077.     WinQueryWindowPos(HWND_DESKTOP, &swp);
  5078.     WinSetWindowPos(hwndFrame, HWND_TOP, swp.x, swp.cy / 2,
  5079.     swp.cx, swp.cy / 2, SWP_MOVE | SWP_SIZE);
  5080.  
  5081.     /* Set the size and position of the client window.  */
  5082.     WinQueryWindowPos(hwndFrame, &swp);
  5083.     WinSetWindowPos(hwndClient, HWND_TOP, SV_CXSIZEBORDER,
  5084.     SV_CYSIZEBORDER - 1, swp.cx - SV_CXSIZEBORDER * 2,
  5085.     (swp.cy - SV_CYSIZEBORDER * 2) + 1, SWP_MOVE | SWP_SIZE);
  5086.  
  5087.     /* Make the frame and client windows visible.       */
  5088.     WinShowWindow(hwndFrame, TRUE);
  5089.     WinShowWindow(hwndClient, TRUE);
  5090.  
  5091.  
  5092. ΓòÉΓòÉΓòÉ 6.2.2. Retrieving a Frame Handle ΓòÉΓòÉΓòÉ
  5093.  
  5094. An application can retrieve a frame-control handle by using the WinWindowFromID 
  5095. function. The following code fragment retrieves the handle of a title-bar 
  5096. control: 
  5097.  
  5098.     HWND hwndTitleBar,hwndFrame;
  5099.  
  5100.     hwndTitleBar = WinWindowFromID(hwndFrame, FID_TITLEBAR);
  5101.  
  5102. Given a frame-control handle, an application can retrieve its parent 
  5103. frame-window handle by using the WinQueryWindow function: 
  5104.  
  5105.     HWND hwndFrame,hwndTitleBar;
  5106.  
  5107.     hwndFrame = WinQueryWindow(hwndTitleBar, QW_PARENT);
  5108.  
  5109. By using identifiers to identify frame controls, rather than using window 
  5110. classes, an application can create its own controls to replace the predefined 
  5111. controls. 
  5112.  
  5113.  
  5114. ΓòÉΓòÉΓòÉ 6.3. Summary ΓòÉΓòÉΓòÉ
  5115.  
  5116. Following are the OS/2 functions, structures, and messages used with frame 
  5117. windows. 
  5118.  
  5119. Frame-Window Functions 
  5120.  
  5121. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5122. ΓöéFunction Name           ΓöéDescription                         Γöé
  5123. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5124. ΓöéWinCalcFrameRect        ΓöéCalculates a client rectangle from aΓöé
  5125. Γöé                        Γöéframe rectangle or a frame rectangleΓöé
  5126. Γöé                        Γöéfrom a client rectangle.            Γöé
  5127. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5128.  
  5129. Frame-Window Structures 
  5130.  
  5131. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5132. ΓöéStructure Name          ΓöéDescription                         Γöé
  5133. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5134. ΓöéFRAMECDATA              ΓöéFrame-control data structure.       Γöé
  5135. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5136. ΓöéHSVWP                   ΓöéFrame window repositioning handle.  Γöé
  5137. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5138.  
  5139. Frame-Window Messages 
  5140.  
  5141. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5142. ΓöéMessage                       ΓöéDescription                   Γöé
  5143. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5144. ΓöéWM_ACTIVATE                   ΓöéOccurs when an application    Γöé
  5145. Γöé                              Γöécauses the activation or      Γöé
  5146. Γöé                              Γöédeactivation of a window.     Γöé
  5147. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5148. ΓöéWM_BUTTON1DOWN                ΓöéOccurs when the user presses  Γöé
  5149. Γöé                              Γöépointer button 1.             Γöé
  5150. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5151. ΓöéWM_BUTTON2DOWN                ΓöéOccurs when the user presses  Γöé
  5152. Γöé                              Γöépointer button 2.             Γöé
  5153. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5154. ΓöéWM_BUTTON3DOWN                ΓöéOccurs when the user presses  Γöé
  5155. Γöé                              Γöépointer button 3.             Γöé
  5156. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5157. ΓöéWM_BUTTON1UP                  ΓöéOccurs when the user releases Γöé
  5158. Γöé                              Γöépoint button 1.               Γöé
  5159. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5160. ΓöéWM_CALCVALIDRECTS             ΓöéSent to determine which areas Γöé
  5161. Γöé                              Γöéof a window can be preserved  Γöé
  5162. Γöé                              Γöéand which can be displayed    Γöé
  5163. Γöé                              Γöéwhen a window is sized.       Γöé
  5164. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5165. ΓöéWM_CLOSE                      ΓöéSent to a frame window to     Γöé
  5166. Γöé                              Γöéindicate that the user is     Γöé
  5167. Γöé                              Γöéclosing the window.           Γöé
  5168. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5169. ΓöéWM_CREATE                     ΓöéOccurs when the application   Γöé
  5170. Γöé                              Γöérequests creation of a window.Γöé
  5171. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5172. ΓöéWM_DESTROY                    ΓöéOccurs when an application    Γöé
  5173. Γöé                              Γöérequests destruction of a     Γöé
  5174. Γöé                              Γöéwindow.                       Γöé
  5175. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5176. ΓöéWM_ENABLE                     ΓöéSets the enable state of a    Γöé
  5177. Γöé                              Γöéwindow.                       Γöé
  5178. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5179. ΓöéWM_ERASEBACKGROUND            ΓöéCauses a client window to be  Γöé
  5180. Γöé                              Γöéfilled with the background, ifΓöé
  5181. Γöé                              Γöéappropriate.                  Γöé
  5182. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5183. ΓöéWM_FLASHWINDOW                ΓöéOccurs when an application hasΓöé
  5184. Γöé                              Γöéissued a WinFlashWindow call. Γöé
  5185. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5186. ΓöéWM_FOCUSCHANGE                ΓöéOccurs when the window        Γöé
  5187. Γöé                              Γöépossessing the focus is       Γöé
  5188. Γöé                              Γöéchanged.                      Γöé
  5189. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5190. ΓöéWM_FORMATFRAME                ΓöéSent to a frame window to     Γöé
  5191. Γöé                              Γöécalculate the sizes and       Γöé
  5192. Γöé                              Γöépositions of all the frame    Γöé
  5193. Γöé                              Γöécontrols and the client       Γöé
  5194. Γöé                              Γöéwindow.                       Γöé
  5195. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5196. ΓöéWM_HITTEST                    ΓöéSent to determine which windowΓöé
  5197. Γöé                              Γöéis associated with an input   Γöé
  5198. Γöé                              Γöéfrom the pointing device.     Γöé
  5199. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5200. ΓöéWM_MINMAXFRAME                ΓöéSent to a frame window that isΓöé
  5201. Γöé                              Γöébeing minimized, maximized, orΓöé
  5202. Γöé                              Γöérestored.                     Γöé
  5203. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5204. ΓöéWM_MOUSEMOVE                  ΓöéOccurs when the pointing      Γöé
  5205. Γöé                              Γöédevice pointer moves.         Γöé
  5206. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5207. ΓöéWM_NEXTMENU                   ΓöéOccurs when either the        Γöé
  5208. Γöé                              Γöébeginning or the end of the   Γöé
  5209. Γöé                              Γöémenu is reached using the     Γöé
  5210. Γöé                              Γöécursor control keys.          Γöé
  5211. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5212. ΓöéWM_PAINT                      ΓöéOccurs when a window needs    Γöé
  5213. Γöé                              Γöépainting.                     Γöé
  5214. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5215. ΓöéWM_QUERYFRAMECTLCOUNT         ΓöéSent to the frame window in   Γöé
  5216. Γöé                              Γöéresponse to the receipt of a  Γöé
  5217. Γöé                              ΓöéWM_SIZE or WM_UPDATEFRAME     Γöé
  5218. Γöé                              Γöémessage.                      Γöé
  5219. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5220. ΓöéWM_QUERYFRAMEINFO             ΓöéEnables an application to     Γöé
  5221. Γöé                              Γöéquery information about frame Γöé
  5222. Γöé                              Γöéwindows.                      Γöé
  5223. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5224. ΓöéWM_QUERYICON                  ΓöéSent to a frame window to     Γöé
  5225. Γöé                              Γöéquery its associated icon.    Γöé
  5226. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5227. ΓöéWM_QUERYTRACKINFO             ΓöéThe frame control and title   Γöé
  5228. Γöé                              Γöébar generate this message     Γöé
  5229. Γöé                              Γöéafter receiving a             Γöé
  5230. Γöé                              ΓöéWM_TRACKFRAME message.        Γöé
  5231. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5232. ΓöéWM_SETACCELTABLE              ΓöéEstablishes the window        Γöé
  5233. Γöé                              Γöéaccelerator table to be used  Γöé
  5234. Γöé                              Γöéfor translation when the      Γöé
  5235. Γöé                              Γöéwindow is active.             Γöé
  5236. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5237. ΓöéWM_SETBORDERSIZE              ΓöéSent to the frame window to   Γöé
  5238. Γöé                              Γöéchange the width and height ofΓöé
  5239. Γöé                              Γöéthe border.                   Γöé
  5240. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5241. ΓöéWM_SETICON                    ΓöéSent to a frame window to set Γöé
  5242. Γöé                              Γöéits associated icon.          Γöé
  5243. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5244. ΓöéWM_SHOW                       ΓöéOccurs when a window's        Γöé
  5245. Γöé                              ΓöéWS_VISIBLE state is changing. Γöé
  5246. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5247. ΓöéWM_SIZECLIPBOARD              ΓöéSent when the clipboard       Γöé
  5248. Γöé                              Γöécontains a data handle for theΓöé
  5249. Γöé                              ΓöéCFI_OWNERDISPLAY format, and  Γöé
  5250. Γöé                              Γöéthe clipboard application     Γöé
  5251. Γöé                              Γöéwindow has changed size.      Γöé
  5252. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5253. ΓöéWM_SYSCOMMAND                 ΓöéOccurs when a control has a   Γöé
  5254. Γöé                              Γöésignificant event to notify toΓöé
  5255. Γöé                              Γöéits owner or when a keystroke Γöé
  5256. Γöé                              Γöéhas been translated by an     Γöé
  5257. Γöé                              Γöéaccelerator table into a      Γöé
  5258. Γöé                              ΓöéWM_SYSCOMMAND message.        Γöé
  5259. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5260. ΓöéWM_TRACKFRAME                 ΓöéSent to a window whenever it  Γöé
  5261. Γöé                              Γöéis to be moved or sized.      Γöé
  5262. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5263. ΓöéWM_TRANSLATEACCEL             ΓöéSent to the focus window      Γöé
  5264. Γöé                              Γöéwhenever a WM_CHAR message    Γöé
  5265. Γöé                              Γöéoccurs.                       Γöé
  5266. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5267. ΓöéWM_UPDATEFRAME                ΓöéSent by an application after  Γöé
  5268. Γöé                              Γöéframe controls have been addedΓöé
  5269. Γöé                              Γöéor removed from the window    Γöé
  5270. Γöé                              Γöéframe.                        Γöé
  5271. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5272. ΓöéWM_WINDOWPOSCHANGED           ΓöéSent to the window procedure  Γöé
  5273. Γöé                              Γöéof the window whose position  Γöé
  5274. Γöé                              Γöéis changed.                   Γöé
  5275. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5276.  
  5277.  
  5278. ΓòÉΓòÉΓòÉ 7. Control Windows ΓòÉΓòÉΓòÉ
  5279.  
  5280. A control window is a window that an application uses in conjunction with 
  5281. another window to carry out simple input and output tasks.  This chapter 
  5282. describes how to create and use control windows in PM applications. 
  5283.  
  5284.  
  5285. ΓòÉΓòÉΓòÉ 7.1. About Control Windows ΓòÉΓòÉΓòÉ
  5286.  
  5287. Control windows are used most often as part of a frame or dialog window, but 
  5288. they also can be used in a client window. An application can create control 
  5289. windows in a frame window by using frame-control flags in the 
  5290. WinCreateStdWindow function, or it can create control windows individually by 
  5291. calling the WinCreateWindow function. 
  5292.  
  5293. Including control windows in a dialog window requires the use of a dialog 
  5294. template, which is a data structure that describes a dialog window and its 
  5295. control windows.  The system uses the data in the dialog template to create the 
  5296. dialog window and control windows.  An application can create a dialog template 
  5297. at run time, or it can use the system resource compiler to create a 
  5298. dialog-template resource. 
  5299.  
  5300. The operating system provides many types of predefined control windows. An 
  5301. application can create a control of a particular type by specifying the 
  5302. appropriate control-window class name, either in the WinCreateWindow function 
  5303. or in a dialog template. The following is a list of the predefined 
  5304. control-window classes: 
  5305.  
  5306. Control Window Classes 
  5307.  
  5308. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5309. ΓöéClass name     ΓöéDescription                                  Γöé
  5310. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5311. ΓöéWC_BUTTON      ΓöéConsists of buttons and boxes the user can   Γöé
  5312. Γöé               Γöéselect by clicking the pointing device or    Γöé
  5313. Γöé               Γöéusing the keyboard.                          Γöé
  5314. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5315. ΓöéWC_COMBOBOX    ΓöéCreates a combination-box control, which     Γöé
  5316. Γöé               Γöécombines a list-box control and an           Γöé
  5317. Γöé               Γöéentry-field control. It allows the user to   Γöé
  5318. Γöé               Γöéenter data by typing in the entry field or   Γöé
  5319. Γöé               Γöéchoosing from a list in the list box.        Γöé
  5320. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5321. ΓöéWC_CONTAINER   ΓöéCreates a control for the user to group      Γöé
  5322. Γöé               Γöéobjects in a logical manner.  A container canΓöé
  5323. Γöé               Γöédisplay those objects in various formats or  Γöé
  5324. Γöé               Γöéviews.  The container control supports drag  Γöé
  5325. Γöé               Γöéand drop so the user can place information inΓöé
  5326. Γöé               Γöéa container by simply dragging and dropping. Γöé
  5327. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5328. ΓöéWC_ENTRYFIELD  ΓöéConsists of a single line of text that the   Γöé
  5329. Γöé               Γöéuser can edit.                               Γöé
  5330. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5331. ΓöéWC_FRAME       ΓöéA composite window class that can contain    Γöé
  5332. Γöé               Γöéchild windows of many of the other window    Γöé
  5333. Γöé               Γöéclasses.                                     Γöé
  5334. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5335. ΓöéWC_LISTBOX     ΓöéPresents a list of text items from which the Γöé
  5336. Γöé               Γöéuser can make selections.                    Γöé
  5337. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5338. ΓöéWC_MENU        ΓöéPresents a list of items that can be         Γöé
  5339. Γöé               Γöédisplayed horizontally as action bars, or    Γöé
  5340. Γöé               Γöévertically as pull-down menus.  Menus usuallyΓöé
  5341. Γöé               Γöéare used to provide a command interface to   Γöé
  5342. Γöé               Γöéapplications.                                Γöé
  5343. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5344. ΓöéWC_NOTEBOOK    ΓöéCreates a control for the user that is       Γöé
  5345. Γöé               Γöédisplayed as a number of pages.  The top pageΓöé
  5346. Γöé               Γöéis visible, and the others are hidden, with  Γöé
  5347. Γöé               Γöétheir presence being indicated by a visible  Γöé
  5348. Γöé               Γöéedge on each of the back pages.              Γöé
  5349. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5350. ΓöéWC_SCROLLBAR   ΓöéConsists of window scroll bars that let the  Γöé
  5351. Γöé               Γöéuser request to scroll the contents of an    Γöé
  5352. Γöé               Γöéassociated window.                           Γöé
  5353. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5354. ΓöéWC_SLIDER      ΓöéCreates a control that is usable for         Γöé
  5355. Γöé               Γöéproducing approximate (analog) values or     Γöé
  5356. Γöé               Γöéproperties.  Scroll bars were used for this  Γöé
  5357. Γöé               Γöéfunction in the past, but the slider providesΓöé
  5358. Γöé               Γöéa more flexible method of achieving the same Γöé
  5359. Γöé               Γöéresult, with less programming effort.        Γöé
  5360. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5361. ΓöéWC_SPINBUTTON  ΓöéCreates a control that presents itself to theΓöé
  5362. Γöé               Γöéuser as a scrollable ring of choices, giving Γöé
  5363. Γöé               Γöéthe user quick access to the data.  The user Γöé
  5364. Γöé               Γöéis presented only one item at a time, so the Γöé
  5365. Γöé               Γöéspin button should be used with data that is Γöé
  5366. Γöé               Γöéintuitively related.                         Γöé
  5367. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5368. ΓöéWC_STATIC      ΓöéSimple display items that do not respond to  Γöé
  5369. Γöé               Γöékeyboard or pointing device events.          Γöé
  5370. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5371. ΓöéWC_TITLEBAR    ΓöéDisplays the window title or caption and letsΓöé
  5372. Γöé               Γöéthe user move the window's owner.            Γöé
  5373. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5374. ΓöéWC_VALUESET    ΓöéCreates a control similar in function to the Γöé
  5375. Γöé               Γöéradio buttons but provides additional        Γöé
  5376. Γöé               Γöéflexibility to display graphical, textual,   Γöé
  5377. Γöé               Γöéand numeric formats.  The values set with    Γöé
  5378. Γöé               Γöéthis control are mutually exclusive.         Γöé
  5379. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5380.  
  5381. A control window is always owned by another window, usually a frame or dialog 
  5382. window.  This relationship is important because a control window sends 
  5383. WM_CONTROL messages to its owner whenever an input event occurs in the control 
  5384. window.  Each WM_CONTROL message includes the identifier of the control window 
  5385. in which the event occurred and a notification code that specifies the nature 
  5386. of the event.  An application specifies a control window's ID either in the 
  5387. WinCreateWindow function or in a dialog template.  Each ID must be unique. 
  5388.  
  5389. Control windows are like other predefined window classes in that they respond 
  5390. to standard window-management messages and functions, such as WinSetWindowText 
  5391. and WinShowWindow. 
  5392.  
  5393. All control-window classes have a set of specific messages they send and 
  5394. receive.  The summary at the end of this chapter lists the messages that all 
  5395. control windows have in common. 
  5396.  
  5397. The system paints most control windows synchronously-that is, it redraws a 
  5398. control window as soon as any part of that window becomes invalid. 
  5399.  
  5400.  
  5401. ΓòÉΓòÉΓòÉ 7.2. Using Control Windows ΓòÉΓòÉΓòÉ
  5402.  
  5403. An application can use control windows in a dialog window, standard frame 
  5404. window, or client window.  The following sections describe how to use control 
  5405. windows in an application. 
  5406.  
  5407.  
  5408. ΓòÉΓòÉΓòÉ 7.2.1. Using Control Windows in a Dialog Window ΓòÉΓòÉΓòÉ
  5409.  
  5410. To use a control window in a dialog window, an application specifies the 
  5411. control in a dialog template in the application's resource-definition file. A 
  5412. dialog template typically includes several control windows. When the 
  5413. application loads the dialog-template resource and displays the dialog window, 
  5414. the system automatically displays the control windows as part of the dialog 
  5415. window. 
  5416.  
  5417. An application can send messages, through the dialog-window procedure, to a 
  5418. control window to change its state. The control window sends notification 
  5419. messages to the dialog-window procedure. The content of a notification message 
  5420. depends on the type of control window. 
  5421.  
  5422.  
  5423. ΓòÉΓòÉΓòÉ 7.2.2. Using Control Windows in a Non-Dialog Window ΓòÉΓòÉΓòÉ
  5424.  
  5425. To use a control window in a non-dialog window, an application must call the 
  5426. WinCreateWindow function, using the appropriate window class name.  An 
  5427. application usually specifies one of its client windows as the owner of the 
  5428. control window.  Therefore, the client-window procedure receives notification 
  5429. messages from the control window.  In cases where a control is owned by the 
  5430. frame window (such as a menu control), the notification messages to the frame 
  5431. window are passed to the client window. 
  5432.  
  5433.  
  5434. ΓòÉΓòÉΓòÉ 7.2.3. Creating a Custom Control Window ΓòÉΓòÉΓòÉ
  5435.  
  5436. The operating system provides the following three ways to create custom control 
  5437. windows: 
  5438.  
  5439. o Use ownerdraw list boxes and menus or buttons. 
  5440. o Subclass an existing control-window class. 
  5441. o Register and implement a window class from scratch. 
  5442.  
  5443. List boxes and menus can have an ownerdraw style, and buttons can have a 
  5444. user-button style, which cause the system to send a message to the owner of the 
  5445. ownerdraw control whenever the control must be drawn.  (If the owner is a frame 
  5446. window, it sends these messages on to its client windows for handling by the 
  5447. client window procedure.) This feature lets an application alter the appearance 
  5448. of a control window.  For menus and list boxes, the owner window draws the 
  5449. items within the control, and the system draws the outline of the control.  For 
  5450. buttons, the user-button style affects the drawing of the entire control. 
  5451.  
  5452. Subclassing an existing control window is an easy way to create a custom 
  5453. control.  The subclass procedure can alter selected behavior of the control 
  5454. window by processing only those messages that affect the selected behaviors. 
  5455. All other messages pass to the original control-window procedure. 
  5456.  
  5457. The techniques for defining a custom control-window class are the same as those 
  5458. used for creating a client-window class.  When you create a custom 
  5459. control-window class, be sure the window procedure can send and receive the 
  5460. messages listed in the following two tables. 
  5461.  
  5462. If an application creates a private control-window class, the name of the 
  5463. private class could be used in the dialog template, just like a predefined 
  5464. window-class constant.  For example, if an application defines and registers a 
  5465. window class called "MyControlClass", it could create a dialog window that 
  5466. contains that type of control window by using the following resource 
  5467. definition: 
  5468.  
  5469.  
  5470.     DLGTEMPLATE IDD_CUSTOM_TEST
  5471.     BEGIN
  5472.     DIALOG "", IDD_CUSTOM_TEST, 1, 1, 126, 130, FS_DLGBORDER, 0
  5473.     BEGIN
  5474.         CONTROL "This is Text", IDD_TITLE,
  5475.               37, 107, 56, 12,
  5476.               WC_STATIC,
  5477.               SS_TEXT | DT_CENTER | DT_TOP | DT_WORDBREAK
  5478.               | WS_VISIBLE
  5479.         CONTROL "Custom Control", IDD_CUSTOM,
  5480.               33, 68, 64, 13,
  5481.               "MyControlClass",
  5482.               WS_VISIBLE
  5483.         CONTROL "Okay", DID_OK,
  5484.               57, 10, 24, 14,
  5485.               WC_BUTTON,
  5486.               BS_PUSHBUTTON | BS_DEFAULT | WS_TABSTOP | WS_VISIBLE
  5487.         END
  5488.     END
  5489.  
  5490.  
  5491. ΓòÉΓòÉΓòÉ 7.3. Summary ΓòÉΓòÉΓòÉ
  5492.  
  5493. Following are the OS/2 messages used with control windows. 
  5494.  
  5495. Messages Received by a Control Window 
  5496.  
  5497. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5498. ΓöéMessage                       ΓöéDescription                   Γöé
  5499. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5500. ΓöéWM_ADJUSTWINDOWPOS            ΓöéSent by WinSetWindowPos to    Γöé
  5501. Γöé                              Γöéenable the window to adjust   Γöé
  5502. Γöé                              Γöéits new position or size when Γöé
  5503. Γöé                              Γöéit is about to be moved.      Γöé
  5504. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5505. ΓöéWM_QUERYDLGCODE               ΓöéSent by the dialog manager to Γöé
  5506. Γöé                              Γöéidentify the type of control, Γöé
  5507. Γöé                              Γöéto determine what kinds of    Γöé
  5508. Γöé                              Γöémessages the control          Γöé
  5509. Γöé                              Γöéunderstands, and to determine Γöé
  5510. Γöé                              Γöéwhether an input message may  Γöé
  5511. Γöé                              Γöébe processed by the dialog    Γöé
  5512. Γöé                              Γöémanager or passed down to the Γöé
  5513. Γöé                              Γöécontrol.                      Γöé
  5514. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5515.  
  5516. Messages Generated by a Control Window to its Owner 
  5517.  
  5518. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5519. ΓöéMessage                       ΓöéDescription                   Γöé
  5520. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5521. ΓöéWM_COMMAND                    ΓöéOccurs when a control has a   Γöé
  5522. Γöé                              Γöésignificant event to notify toΓöé
  5523. Γöé                              Γöéits owner, or when a keystrokeΓöé
  5524. Γöé                              Γöéhas been translated by an     Γöé
  5525. Γöé                              Γöéaccelerator table.            Γöé
  5526. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5527. ΓöéWM_CONTROLPOINTER             ΓöéSent to a control's owner     Γöé
  5528. Γöé                              Γöéwindow when the pointing      Γöé
  5529. Γöé                              Γöédevice pointer moves over the Γöé
  5530. Γöé                              Γöécontrol window, allowing the  Γöé
  5531. Γöé                              Γöéowner to set the pointer.     Γöé
  5532. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5533. ΓöéWM_HELP                       ΓöéOccurs when a control has a   Γöé
  5534. Γöé                              Γöésignificant event to notify toΓöé
  5535. Γöé                              Γöéits owner, or when a keystrokeΓöé
  5536. Γöé                              Γöéhas been translated into a    Γöé
  5537. Γöé                              ΓöéWM_HELP message by an         Γöé
  5538. Γöé                              Γöéaccelerator table.            Γöé
  5539. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5540. ΓöéWM_SYSCOMMAND                 ΓöéOccurs when a control has a   Γöé
  5541. Γöé                              Γöésignificant event to notify toΓöé
  5542. Γöé                              Γöéits owner, or when a keystrokeΓöé
  5543. Γöé                              Γöéhas been translated into a    Γöé
  5544. Γöé                              ΓöéWM_SYSCOMMAND message by an   Γöé
  5545. Γöé                              Γöéaccelerator table.            Γöé
  5546. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5547.  
  5548.  
  5549. ΓòÉΓòÉΓòÉ 8. Button Controls ΓòÉΓòÉΓòÉ
  5550.  
  5551. A button is a type of control window used to initiate an operation or to set 
  5552. the attributes of an operation.  This chapter describes how to create and use 
  5553. buttons in PM applications. 
  5554.  
  5555.  
  5556. ΓòÉΓòÉΓòÉ 8.1. About Button Controls ΓòÉΓòÉΓòÉ
  5557.  
  5558. A button control can appear alone or with a group of other buttons.  When 
  5559. buttons are grouped, the user can move from button to button within the group 
  5560. by pressing the Arrow keys.  The user also can move among groups by pressing 
  5561. the Tab key. 
  5562.  
  5563. A user can select a button by clicking it with the mouse, pressing the spacebar 
  5564. when the button has the keyboard focus, or sending a BM_CLICK message.  In most 
  5565. cases, a button changes its appearance when selected. 
  5566.  
  5567. A button control is always owned by another window, usually a dialog window or 
  5568. an application's client window.  A button control posts WM_COMMAND messages or 
  5569. sends WM_CONTROL notification messages to its owner when a user selects the 
  5570. button.  The owner window receives messages from a button control and can send 
  5571. messages to the button to alter its position, appearance, and enabled/disabled 
  5572. state. 
  5573.  
  5574. To use a button control in a dialog window, an application specifies the 
  5575. control in a dialog template in the application's resource-definition file. 
  5576. The application processes button messages in the dialog-window procedure. 
  5577.  
  5578. An application creates a button control in a client window by calling 
  5579. WinCreateWindow, specifying a window class of WC_BUTTON, and identifying the 
  5580. client window as the owner of the button control. 
  5581.  
  5582.  
  5583. ΓòÉΓòÉΓòÉ 8.1.1. Button Types ΓòÉΓòÉΓòÉ
  5584.  
  5585. There are four main types of buttons: push buttons, radio buttons, check boxes, 
  5586. and three-state check boxes.  A button's type determines how the button looks 
  5587. and behaves. 
  5588.  
  5589. A radio button, check box, or three-state check box controls an operation; a 
  5590. push button initiates an operation.  For example, a user might set printing 
  5591. options (such as paper size, print quality, and printer type) in a 
  5592. print-command dialog window containing an array of radio buttons and check 
  5593. boxes.  After setting the options, the user would select a push button to tell 
  5594. an application that printing should begin (or be canceled).  Then, the 
  5595. application would query the state of each check box and radio button to 
  5596. determine the printing parameters. 
  5597.  
  5598. A push button is a rectangular window that contains a text string, as shown in 
  5599. the following figure. Typically, an application uses a push button to let the 
  5600. user start or stop an operation. 
  5601.  
  5602. Push Button in a Dialog Box 
  5603.  
  5604. When selected, a push button control posts a WM_COMMAND message to its owner 
  5605. window. 
  5606.  
  5607. A radio button is a window with text displayed to the right of a small circular 
  5608. indicator.  Each time the user selects a radio button, that button's state 
  5609. toggles between selected and unselected.  This state remains until the next 
  5610. time the user selects the button.  An application typically uses radio buttons 
  5611. in groups, as shown in the following figure. 
  5612.  
  5613. Radio Buttons in a Dialog Box 
  5614.  
  5615. Within a group, usually one button is selected by default, and the user can 
  5616. move the selection to another button by using the cursor keys; however, only 
  5617. one button can be selected at a time.  Radio buttons are appropriate if an 
  5618. exclusive choice is required from a fixed list of related options.  For 
  5619. example, applications often use radio buttons to allow the user to select the 
  5620. screen foreground and background colors. A radio-button control sends 
  5621. WM_CONTROL messages to its owner window. 
  5622.  
  5623. Check boxes are similar to radio buttons, except that they can offer 
  5624. multiple-choice selection as well as individual choice. Check boxes offer the 
  5625. user a fixed list of choices, with the option of selecting more than one, or 
  5626. even all. 
  5627.  
  5628. Check Boxes in a Dialog Box 
  5629.  
  5630. Check boxes also toggle application features on or off. For example, a word 
  5631. processing application might use a check box to let the user turn word wrapping 
  5632. on or off. A check-box control sends WM_CONTROL messages to its owner window. 
  5633.  
  5634. Three-state check boxes are similar to check boxes, except that they can be 
  5635. displayed in halftone as well as selected and unselected.  An application might 
  5636. use the halftone state to indicate that, currently, the checkbox is not 
  5637. selectable.  A three-state check-box control sends WM_CONTROL messages and 
  5638. posts WM_COMMAND messages to its owner window. 
  5639.  
  5640. In addition to using the four predefined button-control types, an application 
  5641. can create button controls that appear as defined by the owner window.  When 
  5642. they must be drawn or highlighted, these button controls send WM_CONTROL 
  5643. messages with BN_PAINT as the notification code to their owner windows. 
  5644.  
  5645.  
  5646. ΓòÉΓòÉΓòÉ 8.1.2. Button Styles ΓòÉΓòÉΓòÉ
  5647.  
  5648. The following table describes the button styles an application can use when 
  5649. creating button controls: 
  5650.  
  5651. Button Styles 
  5652.  
  5653. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5654. ΓöéStyle                         ΓöéDescription.                  Γöé
  5655. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5656. ΓöéBS_3STATE                     ΓöéCreates a three-state check   Γöé
  5657. Γöé                              Γöébox (see also BS_CHECKBOX).   Γöé
  5658. Γöé                              ΓöéWhen the user selects the     Γöé
  5659. Γöé                              Γöécheck box, it sends a         Γöé
  5660. Γöé                              ΓöéWM_CONTROL message to the     Γöé
  5661. Γöé                              Γöéowner window. The owner shouldΓöé
  5662. Γöé                              Γöéset the check box to the      Γöé
  5663. Γöé                              Γöéappropriate state: selected,  Γöé
  5664. Γöé                              Γöéunselected, or halftone.      Γöé
  5665. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5666. ΓöéBS_AUTO3STATE                 ΓöéCreates an auto-three-state   Γöé
  5667. Γöé                              Γöécheck box (see also           Γöé
  5668. Γöé                              ΓöéBS_CHECKBOX). When the user   Γöé
  5669. Γöé                              Γöéselects the check box, the    Γöé
  5670. Γöé                              Γöésystem automatically sets the Γöé
  5671. Γöé                              Γöécheck box to the appropriate  Γöé
  5672. Γöé                              Γöéstate: selected, unselected,  Γöé
  5673. Γöé                              Γöéor halftone.                  Γöé
  5674. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5675. ΓöéBS_AUTOCHECKBOX               ΓöéCreates an auto-check box (seeΓöé
  5676. Γöé                              Γöéalso BS_CHECKBOX). The system Γöé
  5677. Γöé                              Γöéautomatically toggles the     Γöé
  5678. Γöé                              Γöécheck box between the selectedΓöé
  5679. Γöé                              Γöéand unselected states each    Γöé
  5680. Γöé                              Γöétime the user selects the box.Γöé
  5681. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5682. ΓöéBS_AUTORADIOBUTTON            ΓöéCreates an auto-radio button  Γöé
  5683. Γöé                              Γöé(see also BS_RADIOBUTTON).    Γöé
  5684. Γöé                              ΓöéWhen the user selects an      Γöé
  5685. Γöé                              Γöéauto-radio button, the system Γöé
  5686. Γöé                              Γöéautomatically selects the     Γöé
  5687. Γöé                              Γöébutton and removes the        Γöé
  5688. Γöé                              Γöéselection from the other      Γöé
  5689. Γöé                              Γöéauto-radio buttons in the     Γöé
  5690. Γöé                              Γöégroup.                        Γöé
  5691. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5692. ΓöéBS_CHECKBOX                   ΓöéCreates a check box-a small   Γöé
  5693. Γöé                              Γöésquare that has text displayedΓöé
  5694. Γöé                              Γöéto its right. When the user   Γöé
  5695. Γöé                              Γöéselects a check box, the checkΓöé
  5696. Γöé                              Γöébox sends a WM_CONTROL messageΓöé
  5697. Γöé                              Γöéto the owner window. The ownerΓöé
  5698. Γöé                              Γöéwindow should toggle the checkΓöé
  5699. Γöé                              Γöébox between selected and      Γöé
  5700. Γöé                              Γöéunselected states.            Γöé
  5701. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5702. ΓöéBS_DEFAULT                    ΓöéCreates a push button that hasΓöé
  5703. Γöé                              Γöéa heavy black border. The userΓöé
  5704. Γöé                              Γöécan select this push button byΓöé
  5705. Γöé                              Γöépressing the spacebar. This   Γöé
  5706. Γöé                              Γöéstyle is useful for letting   Γöé
  5707. Γöé                              Γöéthe user quickly select the   Γöé
  5708. Γöé                              Γöémost likely set of options in Γöé
  5709. Γöé                              Γöéa dialog window. This style isΓöé
  5710. Γöé                              Γöévalid only in combination withΓöé
  5711. Γöé                              Γöéthe BS_PUSHBUTTON style or theΓöé
  5712. Γöé                              ΓöéPUSHBUTTON statement in a     Γöé
  5713. Γöé                              Γöéresource-definition file.     Γöé
  5714. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5715. ΓöéBS_HELP                       ΓöéCreates a push button that    Γöé
  5716. Γöé                              Γöéposts a WM_HELP message       Γöé
  5717. Γöé                              Γöé(instead of a WM_COMMAND      Γöé
  5718. Γöé                              Γöémessage) to its owner window  Γöé
  5719. Γöé                              Γöéwhen the user selects the     Γöé
  5720. Γöé                              Γöébutton. This style is valid   Γöé
  5721. Γöé                              Γöéonly in combination with the  Γöé
  5722. Γöé                              ΓöéBS_PUSHBUTTON style or the    Γöé
  5723. Γöé                              ΓöéPUSHBUTTON statement in a     Γöé
  5724. Γöé                              Γöéresource-definition file.     Γöé
  5725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5726. ΓöéBS_NOCURSORSELECT             ΓöéCreates an auto-radio button  Γöé
  5727. Γöé                              Γöéthat will not be selected     Γöé
  5728. Γöé                              Γöéautomatically when the user   Γöé
  5729. Γöé                              Γöémoves the cursor to the buttonΓöé
  5730. Γöé                              Γöéusing the cursor-movement     Γöé
  5731. Γöé                              Γöékeys. This style is valid onlyΓöé
  5732. Γöé                              Γöéin combination with the       Γöé
  5733. Γöé                              ΓöéBS_AUTORADIOBUTTON style or   Γöé
  5734. Γöé                              Γöéthe AUTORADIOBUTTON statement Γöé
  5735. Γöé                              Γöéin a resource-definition file.Γöé
  5736. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5737. ΓöéBS_NOBORDER                   ΓöéCreates a push button that hasΓöé
  5738. Γöé                              Γöéno border. This style is validΓöé
  5739. Γöé                              Γöéonly in combination with the  Γöé
  5740. Γöé                              ΓöéBS_PUSHBUTTON style or the    Γöé
  5741. Γöé                              ΓöéPUSHBUTTON statement in a     Γöé
  5742. Γöé                              Γöéresource-definition file.     Γöé
  5743. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5744. ΓöéBS_NOPOINTERFOCUS             ΓöéCreates a radio button or     Γöé
  5745. Γöé                              Γöécheck box that does not       Γöé
  5746. Γöé                              Γöéreceive the keyboard focus    Γöé
  5747. Γöé                              Γöéwhen the user selects it. ThisΓöé
  5748. Γöé                              Γöéstyle is valid in combination Γöé
  5749. Γöé                              Γöéwith the BS_AUTORADIOBUTTON,  Γöé
  5750. Γöé                              ΓöéBS_RADIOBUTTON, BS_3STATE,    Γöé
  5751. Γöé                              ΓöéBS_AUTO3STATE,                Γöé
  5752. Γöé                              ΓöéBS_AUTOCHECKBOX, and          Γöé
  5753. Γöé                              ΓöéBS_CHECKBOX styles, or the    Γöé
  5754. Γöé                              ΓöéAUTORADIOBUTTON, RADIOBUTTON, Γöé
  5755. Γöé                              ΓöéAUTOCHECKBOX, or CHECKBOX     Γöé
  5756. Γöé                              Γöéstatements in a               Γöé
  5757. Γöé                              Γöéresource-definition file.     Γöé
  5758. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5759. ΓöéBS_PUSHBUTTON                 ΓöéCreates a push button-a       Γöé
  5760. Γöé                              Γöéround-cornered rectangle with Γöé
  5761. Γöé                              Γöétext displayed inside it. WhenΓöé
  5762. Γöé                              Γöéselected, the push button     Γöé
  5763. Γöé                              Γöéposts a WM_COMMAND message to Γöé
  5764. Γöé                              Γöéits owner window.             Γöé
  5765. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5766. ΓöéBS_RADIOBUTTON                ΓöéCreates a radio button-a smallΓöé
  5767. Γöé                              Γöécircle that has text displayedΓöé
  5768. Γöé                              Γöéto its right. Radio buttons   Γöé
  5769. Γöé                              Γöéusually are used in groups of Γöé
  5770. Γöé                              Γöérelated, but exclusive,       Γöé
  5771. Γöé                              Γöéchoices. When the user selectsΓöé
  5772. Γöé                              Γöéa radio button, the button    Γöé
  5773. Γöé                              Γöésends a WM_CONTROL message to Γöé
  5774. Γöé                              Γöéits owner window. The user    Γöé
  5775. Γöé                              Γöéshould select the button and  Γöé
  5776. Γöé                              Γöéremove the selection from the Γöé
  5777. Γöé                              Γöéother radio buttons in the    Γöé
  5778. Γöé                              Γöégroup.                        Γöé
  5779. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5780. ΓöéBS_SYSCOMMAND                 ΓöéCreates a button that posts a Γöé
  5781. Γöé                              ΓöéWM_SYSCOMMAND message (insteadΓöé
  5782. Γöé                              Γöéof a WM_COMMAND message) to   Γöé
  5783. Γöé                              Γöéthe owner window when the userΓöé
  5784. Γöé                              Γöéselects the button. This styleΓöé
  5785. Γöé                              Γöéis valid only in combination  Γöé
  5786. Γöé                              Γöéwith the BS_PUSHBUTTON style  Γöé
  5787. Γöé                              Γöéor the PUSHBUTTON statement inΓöé
  5788. Γöé                              Γöéa resource-definition file.   Γöé
  5789. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5790. ΓöéBS_USERBUTTON                 ΓöéCreates a user-defined button Γöé
  5791. Γöé                              Γöéthat sends a WM_CONTROL       Γöé
  5792. Γöé                              Γöémessage to the owner window   Γöé
  5793. Γöé                              Γöéwhen the button needs to be   Γöé
  5794. Γöé                              Γöédrawn, highlighted, or        Γöé
  5795. Γöé                              Γöédisabled. A user-defined      Γöé
  5796. Γöé                              Γöébutton also posts WM_COMMAND  Γöé
  5797. Γöé                              Γöémessages to the owner window  Γöé
  5798. Γöé                              Γöéwhen the user selects the     Γöé
  5799. Γöé                              Γöébutton.                       Γöé
  5800. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5801.  
  5802.  
  5803. ΓòÉΓòÉΓòÉ 8.1.3. Default Button Behavior ΓòÉΓòÉΓòÉ
  5804.  
  5805. Following are the messages processed by the predefined button-control window 
  5806. class (WC_BUTTON).  Each message is described in terms of how a button control 
  5807. responds to that message. 
  5808.  
  5809. Messages Processed by the WC_BUTTON Class 
  5810.  
  5811. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5812. ΓöéMessage                       ΓöéDescription                   Γöé
  5813. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5814. ΓöéBM_CLICK                      ΓöéSends a WM_BUTTON1DOWN and    Γöé
  5815. Γöé                              ΓöéWM_BUTTON1UP message to itselfΓöé
  5816. Γöé                              Γöéto simulate a user button     Γöé
  5817. Γöé                              Γöéselection.                    Γöé
  5818. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5819. ΓöéBM_QUERYCHECK                 ΓöéReturns the checked state of  Γöé
  5820. Γöé                              Γöéthe button.                   Γöé
  5821. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5822. ΓöéBM_QUERYCHECKINDEX            ΓöéReturns the 0-based index to  Γöé
  5823. Γöé                              Γöéthe selected button in a      Γöé
  5824. Γöé                              Γöégroup. Returns -1 if no buttonΓöé
  5825. Γöé                              Γöéin the group is selected or ifΓöé
  5826. Γöé                              Γöéthe button receiving the      Γöé
  5827. Γöé                              Γöémessage is not a radio button Γöé
  5828. Γöé                              Γöéor an auto-radio button.      Γöé
  5829. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5830. ΓöéBM_QUERYHILITE                ΓöéReturns the highlighted state Γöé
  5831. Γöé                              Γöéof the button.                Γöé
  5832. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5833. ΓöéBM_SETCHECK                   ΓöéSets the checked state of the Γöé
  5834. Γöé                              Γöébutton and returns the        Γöé
  5835. Γöé                              Γöéprevious checked state.       Γöé
  5836. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5837. ΓöéBM_SETDEFAULT                 ΓöéSets the default button state Γöé
  5838. Γöé                              Γöéand redraws the button.       Γöé
  5839. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5840. ΓöéBM_SETHILITE                  ΓöéSets the highlighted state of Γöé
  5841. Γöé                              Γöéthe button and returns the    Γöé
  5842. Γöé                              Γöéprevious highlighted state.   Γöé
  5843. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5844. ΓöéWM_BUTTON1DBLCLK              ΓöéMarks button 1, sending a     Γöé
  5845. Γöé                              ΓöéBN_DBLCLICKED notification    Γöé
  5846. Γöé                              Γöécode when the button-up       Γöé
  5847. Γöé                              Γöémessage arrives.              Γöé
  5848. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5849. ΓöéWM_BUTTON1DOWN                ΓöéSets the button 1 window so itΓöé
  5850. Γöé                              Γöécan capture mouse input.      Γöé
  5851. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5852. ΓöéWM_BUTTON1UP                  ΓöéIf the button 1 window can    Γöé
  5853. Γöé                              Γöécapture mouse input, and if   Γöé
  5854. Γöé                              Γöéthe mouse pointer is inside   Γöé
  5855. Γöé                              Γöébutton 1 when the button is   Γöé
  5856. Γöé                              Γöéreleased, this message        Γöé
  5857. Γöé                              Γöéreleases the mouse and sends aΓöé
  5858. Γöé                              Γöénotification message to the   Γöé
  5859. Γöé                              Γöéowner window. If the button isΓöé
  5860. Γöé                              Γöéa push button, the push buttonΓöé
  5861. Γöé                              Γöécontrol posts a WM_COMMAND    Γöé
  5862. Γöé                              Γöémessage; otherwise, the buttonΓöé
  5863. Γöé                              Γöécontrol sends a WM_CONTROL    Γöé
  5864. Γöé                              Γöémessage with the BN_CLICKED   Γöé
  5865. Γöé                              Γöénotification code.            Γöé
  5866. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5867. ΓöéWM_CHAR                       ΓöéSets the button window so it  Γöé
  5868. Γöé                              Γöécan capture mouse input when  Γöé
  5869. Γöé                              Γöéthe spacebar is pressed;      Γöé
  5870. Γöé                              Γöéreleases the mouse when the   Γöé
  5871. Γöé                              Γöéspacebar is released. Passes  Γöé
  5872. Γöé                              Γöéother key messages to the     Γöé
  5873. Γöé                              Γöédefault window procedure.     Γöé
  5874. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5875. ΓöéWM_CREATE                     ΓöéValidates the requested buttonΓöé
  5876. Γöé                              Γöéstyle and sets the window     Γöé
  5877. Γöé                              Γöétext.                         Γöé
  5878. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5879. ΓöéWM_DESTROY                    ΓöéFrees the memory containing   Γöé
  5880. Γöé                              Γöéthe window's text.            Γöé
  5881. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5882. ΓöéWM_ENABLE                     ΓöéSent when an application      Γöé
  5883. Γöé                              Γöéchanges the enabled state of aΓöé
  5884. Γöé                              Γöéwindow.                       Γöé
  5885. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5886. ΓöéWM_MATCHMNEMONIC              ΓöéReturns TRUE if mp1 matches a Γöé
  5887. Γöé                              Γöémnemonic in the control       Γöé
  5888. Γöé                              Γöéwindow's text.                Γöé
  5889. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5890. ΓöéWM_MOUSEMOVE                  ΓöéSets the default mouse        Γöé
  5891. Γöé                              Γöépointer. If the button has theΓöé
  5892. Γöé                              Γöémouse captured, the button's  Γöé
  5893. Γöé                              Γöéhighlighted state changes as  Γöé
  5894. Γöé                              Γöéthe mouse pointer moves in andΓöé
  5895. Γöé                              Γöéout of the button boundary.   Γöé
  5896. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5897. ΓöéWM_PAINT                      ΓöéDraws the button according to Γöé
  5898. Γöé                              Γöéits style and current state.  Γöé
  5899. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5900. ΓöéWM_QUERYDLGCODE               ΓöéReturns the DLGC_BUTTON code  Γöé
  5901. Γöé                              Γöécombined with other DLGC_     Γöé
  5902. Γöé                              Γöécodes that designate the      Γöé
  5903. Γöé                              Γöébutton's type.                Γöé
  5904. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5905. ΓöéWM_QUERYWINDOWPARAMS          ΓöéReturns the requested window  Γöé
  5906. Γöé                              Γöéparameters.                   Γöé
  5907. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5908. ΓöéWM_SETFOCUS                   ΓöéCreates a cursor if the       Γöé
  5909. Γöé                              Γöébutton-control window is      Γöé
  5910. Γöé                              Γöéreceiving the focus. Destroys Γöé
  5911. Γöé                              Γöéthe cursor if the             Γöé
  5912. Γöé                              Γöébutton-control window is      Γöé
  5913. Γöé                              Γöélosing the focus.             Γöé
  5914. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5915. ΓöéWM_SETWINDOWPARAMS            ΓöéSets the requested window     Γöé
  5916. Γöé                              Γöéparameters and redraws the    Γöé
  5917. Γöé                              Γöébutton, including the cursor, Γöé
  5918. Γöé                              Γöéif the button-control window  Γöé
  5919. Γöé                              Γöéhas the focus.                Γöé
  5920. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5921.  
  5922.  
  5923. ΓòÉΓòÉΓòÉ 8.1.4. Button Notification Messages ΓòÉΓòÉΓòÉ
  5924.  
  5925. A button that was created using the BS_PUSHBUTTON or BS_USERBUTTON style posts 
  5926. a WM_COMMAND message to its owner when the user selects it.  An application can 
  5927. change this behavior by combining the BS_HELP or BS_SYSCOMMAND styles with the 
  5928. BS_PUSHBUTTON or BS_USERBUTTON styles when creating the button. 
  5929.  
  5930. A button control that has a style other than BS_PUSHBUTTON or BS_USERBUTTON 
  5931. sends WM_CONTROL messages to its owner when the user selects it. 
  5932.  
  5933. When the user selects a push button using the mouse pointer, the system 
  5934. automatically highlights the button.  The button's window procedure tracks the 
  5935. movement of the pointer until the user releases the button.  If the user moves 
  5936. the pointer so that it is outside the button boundary, the system turns off the 
  5937. highlight.  The push button control does not post a WM_COMMAND message until 
  5938. the user releases the pointer button, and then, only if the button is released 
  5939. inside the push button boundary.  When the owner window receives a WM_COMMAND 
  5940. message from a push button, the low word of the first parameter in the message 
  5941. contains the identifier of the button as specified either in the dialog 
  5942. template or in the WinCreateWindow function when the button was created. 
  5943.  
  5944. An application should avoid duplicating identifiers for menu items and button 
  5945. controls, because both the items and the controls post identifiers to owner 
  5946. windows as WM_COMMAND messages.  However, the application can determine whether 
  5947. a WM_COMMAND message came from a menu or a push button control by looking for 
  5948. the value CMDSRC_MENU or CMDSRC_PUSHBUTTON in the low word of the message's 
  5949. second parameter. 
  5950.  
  5951. When the user selects any button other than a push button, that button sends a 
  5952. WM_CONTROL message.  The application can examine SHORT1FROMMP(mp1) in the 
  5953. WM_CONTROL message to find the button identifier, and can examine 
  5954. SHORT2FROMMP(mp2) to determine the notification code for the control message. 
  5955. The notification code can be one of the following: 
  5956.  
  5957. Notification Code for Button Control Messages 
  5958.  
  5959. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5960. ΓöéCode           ΓöéDescription                                  Γöé
  5961. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5962. ΓöéBN_CLICKED     ΓöéThe user selected the button.                Γöé
  5963. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5964. ΓöéBN_DBLCLICKED  ΓöéThe user double-clicked the button.          Γöé
  5965. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5966. ΓöéBN_PAINT       ΓöéA user-defined button needs to be drawn.     Γöé
  5967. Γöé               ΓöéButtons with the BS_USERBUTTON style send    Γöé
  5968. Γöé               Γöéthis notification code to instruct the owner Γöé
  5969. Γöé               Γöéwindow to draw the button control.  The      Γöé
  5970. Γöé               Γöésecond message parameter of the WM_CONTROL   Γöé
  5971. Γöé               Γöémessage contains a pointer to a USERBUTTON   Γöé
  5972. Γöé               Γöéstructure that contains the information      Γöé
  5973. Γöé               Γöénecessary for drawing the button.            Γöé
  5974. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5975.  
  5976. When the user selects a check box or radio button, the button control sends the 
  5977. WM_CONTROL message with the BN_CLICKED notification code to the owner window. 
  5978. In response, the owner window should set the display state of the button by 
  5979. sending the appropriate message back to the button. 
  5980.  
  5981. An application need not respond to WM_CONTROL messages sent by an auto-check 
  5982. box or an auto-radio button; the system automatically sets the states of these 
  5983. buttons. 
  5984.  
  5985.  
  5986. ΓòÉΓòÉΓòÉ 8.1.5. Button States ΓòÉΓòÉΓòÉ
  5987.  
  5988. An application can query and set the highlighted and checked states of its 
  5989. buttons by sending messages to them.  An application can obtain the handle of a 
  5990. button by calling WinWindowFromID, using the parent window handle and the 
  5991. identifier of the button.  In the case of a dialog window, the parent window 
  5992. would be the dialog window, and the identifier would be the button identifier 
  5993. from the dialog template. 
  5994.  
  5995. Button-control text is stored as window text.  An application can set and 
  5996. retrieve this text by using the WinSetWindowText and WinQueryWindowText 
  5997. functions.  To set the size, position, and visibility of a button control, an 
  5998. application uses the standard window functions. 
  5999.  
  6000.  
  6001. ΓòÉΓòÉΓòÉ 8.1.6. Custom Buttons ΓòÉΓòÉΓòÉ
  6002.  
  6003. An application can customize the appearance of a button by using the 
  6004. BS_USERBUTTON style in combination with other button styles.  The owner window 
  6005. receives WM_CONTROL messages for these custom buttons whenever they must be 
  6006. drawn, highlighted, or disabled. 
  6007.  
  6008. When a button must be drawn, the owner window receives a WM_CONTROL message 
  6009. with the high word of the first parameter equal to BN_PAINT.  The second 
  6010. parameter is a pointer to a USERBUTTON structure that contains information the 
  6011. application needs to draw the button. 
  6012.  
  6013. An application uses the hwnd member of the USERBUTTON structure in a call to 
  6014. the WinQueryWindowRect function to find the bounding rectangle for the button. 
  6015. The hps member is used as a presentation space for any drawing.  The fsState 
  6016. member contains flags that tell an application how to draw the button: 
  6017. highlighted, unhighlighted, or disabled.  The fsStateOld member contains flags 
  6018. that describe the current highlighted, unhighlighted, or disabled state of the 
  6019. button. 
  6020.  
  6021.  
  6022. ΓòÉΓòÉΓòÉ 8.2. Using Button Controls ΓòÉΓòÉΓòÉ
  6023.  
  6024. This section explains how to perform the following tasks: 
  6025.  
  6026. o Create a dialog template for a button resource. 
  6027. o Create a button for a client window. 
  6028.  
  6029. An application creates a group by setting the WS_GROUP style bit for the first 
  6030. member of the group. 
  6031.  
  6032.  
  6033. ΓòÉΓòÉΓòÉ 8.2.1. Using Buttons in a Dialog Window ΓòÉΓòÉΓòÉ
  6034.  
  6035. You can define dialog-window buttons as part of a dialog template in a 
  6036. resource-definition file, as shown in the following Resource Compiler 
  6037. source-code fragment: 
  6038.  
  6039.  
  6040. DefiningDialog - WindowButtonsinaDialogTemplate
  6041.  
  6042.  
  6043.     DLGTEMPLATE IDD_BUTTON
  6044.     BEGIN
  6045.         DIALOG  "", 2, 10, 10, 235, 180, WS_VISIBLE, FCF_DLGBORDER
  6046.         BEGIN
  6047.             AUTORADIOBUTTON "Radio~1", ID_RADIO1, 15, 80, 45, 12, WS_GROUP
  6048.             AUTORADIOBUTTON "Radio~2", ID_RADIO2, 15, 60, 45, 12
  6049.             AUTORADIOBUTTON "Radio~3", ID_RADIO3, 15, 40, 45, 12
  6050.             AUTORADIOBUTTON "Radio~4", ID_RADIO4, 15, 20, 45, 12
  6051.  
  6052.             PUSHBUTTON "Button 1", ID_PUSH1,  20  100, 50, 14, WS_GROUP
  6053.             PUSHBUTTON "Button 2", ID_PUSH2,  75, 100, 50, 14, WS_GROUP
  6054.             PUSHBUTTON "Button 3", ID_PUSH3, 130, 100, 50, 14, WS_GROUP
  6055.  
  6056.             CHECKBOX "Check Box 1",     ID_CHECK1, 150, 65, 65, 12, WS_GROUP
  6057.             CHECKBOX "no toggle",       ID_CHECK2, 150, 40, 58, 12, WS_GROUP
  6058.             AUTOCHECKBOX "Check Box 3", ID_CHECK3, 150, 20, 65, 12, WS_GROUP
  6059.  
  6060.             DEFPUSHBUTTON "OK",         DID_OK,     75, 26, 46, 20, WS_GROUP
  6061.         END
  6062.     END
  6063.  
  6064. Each button in a dialog window has an identifier (for example, ID_RADIO1) that 
  6065. allows an application to identify the source of the WM_COMMAND and WM_CONTROL 
  6066. messages.  An application can use the identifier as the second argument of the 
  6067. WinWindowFromID function to retrieve the button-window handle. 
  6068.  
  6069. The dialog template also contains the text for each button.  For push buttons, 
  6070. this text is displayed in a rectangular box.  If the text is too long to fit in 
  6071. the box, the text is clipped.  For radio buttons and check boxes, text is 
  6072. displayed to the right of the button.  A user selects the button by clicking 
  6073. either the button or the text itself. 
  6074.  
  6075. The WS_GROUP style identifies the beginning of each new group of buttons.  In 
  6076. the preceding example, the four auto-radio buttons are in the same group, and 
  6077. each of the other buttons is in its own group.  The auto-radio buttons in the 
  6078. first group can be selected one at a time only.  An application must ensure 
  6079. that only one check box in a group is selected at a time.  The order in which 
  6080. items can be selected in the group can wrap around from the end of the item 
  6081. list to its beginning. 
  6082.  
  6083. Notice that the DEFPUSHBUTTON style in the preceding example has the identifier 
  6084. DID_OK. It is customary to include an OK button with this identifier in most 
  6085. dialog windows to provide a uniform user interface. The DEFPUSHBUTTON style 
  6086. draws a thick border around a button and allows a user to select the button by 
  6087. pressing the spacebar. 
  6088.  
  6089. The dialog-window procedure for a dialog window that contains buttons must 
  6090. respond to WM_COMMAND and WM_CONTROL messages. A common strategy is to use 
  6091. auto-radio buttons and auto-check boxes to let the user set a list of 
  6092. capabilities for a command, and, then, let the user execute the command by 
  6093. choosing an OK push button.  With this strategy, the dialog-window procedure 
  6094. ignores all WM_CONTROL messages that come from auto-radio buttons and 
  6095. auto-check boxes.  When the dialog-window procedure receives a WM_COMMAND 
  6096. message for the OK push button, the procedure should query the auto-radio 
  6097. buttons and auto-check boxes to determine which options have been selected. 
  6098.  
  6099.  
  6100. ΓòÉΓòÉΓòÉ 8.2.2. Using Buttons in a Client Window ΓòÉΓòÉΓòÉ
  6101.  
  6102. An application can create a button control using an application client window 
  6103. as the owner.  The following code fragment shows how an application can use 
  6104. buttons in client windows: 
  6105.  
  6106.  
  6107. CreatingaButtonControlforaClientWindow
  6108.  
  6109.     #define ID_PBWINDOW 110
  6110.     HWND hwndButton,hwndClient;
  6111.  
  6112.     /* Create a button window. */
  6113.     hwndButton = WinCreateWindow(hwndClient,   /* Parent window  */
  6114.         WC_BUTTON,                             /* Class window   */
  6115.         "Test Button"                          /* Button text    */
  6116.         WS_VISIBLE |                           /* Visible style  */
  6117.         BS_PUSHBUTTON,                         /* Button style   */
  6118.         10, 10,                                /* x, y           */
  6119.         70, 60,                                /* cx, cy         */
  6120.         hwndClient,                            /* Owner window   */
  6121.         HWND_TOP,                              /* Top of z-order */
  6122.         ID_PBWINDOW,                           /* Identifier     */
  6123.         NULL,                                  /* Control data   */
  6124.         NULL);                                 /* parameters     */
  6125.  
  6126. Once created in the client window, the button control posts a WM_COMMAND 
  6127. message or sends a WM_CONTROL message to the client-window procedure.  This 
  6128. window procedure should examine the message identifier to determine which 
  6129. button posted or sent the message. 
  6130.  
  6131. An application that has client-window buttons can move and size the buttons 
  6132. when the client window receives a WM_SIZE message.  An application can move and 
  6133. size a window by using the WinSetWindowPos function.  An application can obtain 
  6134. a window handle for a button control by calling the WinWindowFromID function, 
  6135. specifying the handle of the parent window and the window identifier for each 
  6136. button. 
  6137.  
  6138.  
  6139. ΓòÉΓòÉΓòÉ 8.3. Summary ΓòÉΓòÉΓòÉ
  6140.  
  6141. Following are the OS/2 functions, structures, and messages used with button 
  6142. controls: 
  6143.  
  6144. Button-Control Functions 
  6145.  
  6146. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6147. ΓöéFunction Name           ΓöéDescription                         Γöé
  6148. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6149. ΓöéWinCreateWindow         ΓöéCreates a new window.               Γöé
  6150. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6151. ΓöéWinQueryWindowText      ΓöéCopies window text into a buffer.   Γöé
  6152. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6153. ΓöéWinSetWindowText        ΓöéSets the window text for the        Γöé
  6154. Γöé                        Γöéspecified window.                   Γöé
  6155. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6156. ΓöéWinWindowFromID         ΓöéReturns the handle of the child     Γöé
  6157. Γöé                        Γöéwindow with the specified identify. Γöé
  6158. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6159.  
  6160. Button-Control Structure 
  6161.  
  6162. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6163. ΓöéStructure Name          ΓöéDescription                         Γöé
  6164. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6165. ΓöéUSERBUTTON              ΓöéUser-button structure.              Γöé
  6166. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6167.  
  6168. Messages Received by a Button Control 
  6169.  
  6170. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6171. ΓöéMessage                 ΓöéDescription                         Γöé
  6172. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6173. ΓöéBM_CLICK                ΓöéApplication sends this message to   Γöé
  6174. Γöé                        Γöécause the effect of the user        Γöé
  6175. Γöé                        Γöéclicking a push button.             Γöé
  6176. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6177. ΓöéBM_QUERYCHECK           ΓöéReturns the zero-based index of a   Γöé
  6178. Γöé                        Γöéchecked radio button.               Γöé
  6179. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6180. ΓöéBM_QUERYCHECKINDEX      ΓöéReturns the zero-based index of a   Γöé
  6181. Γöé                        Γöéchecked radio button.               Γöé
  6182. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6183. ΓöéBM_QUERYHILITE          ΓöéReturns the highlighting state of a Γöé
  6184. Γöé                        Γöébutton control.                     Γöé
  6185. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6186. ΓöéBM_SETCHECK             ΓöéSets the checked state of a button  Γöé
  6187. Γöé                        Γöécontrol.                            Γöé
  6188. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6189. ΓöéBM_SETDEFAULT           ΓöéSets the default state of a button  Γöé
  6190. Γöé                        Γöécontrol.                            Γöé
  6191. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6192. ΓöéBM_SETHILITE            ΓöéSets the highlight state of a buttonΓöé
  6193. Γöé                        Γöécontrol.                            Γöé
  6194. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6195.  
  6196. Messages Generated by a Button Control 
  6197.  
  6198. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6199. ΓöéMessage                 ΓöéDescription                         Γöé
  6200. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6201. ΓöéWM_COMMAND              ΓöéOccurs when a control has a         Γöé
  6202. Γöé                        Γöésignificant event to notify to its  Γöé
  6203. Γöé                        Γöéowner, or when a keystroke has been Γöé
  6204. Γöé                        Γöétranslated by an accelerator table. Γöé
  6205. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6206. ΓöéWM_CONTROL              ΓöéOccurs when a control has a         Γöé
  6207. Γöé                        Γöésignificant event to notify to its  Γöé
  6208. Γöé                        Γöéowner.                              Γöé
  6209. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6210. ΓöéWM_CONTROLPOINTER       ΓöéSent to a control's owner window    Γöé
  6211. Γöé                        Γöéwhen the pointer moves over the     Γöé
  6212. Γöé                        Γöécontrol window, allowing the owner  Γöé
  6213. Γöé                        Γöéto set the pointer.                 Γöé
  6214. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6215. ΓöéWM_ENABLE               ΓöéSets the enable state of a window.  Γöé
  6216. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6217. ΓöéWM_HELP                 ΓöéOccurs when a control procedure doesΓöé
  6218. Γöé                        Γöénot expect to receive this message  Γöé
  6219. Γöé                        Γöéand, therefore, takes no action on  Γöé
  6220. Γöé                        Γöéit, other than to set count to the  Γöé
  6221. Γöé                        Γöédefault value of NULL.              Γöé
  6222. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6223. ΓöéWM_MATCHMNEMONIC        ΓöéSent by the dialog box to a control Γöé
  6224. Γöé                        Γöéwindow to determine whether a typed Γöé
  6225. Γöé                        Γöécharacter matches a mnemonic in its Γöé
  6226. Γöé                        Γöéwindow text.                        Γöé
  6227. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6228. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  6229. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  6230. Γöé                        Γöéconversion of DBCS characters.      Γöé
  6231. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6232. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  6233. Γöé                        Γöéthe button control window procedure Γöé
  6234. Γöé                        Γöéwindow parameters.                  Γöé
  6235. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6236. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  6237. Γöé                        Γöéchanges the button control window   Γöé
  6238. Γöé                        Γöéprocedure window parameters.        Γöé
  6239. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6240. ΓöéWM_SYSCOMMAND           ΓöéOccurs when a control window has a  Γöé
  6241. Γöé                        Γöésignificant event to notify to its  Γöé
  6242. Γöé                        Γöéowner, or when a keystroke has been Γöé
  6243. Γöé                        Γöétranslated by an accelerator table  Γöé
  6244. Γöé                        Γöéinto a WM_SYSCOMMAND.               Γöé
  6245. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6246.  
  6247.  
  6248. ΓòÉΓòÉΓòÉ 9. List-Box Controls ΓòÉΓòÉΓòÉ
  6249.  
  6250. A list box is a control window that displays several text items at a time, one 
  6251. or more of which can be selected by the user.  This chapter explains how to 
  6252. create and use list-box controls in PM applications. 
  6253.  
  6254.  
  6255. ΓòÉΓòÉΓòÉ 9.1. About List Boxes ΓòÉΓòÉΓòÉ
  6256.  
  6257. An application uses a list box when it requires a list of selectable fields 
  6258. that is too large for the display area or a list of choices that can change 
  6259. dynamically.  Each list item contains a text string and a handle.  Usually, the 
  6260. text string is displayed in the list-box window; but the handle is available to 
  6261. the application to reference other data associated with each of the items in 
  6262. the list. 
  6263.  
  6264. A list box always is owned by another window that receives messages from the 
  6265. list box when events occur, such as when a user selects an item from the list 
  6266. box.  Typically, the owner is a dialog window (as shown in the following 
  6267. figure,) or the client window of an application frame window.  The client- or 
  6268. dialog-window procedure defined by the application responds to messages sent 
  6269. from the list box. 
  6270.  
  6271. List Box in a Dialog Box 
  6272.  
  6273. A list box always contains a scroll bar for use when the list box contains more 
  6274. items than can be displayed in the list-box window. The list box responds to 
  6275. mouse clicks in the scroll bar by scrolling the list; otherwise, the scroll bar 
  6276. is disabled. 
  6277.  
  6278. The maximum number of items permitted in a list box is 32767. 
  6279.  
  6280.  
  6281. ΓòÉΓòÉΓòÉ 9.2. Using List Boxes ΓòÉΓòÉΓòÉ
  6282.  
  6283. An application uses a list-box control to display a list in a window.  List 
  6284. boxes can be displayed in standard application windows, although they are more 
  6285. commonly used in dialog windows.  In either case, notification messages are 
  6286. sent from the list box to its owner window, enabling the application to respond 
  6287. to user actions in the list. 
  6288.  
  6289. Once a list box is created, the application controls the insertion and deletion 
  6290. of list items.  Items can be inserted at the end of the list, automatically 
  6291. sorted into the list, or inserted at a specified index position.  Applications 
  6292. can turn list drawing on and off to speed up the process of inserting numerous 
  6293. items into a list. 
  6294.  
  6295. The owner-window procedure of the list box receives messages when a user 
  6296. manipulates the list-box data.  Most default list actions (for example, 
  6297. highlighting selections and scrolling) are handled automatically by the list 
  6298. box itself.  The application controls the responses when the user chooses an 
  6299. item in the list, either by double-clicking the item or by pressing Enter after 
  6300. an item is highlighted.  The list box also notifies the application when the 
  6301. user changes the selection or scrolls the list. 
  6302.  
  6303. Normally, list items are text strings drawn by a list box. An application also 
  6304. can draw and highlight the items in a list.  This enables the application to 
  6305. create customized lists that contain graphics.  When an application creates a 
  6306. list box with the LS_OWNERDRAW style, the owner of the list box receives a 
  6307. WM_DRAWITEM message for each item that should be drawn or highlighted.  This is 
  6308. similar to the owner-drawn style for menus, except that the owner-drawn style 
  6309. applies to the entire list rather than to individual items. 
  6310.  
  6311.  
  6312. ΓòÉΓòÉΓòÉ 9.2.1. Creating a List-Box Window ΓòÉΓòÉΓòÉ
  6313.  
  6314. List boxes are WC_LISTBOX class windows and are predefined by the system. 
  6315. Applications can create list boxes by calling WinCreateWindow, using WC_LISTBOX 
  6316. as the window-class parameter. 
  6317.  
  6318. A list box passes notification messages to its owner window, so an application 
  6319. uses its client window, rather than the frame window, as the owner of the list. 
  6320. The client-window procedure receives the messages sent from the list box. 
  6321.  
  6322. For example, to create a list box that completely fills the client area of a 
  6323. frame window, an application would make the client window the owner and parent 
  6324. of the list-box window, and make the list-box window the same size as the 
  6325. client window.  This is shown in the following code fragment. 
  6326.  
  6327.     #define ID_LISTWINDOW   250
  6328.  
  6329.     HWND hwndClient,hwndList;
  6330.     RECTL rcl;
  6331.  
  6332.     /* How big is the client window? */
  6333.     WinQueryWindowRect(hwndClient, &rcl);
  6334.  
  6335.     /* Make a list-box window.       */
  6336.     hwndList = WinCreateWindow(hwndClient,    /* Parent       */
  6337.         WC_LISTBOX,                           /* Class        */
  6338.         "",                                   /* Name         */
  6339.         WS_VISIBLE | LS_NOADJUSTPOS,          /* Style        */
  6340.         0, 0,                                 /* x, y         */
  6341.         rcl.xRight, rcl.yTop,                 /* cx, cy       */
  6342.         hwndClient,                           /* Owner        */
  6343.         HWND_TOP,                             /* Behind       */
  6344.         ID_LISTWINDOW,                        /* ID           */
  6345.         NULL,                                 /* Control data */
  6346.         NULL);                                /* parameters   */
  6347.  
  6348. Because the list box draws its own border, and a frame-window border already 
  6349. surrounds the client area of a frame window due to the adjacent frame controls, 
  6350. the effect is a double-thick border around the list box.  You can change this 
  6351. effect by calling WinInflateRect to overlap the list-box border with the 
  6352. surrounding frame-window border, resulting in only one list-box border. 
  6353.  
  6354. Notice that the code specifies the list-box window style LS_NOADJUSTPOS.  This 
  6355. ensures that the list box is created exactly the specified size.  If the 
  6356. LS_NOADJUSTPOS style is not specified, the list-box height is rounded down, if 
  6357. necessary, to make it a multiple of the item height.  Enabling a list box to 
  6358. adjust its height automatically is useful for preventing partial items being 
  6359. displayed at the bottom of a list box. 
  6360.  
  6361.  
  6362. ΓòÉΓòÉΓòÉ 9.2.2. Using a List Box in a Dialog Window ΓòÉΓòÉΓòÉ
  6363.  
  6364. List boxes most commonly are used in dialog windows.  A list box in a dialog 
  6365. box is a control window, like a push button or an entry field.  Typically, the 
  6366. application defines a list box as one item in a dialog template in the 
  6367. resource-definition file, as shown in the following resource compiler 
  6368. source-code fragment. 
  6369.  
  6370.  
  6371.     DLGTEMPLATE IDD_OPEN
  6372.     BEGIN
  6373.        DIALOG "Open...", IDD_OPEN, 35, 35, 150, 135,
  6374.                 FS_DLGBORDER, FCF_TITLEBAR
  6375.           BEGIN
  6376.               LISTBOX        IDD_FILELIST, 15, 15, 90, 90
  6377.               PUSHBUTTON     "Drive", IDD_DRIVEBUTTON, 115, 70, 30, 14
  6378.               DEFPUSHBUTTON  "Open", IDD_OPENBUTTON, 115, 40, 30, 14
  6379.               PUSHBUTTON     "Cancel", IDD_CANCELBUTTON, 115, 15, 30, 14
  6380.           END
  6381.     END
  6382.  
  6383. Once the dialog resource is defined, the application loads and displays the 
  6384. dialog box as it would normally.  The application inserts items into the list 
  6385. when processing the WM_INITDLG message. 
  6386.  
  6387. A dialog window with a list box usually has an OK button.  The user can select 
  6388. items in the list, and then indicate a final selection by double-clicking, 
  6389. pressing Enter, or clicking the OK button.  When the dialog-window procedure 
  6390. receives a message indicating that the user has clicked the OK button, it 
  6391. queries the list box to determine the current selection (or selections, if the 
  6392. list allows multiple selections), and then responds as though it had received a 
  6393. WM_CONTROL message with the LN_ENTER notification code. 
  6394.  
  6395.  
  6396. ΓòÉΓòÉΓòÉ 9.2.3. Adding or Deleting an Item in a List Box ΓòÉΓòÉΓòÉ
  6397.  
  6398. Applications can add or delete an item in a list box by sending an 
  6399. LM_INSERTITEM or LM_DELETEITEM message to the list-box window.  Items in a list 
  6400. are specified with a 0-based index (beginning at the top of the list).  A new 
  6401. list is created empty; then, the application initializes the list by inserting 
  6402. items. 
  6403.  
  6404. The application specifies the text and position for each new item.  It can 
  6405. specify an absolute-position index or one of the following predefined index 
  6406. values: 
  6407.  
  6408. List Item Position Index 
  6409.  
  6410. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6411. ΓöéValue                   ΓöéMeaning                             Γöé
  6412. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6413. ΓöéLIT_END                 ΓöéInsert item at end of list.         Γöé
  6414. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6415. ΓöéLIT_SORTASCENDING       ΓöéInsert item alphabetically ascendingΓöé
  6416. Γöé                        Γöéinto list.                          Γöé
  6417. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6418. ΓöéLIT_SORTDESCENDING      ΓöéInsert item alphabetically          Γöé
  6419. Γöé                        Γöédescending into list.               Γöé
  6420. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6421.  
  6422. The application must send an LM_DELETEITEM message and supply the 
  6423. absolute-position index of the item when deleting items from a list.  The 
  6424. LM_DELETEALL message deletes all items in a list. 
  6425.  
  6426. One way an application can speed up the insertion of list items is to suspend 
  6427. drawing until it has finished inserting items.  This is a particularly valuable 
  6428. approach when using a sorted insertion process (when inserting one item can 
  6429. cause rearrangement of the entire list).  You can turn off list drawing by 
  6430. calling WinEnableWindowUpdate, specifying FALSE for the enable parameter, and 
  6431. then calling WinShowWindow.  This forces a total update when insertion is 
  6432. complete.  The following code fragment illustrates this concept: 
  6433.  
  6434.     HWND hwndFileList;
  6435.  
  6436.     /* Disable updates while filling the list. */
  6437.     WinEnableWindowUpdate(hwndFileList, FALSE);
  6438.         .
  6439.         . /* Send LM_INSERTITEM messages to insert all new items.    */
  6440.         .
  6441.  
  6442.     /* Now cause the window to update and show the new information.  */
  6443.     WinShowWindow(hwndFileList, TRUE);
  6444.  
  6445. Notice that this optimization is unnecessary if an application is adding list 
  6446. items while processing a WM_INITDLG message, because the list box is not 
  6447. visible, and the list-box routines are internally optimized. 
  6448.  
  6449.  
  6450. ΓòÉΓòÉΓòÉ 9.2.4. Responding to a User Selection in a List Box ΓòÉΓòÉΓòÉ
  6451.  
  6452. When a user chooses an item in a list, the primary notification an application 
  6453. receives is a WM_CONTROL message, with the LN_ENTER control code sent to the 
  6454. owner window of the list.  Within the window procedure for the owner window, 
  6455. the application responds to the LN_ENTER control code by querying the list box 
  6456. for the current selection (or selections, in the case of an LS_MULTIPLESEL or 
  6457. LS_EXTENDEDSEL list box). 
  6458.  
  6459. The LN_ENTER control code notifies the application that the user has selected a 
  6460. list item.  A WM_CONTROL message with an LN_SELECT control code is sent to the 
  6461. list-box owner whenever a selection in a list changes, such as when a user 
  6462. moves the mouse pointer up and down a list while pressing the mouse button.  In 
  6463. this case, items are selected but not yet chosen.  An application can ignore 
  6464. LN_SELECT control codes when the selection changes, responding only when the 
  6465. item is actually chosen.  Or an application can use LN_SELECT to display 
  6466. context-dependent information that changes rapidly with each selection made by 
  6467. the user. 
  6468.  
  6469.  
  6470. ΓòÉΓòÉΓòÉ 9.2.5. Handling Multiple Selections ΓòÉΓòÉΓòÉ
  6471.  
  6472. When a list box has the style LS_MULTIPLESEL or LS_EXTENDEDSEL, the user can 
  6473. select more than one item at a time.  An application must use different 
  6474. strategies when working with these types of lists.  For example, when 
  6475. responding to an LN_ENTER control code, it is not sufficient to send a single 
  6476. LM_QUERYSELECTION message, because that message will find only the first 
  6477. selection.  To find all current selections, an application must continue 
  6478. sending LM_QUERYSELECTION messages, using the return index of the previous 
  6479. message as the starting index of the next message, until no items are returned. 
  6480.  
  6481.  
  6482. ΓòÉΓòÉΓòÉ 9.2.6. Creating an Owner-Drawn List Item ΓòÉΓòÉΓòÉ
  6483.  
  6484. To draw its own list items, an application must create a list that has the 
  6485. style LS_OWNERDRAW:  the owner window of the list box must respond to the 
  6486. WM_MEASUREITEM and WM_DRAWITEM messages. 
  6487.  
  6488. When the owner window receives a WM_MEASUREITEM message, it must return the 
  6489. height of the list item.  All items in a list must have the same height 
  6490. (greater than or equal to 1).  The WM_MEASUREITEM message is sent when the list 
  6491. box is created, and every time an item is added.  You can change the item 
  6492. height by sending an LM_SETITEMHEIGHT message to the list-box window. 
  6493.  
  6494. The owner window receives a WM_DRAWITEM message whenever an item in an 
  6495. owner-drawn list should be drawn or highlighted.  Although it is quite common 
  6496. for an owner-drawn list to draw items, it is less common to override the 
  6497. system-default method of highlighting.  (This method inverts the rectangle that 
  6498. contains the item.)  Do not create your own highlighting unless, for some 
  6499. reason, the system-default method is unacceptable to you. 
  6500.  
  6501. The WM_DRAWITEM message contains a pointer to an OWNERITEM data structure.  The 
  6502. OWNERITEM structure contains the window identifier for the list box, a 
  6503. presentation-space handle, a bounding rectangle for the item, the position 
  6504. index for the item, and the application-defined item handle.  This structure 
  6505. also contains two fields that determine whether a message draws, highlights, or 
  6506. removes the highlighting from an item.  The OWNERITEM structure has the 
  6507. following form: 
  6508.  
  6509.     typedef struct _OWNERITEM { /* oi */
  6510.         HWND    hwnd;
  6511.         HPS     hps;
  6512.         ULONG   fsState;
  6513.         ULONG   fsAttribute;
  6514.         ULONG   fsStateOld;
  6515.         ULONG   fsAttributeOld;
  6516.         RECTL   rclItem;
  6517.         LONG    idItem;
  6518.         ULONG   hItem;
  6519.     } OWNERITEM;
  6520.  
  6521. When the item must be drawn, the owner window receives a WM_DRAWITEM message 
  6522. with the fsState field set differently from the fsStateOld field.  If the owner 
  6523. window draws the item in response to this message, it returns TRUE, telling the 
  6524. system not to draw the item.  If the owner window returns FALSE, the system 
  6525. draws the item, using the default list-item drawing method. 
  6526.  
  6527. You can get the text of a list item by sending an LM_QUERYITEMTEXT message to 
  6528. the list-box window.  You should draw the item using the hps and rclItem 
  6529. arguments provided in the OWNERITEM structure. 
  6530.  
  6531. If the item being drawn is currently selected, the fsState and fsStateOld 
  6532. fields are both TRUE; they both will be FALSE if the item is not currently 
  6533. selected.  The window receiving a WM_DRAWITEM message can use this information 
  6534. to highlight the selected item at the same time it draws the item.  If the 
  6535. owner window highlights the item, it must leave the fsState and fsStateOld 
  6536. fields equal to each other.  If the system provides default highlighting for 
  6537. the item (by inverting the item rectangle), the owner window must set the 
  6538. fsState field to 1 and the fsStateOld field to 0 before returning from the 
  6539. WM_DRAWITEM message. 
  6540.  
  6541. The owner window also receives a WM_DRAWITEM message when the highlight state 
  6542. of a list item changes.  For example, when a user clicks an item, the 
  6543. highlighting must be removed from the currently selected item, and the new 
  6544. selection must be highlighted.  If these items are owner-drawn, the owner 
  6545. window receives one WM_DRAWITEM message for each unhighlighted item and one 
  6546. message for the newly highlighted item.  To highlight an item, the fsState 
  6547. field must equal TRUE, and the fsStateOld field must equal FALSE.  In this 
  6548. case, the application should highlight the item and return the fsState and 
  6549. fsStateOld fields equal to FALSE, which tells the system not to highlight the 
  6550. item.  The application also can return the fsState and fsStateOld fields with 
  6551. two different (unequal) values and the list box will highlight the item (the 
  6552. default action). 
  6553.  
  6554. To remove highlighting from an item, the fsState field must equal FALSE and the 
  6555. fsStateOld field must equal TRUE.  In this case, the application removes the 
  6556. highlighting and returns both the fsState and the fsStateOld fields equal to 
  6557. FALSE.  This tells the system not to attempt to remove the highlighting.  The 
  6558. application also can return the fsState and fsStateOld fields with two 
  6559. different (unequal) values, and the list box will remove the highlighting (the 
  6560. default response). 
  6561.  
  6562. The following code fragment shows these selection processes: 
  6563.  
  6564.     OWNERITEM *poi;
  6565.  
  6566.     case WM_DRAWITEM:
  6567.  
  6568.         /* Convert mp2 into an OWNERITEM structure pointer.                */
  6569.         poi = (POWNERITEM) PVOIDFROMMP(mp2);
  6570.  
  6571.         /* Test to see if this is drawing or highlighting/unhighlighting.  */
  6572.         if (poi->fsState != poi->fsStateOld) {
  6573.  
  6574.             /* This is either highlighting or unhighlighting.              */
  6575.             if (poi->fsState) {
  6576.                 .
  6577.                 . /* Highlight the item.                                   */
  6578.                 .
  6579.             }
  6580.             else {
  6581.                 .
  6582.                 . /* Remove the highlighting.                              */
  6583.                 .
  6584.             }
  6585.  
  6586.             /* Set fsState = fsStateOld to tell system you did it.         */
  6587.             poi->fsState = poi->fsStateOld = 0;
  6588.  
  6589.             return TRUE;  /* Tells list box you did the highlighting.      */
  6590.  
  6591.         }
  6592.         else {
  6593.             .
  6594.             . /* Draw the item.                                            */
  6595.             .
  6596.             if (poi->fsState) {   /* Checks to see if item is selected     */
  6597.                 .
  6598.                 . /* Highlight the item.                                   */
  6599.                 .
  6600.                 /* Set fsState = fsStateOld to tell system you did it.     */
  6601.            }
  6602.            return TRUE;  /* Tells list box you did the drawing.            */
  6603.         }
  6604.  
  6605.  
  6606. ΓòÉΓòÉΓòÉ 9.2.7. Default List-Box Behavior ΓòÉΓòÉΓòÉ
  6607.  
  6608. This following table lists all the messages handled by the predefined list-box 
  6609. window-class procedure. 
  6610.  
  6611. Messages Handled by WC_LISTBOX Class 
  6612.  
  6613. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6614. ΓöéMessage                 ΓöéDescription                         Γöé
  6615. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6616. ΓöéLM_DELETEALL            ΓöéDeletes all items in the list.      Γöé
  6617. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6618. ΓöéLM_DELETEITEM           ΓöéRemoves the specified item from the Γöé
  6619. Γöé                        Γöélist, redrawing the list as         Γöé
  6620. Γöé                        Γöénecessary. Returns the number of    Γöé
  6621. Γöé                        Γöéitems remaining in the list.        Γöé
  6622. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6623. ΓöéLM_INSERTITEM           ΓöéInserts a new item in the list      Γöé
  6624. Γöé                        Γöéaccording to the position           Γöé
  6625. Γöé                        Γöéinformation passed with the message.Γöé
  6626. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6627. ΓöéLM_QUERYITEMCOUNT       ΓöéReturns the number of items in the  Γöé
  6628. Γöé                        Γöélist.                               Γöé
  6629. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6630. ΓöéLM_QUERYITEMHANDLE      ΓöéReturns the specified item handle.  Γöé
  6631. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6632. ΓöéLM_QUERYITEMTEXT        ΓöéCopies the text of the specified    Γöé
  6633. Γöé                        Γöéitem to a buffer supplied by the    Γöé
  6634. Γöé                        Γöémessage sender.                     Γöé
  6635. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6636. ΓöéLM_QUERYITEMTEXTLENGTH  ΓöéReturns the text length of the      Γöé
  6637. Γöé                        Γöéspecified item.                     Γöé
  6638. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6639. ΓöéLM_QUERYSELECTION       ΓöéFor a single-selection list box,    Γöé
  6640. Γöé                        Γöéreturns the zero-based index of the Γöé
  6641. Γöé                        Γöécurrently selected item. For a      Γöé
  6642. Γöé                        Γöémultiple-selection list box, returnsΓöé
  6643. Γöé                        Γöéthe next selected item or LIT_NONE  Γöé
  6644. Γöé                        Γöéif no more items are selected.      Γöé
  6645. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6646. ΓöéLM_QUERYTOPINDEX        ΓöéReturns the zero-based index to the Γöé
  6647. Γöé                        Γöéitem currently visible at the top ofΓöé
  6648. Γöé                        Γöéthe list.                           Γöé
  6649. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6650. ΓöéLM_SEARCHSTRING         ΓöéSearches the list for a match to theΓöé
  6651. Γöé                        Γöéspecified string.                   Γöé
  6652. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6653. ΓöéLM_SELECTITEM           ΓöéSelects the specified item. If the  Γöé
  6654. Γöé                        Γöélist is a single-selection list,    Γöé
  6655. Γöé                        Γöédeselects the previous selection.   Γöé
  6656. Γöé                        ΓöéSends a WM_CONTROL message (with theΓöé
  6657. Γöé                        ΓöéLN_SELECT code) to the owner window.Γöé
  6658. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6659. ΓöéLM_SETITEMHANDLE        ΓöéSets the specified item handle.     Γöé
  6660. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6661. ΓöéLM_SETITEMHEIGHT        ΓöéSets the item height for the list.  Γöé
  6662. Γöé                        ΓöéAll items in the list have the same Γöé
  6663. Γöé                        Γöéheight.                             Γöé
  6664. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6665. ΓöéLM_SETITEMTEXT          ΓöéSets the text for the specified     Γöé
  6666. Γöé                        Γöéitem.                               Γöé
  6667. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6668. ΓöéLM_SETTOPINDEX          ΓöéShows the specified item as the top Γöé
  6669. Γöé                        Γöéitem in the list window, scrolling  Γöé
  6670. Γöé                        Γöéthe list as necessary.              Γöé
  6671. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6672. ΓöéWM_ADJUSTWINDOWPOS      ΓöéIf the list box has the style       Γöé
  6673. Γöé                        ΓöéLS_NOADJUSTPOS, makes no changes to Γöé
  6674. Γöé                        Γöéthe SWP structure and returns FALSE.Γöé
  6675. Γöé                        ΓöéOtherwise, adjusts the height of theΓöé
  6676. Γöé                        Γöélist box so that a partial item is  Γöé
  6677. Γöé                        Γöénot shown at the bottom of the list.Γöé
  6678. Γöé                        ΓöéReturns TRUE if the SWP structure isΓöé
  6679. Γöé                        Γöéchanged.                            Γöé
  6680. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6681. ΓöéWM_BUTTON2DOWN          ΓöéReturns TRUE; the message is        Γöé
  6682. Γöé                        Γöéignored.                            Γöé
  6683. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6684. ΓöéWM_BUTTON3DOWN          ΓöéReturns TRUE; the message is        Γöé
  6685. Γöé                        Γöéignored.                            Γöé
  6686. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6687. ΓöéWM_CHAR                 ΓöéProcesses virtual keys for line and Γöé
  6688. Γöé                        Γöépage scrolling. Sends an LN_ENTER   Γöé
  6689. Γöé                        Γöénotification code for the Enter key.Γöé
  6690. Γöé                        ΓöéReturns TRUE if the key is          Γöé
  6691. Γöé                        Γöéprocessed; otherwise, passes the    Γöé
  6692. Γöé                        Γöémessage to the WinDefWindowProc     Γöé
  6693. Γöé                        Γöéfunction.                           Γöé
  6694. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6695. ΓöéWM_CREATE               ΓöéCreates an empty list box with a    Γöé
  6696. Γöé                        Γöéscroll bar.                         Γöé
  6697. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6698. ΓöéWM_DESTROY              ΓöéDestroys the list and deallocates   Γöé
  6699. Γöé                        Γöéany memory allocated during its     Γöé
  6700. Γöé                        Γöéexistence.                          Γöé
  6701. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6702. ΓöéWM_ENABLE               ΓöéEnables the scroll bar if there are Γöé
  6703. Γöé                        Γöémore items than can be displayed in Γöé
  6704. Γöé                        Γöéa list-box window.                  Γöé
  6705. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6706. ΓöéWM_MOUSEMOVE            ΓöéSets the mouse pointer to the arrow Γöé
  6707. Γöé                        Γöéshape and returns TRUE to show that Γöé
  6708. Γöé                        Γöéthe message was processed.          Γöé
  6709. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6710. ΓöéWM_PAINT                ΓöéDraws the list box and its items.   Γöé
  6711. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6712. ΓöéWM_SETFOCUS             ΓöéIf the list box is gaining the      Γöé
  6713. Γöé                        Γöéfocus, creates a cursor and sends anΓöé
  6714. Γöé                        ΓöéLN_SETFOCUS notification code to theΓöé
  6715. Γöé                        Γöéowner window. If the list box is    Γöé
  6716. Γöé                        Γöélosing the focus, this message      Γöé
  6717. Γöé                        Γöédestroys the cursor and sends an    Γöé
  6718. Γöé                        ΓöéLN_KILLFOCUS notification code to   Γöé
  6719. Γöé                        Γöéthe owner window.                   Γöé
  6720. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6721. ΓöéWM_TIMER                ΓöéUses timers to control automatic    Γöé
  6722. Γöé                        Γöéscrolling that occurs when a user   Γöé
  6723. Γöé                        Γöédrags the mouse pointer outside the Γöé
  6724. Γöé                        Γöéwindow.                             Γöé
  6725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6726. ΓöéWM_SCROLL               ΓöéHandles scrolling indicated by the  Γöé
  6727. Γöé                        Γöélist-box scroll bar.                Γöé
  6728. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6729.  
  6730.  
  6731. ΓòÉΓòÉΓòÉ 9.3. Summary ΓòÉΓòÉΓòÉ
  6732.  
  6733. Following are the operating system structure, functions, and messages used with 
  6734. list boxes. 
  6735.  
  6736. List-Box Structure 
  6737.  
  6738. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6739. ΓöéStructure Name          ΓöéDescription                         Γöé
  6740. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6741. ΓöéOWNERITEM               ΓöéOwner item.                         Γöé
  6742. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6743.  
  6744. List-Box Functions 
  6745.  
  6746. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6747. ΓöéFunction Name           ΓöéDescription                         Γöé
  6748. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6749. ΓöéWinDeleteLboxItem       ΓöéDeletes the indexed item from the   Γöé
  6750. Γöé                        Γöélist box. Returns the number of     Γöé
  6751. Γöé                        Γöéitems left.                         Γöé
  6752. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6753. ΓöéWinInsertLboxItem       ΓöéInserts text into a list box at     Γöé
  6754. Γöé                        Γöéindex.  Returns the actual index    Γöé
  6755. Γöé                        Γöéwhere it was inserted.              Γöé
  6756. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6757. ΓöéWinQueryLboxCount       ΓöéReturns the number of items in the  Γöé
  6758. Γöé                        Γöélist box.                           Γöé
  6759. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6760. ΓöéWinQueryLboxItemText    ΓöéFills the buffer with the text of   Γöé
  6761. Γöé                        Γöéthe indexed item.  Returns the      Γöé
  6762. Γöé                        Γöélength of the text.                 Γöé
  6763. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6764. ΓöéWinQueryLboxItemTextLengΓöéReturns the length of the text of   Γöé
  6765. Γöé                        Γöéthe indexed item in the list box.   Γöé
  6766. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6767. ΓöéWinQueryLboxSelectedItemΓöéReturns the index of the selected   Γöé
  6768. Γöé                        Γöéitem in the list box. For single    Γöé
  6769. Γöé                        Γöéselection only.                     Γöé
  6770. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6771. ΓöéWinSetLboxItemText      ΓöéSets the text of the list box       Γöé
  6772. Γöé                        Γöéindexed item to buffer.             Γöé
  6773. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6774.  
  6775. Messages Generated by a List Box to Its Owner 
  6776.  
  6777. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6778. ΓöéMessage                 ΓöéDescription                         Γöé
  6779. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6780. ΓöéWM_CONTROL              ΓöéOccurs when a list box control has aΓöé
  6781. Γöé                        Γöésignificant event to notify to its  Γöé
  6782. Γöé                        Γöéowner.                              Γöé
  6783. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6784. ΓöéWM_DRAWITEM             ΓöéNotification sent to the owner of a Γöé
  6785. Γöé                        Γöélist box control each time an item  Γöé
  6786. Γöé                        Γöéis to be drawn.                     Γöé
  6787. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6788. ΓöéWM_MEASUREITEM          ΓöéNotification sent to the owner of a Γöé
  6789. Γöé                        Γöéspecific list box control to        Γöé
  6790. Γöé                        Γöéestablish the height and width of anΓöé
  6791. Γöé                        Γöéitem in that control.               Γöé
  6792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6793. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  6794. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  6795. Γöé                        Γöéconversion of DBCS characters.      Γöé
  6796. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6797. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  6798. Γöé                        Γöéthe list box control window         Γöé
  6799. Γöé                        Γöéparameters.                         Γöé
  6800. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6801. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  6802. Γöé                        Γöéchanges the list box control window Γöé
  6803. Γöé                        Γöéparameters.                         Γöé
  6804. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6805.  
  6806. Messages Received by a List Box 
  6807.  
  6808. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6809. ΓöéMessage                 ΓöéDescription                         Γöé
  6810. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6811. ΓöéLM_DELETEALL            ΓöéSent to a list box control to deleteΓöé
  6812. Γöé                        Γöéall the items in the list box.      Γöé
  6813. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6814. ΓöéLM_DELETEITEM           ΓöéDeletes an item from the list box   Γöé
  6815. Γöé                        Γöécontrol.                            Γöé
  6816. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6817. ΓöéLM_INSERTITEM           ΓöéInserts an item into a list box     Γöé
  6818. Γöé                        Γöécontrol.                            Γöé
  6819. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6820. ΓöéLM_QUERYITEMCOUNT       ΓöéReturns a count of the number of    Γöé
  6821. Γöé                        Γöéitems in the list box control.      Γöé
  6822. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6823. ΓöéLM_QUERYITEMHANDLE      ΓöéReturns the handle of the indexed   Γöé
  6824. Γöé                        Γöéitem of the list box control.       Γöé
  6825. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6826. ΓöéLM_QUERYITEMTEXT        ΓöéReturns the text of the specified   Γöé
  6827. Γöé                        Γöélist box item.                      Γöé
  6828. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6829. ΓöéLM_QUERYITEMTEXTLENGTH  ΓöéReturns the length of the text of   Γöé
  6830. Γöé                        Γöéthe specified list box item.        Γöé
  6831. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6832. ΓöéLM_QUERYSELECTION       ΓöéUsed to enumerate the selected item,Γöé
  6833. Γöé                        Γöéor items, in a list box.            Γöé
  6834. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6835. ΓöéLM_QUERYTOPINDEX        ΓöéObtains the index of the item       Γöé
  6836. Γöé                        Γöécurrently at the top of the list    Γöé
  6837. Γöé                        Γöébox.                                Γöé
  6838. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6839. ΓöéLM_SEARCHSTRING         ΓöéReturns the index of the list box   Γöé
  6840. Γöé                        Γöéitem whose text matches the string. Γöé
  6841. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6842. ΓöéLM_SELECTITEM           ΓöéUsed to set the selection state of  Γöé
  6843. Γöé                        Γöéan item in a list box.              Γöé
  6844. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6845. ΓöéLM_SETITEMHANDLE        ΓöéSets the handle of the specified    Γöé
  6846. Γöé                        Γöélist box item.                      Γöé
  6847. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6848. ΓöéLM_SETITEMHEIGHT        ΓöéSets the height of the items in a   Γöé
  6849. Γöé                        Γöélist box.                           Γöé
  6850. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6851. ΓöéLM_SETITEMTEXT          ΓöéSets the text into the specified    Γöé
  6852. Γöé                        Γöélist box item.                      Γöé
  6853. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6854. ΓöéLM_SETTOPINDEX          ΓöéUsed to scroll a particular item to Γöé
  6855. Γöé                        Γöéthe top of the list box.            Γöé
  6856. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6857.  
  6858.  
  6859. ΓòÉΓòÉΓòÉ 10. Combination-Box Controls ΓòÉΓòÉΓòÉ
  6860.  
  6861. A combination box is two controls in one: an entry field and a list box.  This 
  6862. chapter describes how to use combination-box controls, also called combination 
  6863. boxes and prompted entry fields, to let the user choose and edit items from a 
  6864. list in a PM application. 
  6865.  
  6866.  
  6867. ΓòÉΓòÉΓòÉ 10.1. About Combination Boxes ΓòÉΓòÉΓòÉ
  6868.  
  6869. Combination-box controls enable the user to enter data by typing in the entry 
  6870. field or by choosing from a list in the list box. The following figure is an 
  6871. example of a combination box. 
  6872.  
  6873. Combination Box 
  6874.  
  6875. A combination-box control automatically manages the interaction between the 
  6876. entry field and the list box.  For example, when the user chooses an item in 
  6877. the list box, the combination-box control displays the text for that item in 
  6878. the entry field.  Then, the user can edit the text without affecting the item 
  6879. in the list box.  When the user types a letter in the entry field, the 
  6880. combination-box control scrolls the list box contents so that items beginning 
  6881. with that letter become visible. 
  6882.  
  6883.  
  6884. ΓòÉΓòÉΓòÉ 10.1.1. Combination-Box Styles ΓòÉΓòÉΓòÉ
  6885.  
  6886. A combination box can have one of the following styles: 
  6887.  
  6888. Combination-Box Styles 
  6889.  
  6890. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6891. ΓöéStyle                   ΓöéDescription                         Γöé
  6892. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6893. ΓöéCBS_SIMPLE              ΓöéCreates a simple combination box    Γöé
  6894. Γöé                        Γöéthat always displays its list box.  Γöé
  6895. Γöé                        ΓöéThe user can enter and edit text in Γöé
  6896. Γöé                        Γöéthe entry field or choose items fromΓöé
  6897. Γöé                        Γöéthe list box.                       Γöé
  6898. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6899. ΓöéCBS_DROPDOWN            ΓöéCreates a drop-down combination box Γöé
  6900. Γöé                        Γöéthat displays its list box only if  Γöé
  6901. Γöé                        Γöéthe user clicks the drop-down icon  Γöé
  6902. Γöé                        Γöéat the right end of the entry field.Γöé
  6903. Γöé                        ΓöéThe combination-box control hides   Γöé
  6904. Γöé                        Γöéthe list box when the user clicks   Γöé
  6905. Γöé                        Γöéthe icon a second time.  In a       Γöé
  6906. Γöé                        Γöédrop-down combination box, the user Γöé
  6907. Γöé                        Γöécan enter and edit text in the entryΓöé
  6908. Γöé                        Γöéfield or choose items from the list Γöé
  6909. Γöé                        Γöébox.                                Γöé
  6910. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6911. ΓöéCBS_DROPDOWNLIST        ΓöéCreates a drop-down-list combinationΓöé
  6912. Γöé                        Γöébox that is similar to the drop-downΓöé
  6913. Γöé                        Γöécombination box, except that the    Γöé
  6914. Γöé                        Γöéuser can choose items only from the Γöé
  6915. Γöé                        Γöélist box.  The user cannot enter or Γöé
  6916. Γöé                        Γöéedit text in the entry field.       Γöé
  6917. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6918.  
  6919. For combination boxes that have the CBS_DROPDOWN or CBS_DROPDOWNLIST styles, an 
  6920. application can display the list by using the CBM_SHOWLIST message. 
  6921.  
  6922. Drop-Down Combination Box 
  6923.  
  6924. This is an example of a drop-down list box. 
  6925.  
  6926. Drop-Down List Box 
  6927.  
  6928. An application can determine whether the list is already showing by using the 
  6929. CBM_ISLISTSHOWING message. 
  6930.  
  6931. Applications also can use any of the entry-field (EM_) and list-box (LM_) 
  6932. messages with combination boxes.  Entry-field messages affect the entry field; 
  6933. list-box messages affect the list box.  For example, an application can use the 
  6934. LM_INSERTITEM message to insert items into the list box. 
  6935.  
  6936.  
  6937. ΓòÉΓòÉΓòÉ 10.1.2. Notification Codes ΓòÉΓòÉΓòÉ
  6938.  
  6939. A combination-box control sends WM_CONTROL messages containing notification 
  6940. codes to its parent window.  These notification codes are similar to those sent 
  6941. by entry-field and list-box controls.  A combination-box control sends the 
  6942. following notification codes to its owner window: 
  6943.  
  6944. Combination-Box Notification Codes 
  6945.  
  6946. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6947. ΓöéCode           ΓöéDescription                                  Γöé
  6948. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6949. ΓöéCBN_EFCHANGE   ΓöéIndicates that the text in a combination-box Γöé
  6950. Γöé               Γöéentry field has changed.                     Γöé
  6951. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6952. ΓöéCBN_EFSCROLL   ΓöéIndicates that the text in a combination-box Γöé
  6953. Γöé               Γöéentry field has been scrolled.               Γöé
  6954. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6955. ΓöéCBN_ENTER      ΓöéIndicates that a combination-box item has    Γöé
  6956. Γöé               Γöébeen selected.                               Γöé
  6957. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6958. ΓöéCBN_LBSCROLL   ΓöéIndicates that a combination-box list has    Γöé
  6959. Γöé               Γöébeen scrolled.                               Γöé
  6960. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6961. ΓöéCBN_LBSELECT   ΓöéIndicates that a combination-box list item   Γöé
  6962. Γöé               Γöéhas been selected.                           Γöé
  6963. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6964. ΓöéCBN_MEMERROR   ΓöéIndicates that the combination-box control   Γöé
  6965. Γöé               Γöécannot allocate sufficient memory.           Γöé
  6966. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6967. ΓöéCBN_SHOWLIST   ΓöéIndicates that a combination-box list has    Γöé
  6968. Γöé               Γöédropped down (is visible).                   Γöé
  6969. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6970.  
  6971.  
  6972. ΓòÉΓòÉΓòÉ 10.2. Using Combination Boxes ΓòÉΓòÉΓòÉ
  6973.  
  6974. You can create a combination box by using the WinCreateWindow function or by 
  6975. specifying a COMBOBOX statement in a dialog-window template in a resource file. 
  6976. When creating a combination box using WinCreateWindow, you must specify the 
  6977. predefined class WC_COMBOBOX.  If you do not specify a style, the function uses 
  6978. the default styles WS_GROUP, WS_TABSTOP, and WS_VISIBLE. 
  6979.  
  6980.  
  6981. ΓòÉΓòÉΓòÉ 10.3. Summary ΓòÉΓòÉΓòÉ
  6982.  
  6983. The following table lists the OS/2 messages used with combination-box controls: 
  6984.  
  6985. Messages Received by a Combination Box 
  6986.  
  6987. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6988. ΓöéMessage                 ΓöéDescription                         Γöé
  6989. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6990. ΓöéCBM_HILITE              ΓöéSets the highlighting state of the  Γöé
  6991. Γöé                        Γöéentry field control.                Γöé
  6992. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6993. ΓöéCMB_ISLISTSHOWING       ΓöéDetermines whether the list box     Γöé
  6994. Γöé                        Γöécontrol is showing.                 Γöé
  6995. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6996. ΓöéCBM_SHOWLIST            ΓöéSets the showing state of the list  Γöé
  6997. Γöé                        Γöébox control.                        Γöé
  6998. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6999.  
  7000. Message Sent From a Combination Box to Its Owner 
  7001.  
  7002. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7003. ΓöéMessage                 ΓöéDescription                         Γöé
  7004. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7005. ΓöéWM_CONTROL              ΓöéOccurs when a control has a         Γöé
  7006. Γöé                        Γöésignificant event to notify to its  Γöé
  7007. Γöé                        Γöéowner.                              Γöé
  7008. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7009.  
  7010.  
  7011. ΓòÉΓòÉΓòÉ 11. Menus ΓòÉΓòÉΓòÉ
  7012.  
  7013. A menu is a window that contains a list of items- text strings, bit maps, or 
  7014. images drawn by the application-that enables the user, by mouse or keyboard, to 
  7015. choose from these predetermined choices.  This chapter describes how to use 
  7016. menus in your PM applications. 
  7017.  
  7018.  
  7019. ΓòÉΓòÉΓòÉ 11.1. About Menus ΓòÉΓòÉΓòÉ
  7020.  
  7021. A menu always is owned by another window, usually a frame window.  When a user 
  7022. makes a choice from a menu, the menu posts a message containing the unique 
  7023. identifier for the menu item to its owner by way of the owner window's window 
  7024. procedure. 
  7025.  
  7026. Menus 
  7027.  
  7028. An application typically defines its menus using Resource Compiler, and then 
  7029. associates the menus with a frame window when the frame window is created. 
  7030. Applications also can create menus by filling in menu-template data structures 
  7031. and creating windows with the WC_MENU class.  Either way, applications can add, 
  7032. delete, or change menu items dynamically by issuing messages to menu windows. 
  7033.  
  7034.  
  7035. ΓòÉΓòÉΓòÉ 11.1.1. Menu Bar and Pull-Down Menus ΓòÉΓòÉΓòÉ
  7036.  
  7037. A typical application uses a menu bar and several pull-down submenus.  The 
  7038. pull-down submenus ordinarily are hidden, but become visible when the user 
  7039. makes selections in the menu bar.  Pull-down submenus always are attached to 
  7040. the menu bar. 
  7041.  
  7042. The menu bar is a child of the frame window; the menu bar window handle is the 
  7043. key to communicating with the menu bar and its submenus.  You can retrieve this 
  7044. handle by calling WinWindowFromID, with the handle of the parent window and the 
  7045. FID_MENU frame-control identifier.  Most messages for the menu bar and its 
  7046. submenus can be issued to the menu-bar window.  Flags in the messages tell the 
  7047. window whether to search submenus for requested menu items. 
  7048.  
  7049.  
  7050. ΓòÉΓòÉΓòÉ 11.1.2. Pop-Up Menus ΓòÉΓòÉΓòÉ
  7051.  
  7052. A pop-up menu is like a pull-down submenu, except that it is not attached to 
  7053. the menu bar; it can appear anywhere in its parent window.  A pop-up menu 
  7054. usually is associated with a portion of a window, such as the client window 
  7055. (see the following figure), or it is associated with a specific object, such as 
  7056. an icon. 
  7057.  
  7058. Pop-Up Menu 
  7059.  
  7060. A pop-up menu remains hidden until the user selects it (either by moving the 
  7061. cursor to the appropriate location and pressing Enter or clicking on the 
  7062. location with the mouse).  Typically, pop-up menus are displayed at the 
  7063. position of the cursor or mouse pointer; they provide a quick mechanism for 
  7064. selecting often-used menu items. 
  7065.  
  7066. To include a pop-up menu in an application, you first must define a menu 
  7067. resource in a resource-definition file, then load the resource using the 
  7068. WinLoadMenu or WinCreateMenu functions.  You must call WinPopupMenu to create 
  7069. the pop-up menu and display it in the parent window.  Applications typically 
  7070. call WinPopupMenu in a window procedure in response to a user-generated 
  7071. message, such as WM_BUTTON2DBLCLK or WM_CHAR. 
  7072.  
  7073. WinPopupMenu requires that you specify the pop-up menu's handle and also the 
  7074. handles of the parent and owner windows of the pop-up menu.  WinLoadMenu and 
  7075. WinCreateMenu return the handle of the pop-up menu window, but you must obtain 
  7076. the handles of the parent and owner by using the WinWindowFromID function. 
  7077.  
  7078. You determine the position of the pop-up menu in relation to its parent by 
  7079. specifying coordinates and style flags in WinPopupMenu.  The x and y 
  7080. coordinates determine the position of the lower-left corner of the menu 
  7081. relative to the lower-left corner of the parent.  The system may adjust this 
  7082. position, however, if you include the PU_HCONSTRAIN or PU_VCONSTRAIN style 
  7083. flags in the call to WinPopupMenu.  If necessary, PU_HCONSTRAIN adjusts the 
  7084. horizontal position of the menu so that its left and right edges are within the 
  7085. borders of the desktop window.  PU_VCONSTRAIN makes the same adjustments 
  7086. vertically.  Without these flags, a desktop-level pop-up menu can lie partially 
  7087. off the screen, with some items not visible nor selectable. 
  7088.  
  7089. The PU_POSITIONONITEM flag also can affect the position of the pop-up menu. 
  7090. This flag positions the pop-up menu so that, when the pop-up menu appears, the 
  7091. specified item lies directly under the mouse pointer.  Also, PU_POSITIONONITEM 
  7092. automatically selects the item.  PU_POSITIONONITEM is useful for placing the 
  7093. current menu selection under the pointer so that, if the user releases the 
  7094. mouse button without selecting a new item, the current selection remains 
  7095. unchanged. 
  7096.  
  7097. The PU_SELECTITEM flag is similar to PU_POSITIONONITEM except that it just 
  7098. selects the specified item; it does not affect the position of the menu. 
  7099.  
  7100. You can enable the user to choose an item from a pop-up menu by using the same 
  7101. mouse button that was used to display the menu.  To do this, specify the 
  7102. PU_MOUSEBUTTONn flag, where n corresponds to the mouse button used to display 
  7103. the menu.  This flag specifies the mouse buttons for the user to interact with 
  7104. a pop-up menu once it is displayed. 
  7105.  
  7106. By using the PU_MOUSEBUTTONn flag, you can enable the user to display the 
  7107. pop-up menu, select an item, and dismiss the menu, all in one operation.  For 
  7108. example, if your window procedure displays the pop-up window when the user 
  7109. double-clicks mouse button 2, specify the PU_MOUSEBUTTON2DOWN flag in the 
  7110. WinPopupMenu function.  Then, the user can display the menu with mouse button 
  7111. 2; and, while holding the button down, select an item.  When the user releases 
  7112. the button, the item is chosen and the menu dismissed. 
  7113.  
  7114.  
  7115. ΓòÉΓòÉΓòÉ 11.1.3. System Menu ΓòÉΓòÉΓòÉ
  7116.  
  7117. The system menu in the upper-left corner of a standard frame window is 
  7118. different from the menus defined by the application.  The system menu is 
  7119. controlled and defined almost exclusively by the system; your only decision 
  7120. about it is whether to include it when creating a frame window.  (It is unusual 
  7121. for a frame window not to include a system menu.)  The system menu generates 
  7122. WM_SYSCOMMAND messages instead of WM_COMMAND messages.  Most applications 
  7123. simply use the default behavior for WM_SYSCOMMAND messages, although 
  7124. applications can add, delete, and change system-menu entries. 
  7125.  
  7126.  
  7127. ΓòÉΓòÉΓòÉ 11.1.4. Menu Items ΓòÉΓòÉΓòÉ
  7128.  
  7129. All menus can contain two main types of menu items: command items and submenu 
  7130. items.  When the user chooses a command item, the menu immediately posts a 
  7131. message to the parent window.  When the user selects a submenu item, the menu 
  7132. displays a submenu from which the user may choose another item.  Since a 
  7133. submenu window also can contain a submenu item, submenus can originate from 
  7134. other submenus. 
  7135.  
  7136. When the user chooses a command item from a menu, the menu system posts a 
  7137. WM_COMMAND, WM_SYSCOMMAND, or WM_HELP message to the owner window, depending on 
  7138. the style bits of the menu item. 
  7139.  
  7140. Applications can change the attributes, style, and contents of menu items, and 
  7141. insert and delete items at run time, to reflect changes in the command 
  7142. environment.  An application also can add items to or delete items from the 
  7143. menu bar, a pop-up menu, or a submenu.  For example, an application might 
  7144. maintain a menu of the fonts currently available in the system.  This 
  7145. application would use graphics programming interface (GPI) calls to determine 
  7146. which fonts were available and, then, insert a menu item for each font into a 
  7147. submenu.  Furthermore, the application might set the check-mark attribute of 
  7148. the menu item for the currently chosen font.  When the user chose a new font, 
  7149. the application would remove the check-mark attribute from the previous choice 
  7150. and add it to the new choice. 
  7151.  
  7152.  
  7153. ΓòÉΓòÉΓòÉ 11.1.4.1. The Help Item ΓòÉΓòÉΓòÉ
  7154.  
  7155. To present a standard interface to the novice user, all applications must have 
  7156. a Help item in their menu bars.  The Help item is defined with a particular 
  7157. style, attributes, and position in the menu.  When the user chooses the Help 
  7158. item, the menu posts a WM_HELP message to the owner window, enabling the 
  7159. application to respond appropriately. 
  7160.  
  7161. The item should read Help, have an identifier of 0, and have the 
  7162. MIS_BUTTONSEPARATOR or MIS_HELP item styles.  The Help menu item should be the 
  7163. last item in the menu template, so that it is displayed as the rightmost item 
  7164. in the menu bar. 
  7165.  
  7166. If an application uses the system default accelerator table, the user can 
  7167. select the Help item using either a mouse or the F1 key. 
  7168.  
  7169.  
  7170. ΓòÉΓòÉΓòÉ 11.1.4.2. Menu-Item Styles ΓòÉΓòÉΓòÉ
  7171.  
  7172. All menu items have a combination of style bits that determine what kind of 
  7173. data the item contains and what kind of message it generates when the user 
  7174. selects it.  For example, a menu item can have the MIS_TEXT, MIS_BITMAP, or 
  7175. other styles that specify the visual representation of the menu item on the 
  7176. screen.  Other styles determine what kinds of messages the item sends to its 
  7177. owner and whether the owner draws the item.  Menu-item styles typically do not 
  7178. change during program execution, but you can query and set them dynamically by 
  7179. sending MM_QUERYITEM and MM_SETITEM messages with the menu-item identifier to 
  7180. the menu-bar window.  For text menu items (MIS_TEXT), an MM_SETITEMTEXT message 
  7181. sets the text.  The MM_QUERYITEMTEXT message queries the text of the item.  For 
  7182. non-text menu items, the hItem field of the MENUITEM structure typically 
  7183. contains the handle of a display object, such as a bit-map handle for 
  7184. MIS_BITMAP menu items. 
  7185.  
  7186. An application can draw a menu item by setting the style MIS_OWNERDRAW for the 
  7187. menu item.  This usually is done by specifying the MIS_OWNERDRAW style for the 
  7188. menu item in the resource-definition file; but it also can be done at run time. 
  7189. When the application draws a menu item, it must respond to messages from the 
  7190. menu each time the item must be drawn. 
  7191.  
  7192.  
  7193. ΓòÉΓòÉΓòÉ 11.1.4.3. Menu-Item Attributes ΓòÉΓòÉΓòÉ
  7194.  
  7195. Menu items have attributes that determine how the items are displayed and 
  7196. whether or not the user can choose them.  An application can set and query 
  7197. menu-item attributes by sending MM_SETITEMATTR and MM_QUERYITEMATTR messages, 
  7198. with the menu-item identifier, to the menu-bar window.  If the specified item 
  7199. is in a submenu, there are two methods of determining its attributes.  The 
  7200. first is to send MM_SETITEMATTR and MM_QUERYITEMATTR messages to the top-level 
  7201. menu, specifying the identifier of the item and setting a flag so that the 
  7202. message searches all submenus for the item.  Then, you can retrieve the handle 
  7203. of the menu-bar by calling WinWindowFromID, with the handle of the frame window 
  7204. and the FID_MENU frame-control identifier. 
  7205.  
  7206. The second method, which is more efficient if you want to either work with more 
  7207. than one submenu item or set the same item several times, involves two steps: 
  7208.  
  7209.  1. Send an MM_QUERYITEM message to the menu, with the identifier of the 
  7210.     submenu.  The updated MENUITEM structure contains the window handle of the 
  7211.     submenu. 
  7212.  
  7213.  2. Send an MM_QUERYITEMATTR (or MM_SETITEMATTR) message to the submenu window, 
  7214.     specifying the identifier of the item in the submenu. 
  7215.  
  7216.  
  7217. ΓòÉΓòÉΓòÉ 11.1.4.4. Menu-Item Structure ΓòÉΓòÉΓòÉ
  7218.  
  7219. A single menu item is defined by the MENUITEM data structure.  This structure 
  7220. is used with the MM_INSERTITEM message to insert items in a menu or to query 
  7221. and set item characteristics with the MM_QUERYITEM and MM_SETITEM messages. 
  7222. The MENUITEM structure has the following form: 
  7223.  
  7224.     typedef struct _MENUITEM { /* mi */
  7225.         SHORT  iPosition;
  7226.         USHORT afStyle;
  7227.         USHORT afAttribute;
  7228.         USHORT id;
  7229.         HWND   hwndSubMenu;
  7230.         ULONG  hItem;
  7231.     } MENUITEM;
  7232.  
  7233. You can derive the values of most of the fields in this structure directly from 
  7234. the resource-definition file.  However, the last field in the structure, hItem, 
  7235. depends on the style of the menu item. 
  7236.  
  7237. The iPosition field specifies the ordinal position of the item within its menu 
  7238. window.  If the item is part of the menu bar, iPosition specifies its relative 
  7239. left-to-right position, with 0 being the leftmost item.  If the item is part of 
  7240. a submenu, iPosition specifies its relative top-to-bottom and left-to-right 
  7241. positions, with 0 being the upper-left item.  An item with the 
  7242. MIS_BREAKSEPARATOR style in a pull-down menu causes a new column to begin. 
  7243.  
  7244. The afStyle field contains the style bits of the item.  The afAttribute field 
  7245. contains the attribute bits. 
  7246.  
  7247. The id field contains the menu-item identifier.  The identifier should be 
  7248. unique but does not have to be.  Just remember that, when multiple items have 
  7249. the same identifier, they post the same command number in the WM_COMMAND, 
  7250. WM_SYSCOMMAND, and WM_HELP messages.  Also, any message that specifies a menu 
  7251. item with a non-unique identifier will find the first item that has that 
  7252. identifier. 
  7253.  
  7254. The hwndSubMenu field contains the window handle of a submenu window (if the 
  7255. item is a submenu item).  The hwndSubMenu field is NULL for command items. 
  7256.  
  7257. The hItem field contains a handle to the display object for the item, unless 
  7258. the item has the MIS_TEXT style, in which case, hItem is 0.  For example, a 
  7259. menu item with the MIS_BITMAP style has an hItem field that is equal to its 
  7260. bit-map handle. 
  7261.  
  7262.  
  7263. ΓòÉΓòÉΓòÉ 11.1.5. Menu Access ΓòÉΓòÉΓòÉ
  7264.  
  7265. The OS/2 operating system is designed to work with or without a mouse or other 
  7266. pointing device.  The system provides default behavior that enables a user to 
  7267. interact with menus without a mouse.  Following are the keystrokes that produce 
  7268. this default behavior: 
  7269.  
  7270. Keystroke Menu Access 
  7271.  
  7272. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7273. ΓöéKeystroke      ΓöéAction                                       Γöé
  7274. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7275. ΓöéAlt            ΓöéToggles in and out of menu-bar mode.         Γöé
  7276. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7277. ΓöéAlt+Spacebar   ΓöéShows the system menu.                       Γöé
  7278. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7279. ΓöéF10            ΓöéBacks up one level. If a submenu is          Γöé
  7280. Γöé               Γöédisplayed, it is canceled. If no submenu is  Γöé
  7281. Γöé               Γöédisplayed, this keystroke exits the menu.    Γöé
  7282. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7283. ΓöéShift+Esc      ΓöéShows the system menu.                       Γöé
  7284. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7285. ΓöéRight Arrow    ΓöéCycles to the next top-level menu item. If   Γöé
  7286. Γöé               Γöéthe selected item is at the far-left side of Γöé
  7287. Γöé               Γöéthe menu, the menu code sends a WM_NEXTMENU  Γöé
  7288. Γöé               Γöémessage to the frame window. The default     Γöé
  7289. Γöé               Γöéprocessing by the frame window is to cycle   Γöé
  7290. Γöé               Γöébetween the application and system menus. (AnΓöé
  7291. Γöé               Γöéapplication can modify this behavior by      Γöé
  7292. Γöé               Γöésubclassing the frame window.) If the        Γöé
  7293. Γöé               Γöéselected item is in a submenu, the next      Γöé
  7294. Γöé               Γöécolumn in the submenu is selected, or the    Γöé
  7295. Γöé               Γöénext top-level menu item is selected; this   Γöé
  7296. Γöé               Γöékeystroke also can send or process a         Γöé
  7297. Γöé               ΓöéWM_NEXTMENU message.                         Γöé
  7298. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7299. ΓöéLeft Arrow     ΓöéWorks like the Right Arrow key, except in theΓöé
  7300. Γöé               Γöéopposite direction. In submenus, this        Γöé
  7301. Γöé               Γöékeystroke backs up one column, except when   Γöé
  7302. Γöé               Γöéthe currently selected item is in the        Γöé
  7303. Γöé               Γöéfar-left column, in which case the previous  Γöé
  7304. Γöé               Γöésubmenu is selected.                         Γöé
  7305. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7306. ΓöéUp Arrow or    ΓöéWhen pressed in a top-level menu, activates aΓöé
  7307. ΓöéDown Arrow     Γöésubmenu. When pressed in a submenu, this     Γöé
  7308. Γöé               Γöékeystroke selects the previous or next or    Γöé
  7309. Γöé               Γöéitem, respectively.                          Γöé
  7310. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7311. ΓöéEnter          ΓöéActivates a submenu, and highlights the firstΓöé
  7312. Γöé               Γöéitem if an item has a submenu associated withΓöé
  7313. Γöé               Γöéit; otherwise, this keystroke chooses the    Γöé
  7314. Γöé               Γöéitem as though the user released the mouse   Γöé
  7315. Γöé               Γöébutton while the item was selected.          Γöé
  7316. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7317. ΓöéAlphabetic     ΓöéSelects the first menu item with the         Γöé
  7318. Γöécharacter      Γöéspecified character as its mnemonic key. A   Γöé
  7319. Γöé               Γöémnemonic is defined for a menu item by       Γöé
  7320. Γöé               Γöéplacing a tilde (~) before the character in  Γöé
  7321. Γöé               Γöéthe menu text. If the selected item has a    Γöé
  7322. Γöé               Γöésubmenu associated with it, the menu is      Γöé
  7323. Γöé               Γöédisplayed, and the first item is highlighted;Γöé
  7324. Γöé               Γöéotherwise, the item is chosen.               Γöé
  7325. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7326.  
  7327. An application does not support the default keyboard behavior with any unusual 
  7328. code; instead, the application receives a message when a menu item is chosen by 
  7329. the keyboard just as though it had been chosen by a mouse. 
  7330.  
  7331.  
  7332. ΓòÉΓòÉΓòÉ 11.1.5.1. Mnemonics ΓòÉΓòÉΓòÉ
  7333.  
  7334. Adding mnemonics to menu items is one way of providing the user with keyboard 
  7335. access to menus.  You can indicate a mnemonic keystroke for a menu item by 
  7336. preceding a character in the item text with a tilde, as in ~nFile. Then, the 
  7337. user can choose that item by pressing the mnemonic key when the menu is active. 
  7338. The following figure shows the result on screen. 
  7339.  
  7340. Examples of Mnemonics 
  7341.  
  7342. The menu bar is active when the user presses and releases the Alt key, and the 
  7343. first item in the menu bar is highlighted. A pop-up or pull-down menu is active 
  7344. when it is open. 
  7345.  
  7346.  
  7347. ΓòÉΓòÉΓòÉ 11.1.5.2. Accelerators ΓòÉΓòÉΓòÉ
  7348.  
  7349. In addition to mnemonics, a menu item can have an associated keyboard 
  7350. accelerator.  Accelerators are different from mnemonics in that the menu need 
  7351. not be active for the accelerator key to work.  If you have associated a menu 
  7352. item with a keyboard accelerator, display the accelerator to the right of the 
  7353. menu item.  Do this in the resource-definition file by placing a tab character 
  7354. (\t) in the menu text before the characters that will be displayed on the 
  7355. right.  For example, if the Close item had the F3 function key as its keyboard 
  7356. accelerator, the text for the item would be Close\tF3. 
  7357.  
  7358.  
  7359. ΓòÉΓòÉΓòÉ 11.2. Using Menus ΓòÉΓòÉΓòÉ
  7360.  
  7361. This section explains how to perform the following tasks: 
  7362.  
  7363. o Define menu items in a resource file. 
  7364. o Include a menu bar in a standard window. 
  7365. o Create a pop-up menu. 
  7366. o Add a menu to a dialog window. 
  7367. o Access the system menu. 
  7368. o Respond to a the menu choice of a user. 
  7369. o Set and query menu-item attributes. 
  7370. o Add and delete menu items. 
  7371. o Create a custom menu item. 
  7372.  
  7373.  
  7374. ΓòÉΓòÉΓòÉ 11.2.1. Defining Menu Items in a Resource File ΓòÉΓòÉΓòÉ
  7375.  
  7376. Typically, a menu resource represents the menu bar or pop-up menu and all the 
  7377. related submenus.  A menu-item definition is organized as shown in the 
  7378. following code: 
  7379.  
  7380.  
  7381.     MENUITEM item text, item identifier, item style, item attributes
  7382.  
  7383. The menu resource-definition file specifies the text of each item in the menu, 
  7384. its unique identifier, its style and attributes, and whether it is a command 
  7385. item or a submenu item.  A menu item that has no specification for style or 
  7386. attributes has the default style of MIS_TEXT and all attribute bits off, 
  7387. indicating that the item is enabled.  The MIS_SEPARATOR style identifies 
  7388. nonselectable lines between menu items. The following figure is sample Resource 
  7389. Compiler source code that defines a menu resource. The code defines a menu with 
  7390. three submenu items in the menu bar (File, Edit, and Font) and a command item 
  7391. (Help).  Each submenu has several command items, and the Font submenu has two 
  7392. other submenus within it. 
  7393.  
  7394.  
  7395. ResourceCompilerCodeDefiningaMenuResource
  7396.  
  7397.  
  7398.     MENU ID_MENU_RESOURCE
  7399.     BEGIN
  7400.         SUBMENU "~File", IDM_FILE
  7401.             BEGIN
  7402.                 MENUITEM "~Open...",       IDM_FI_OPEN
  7403.                 MENUITEM "~Close\tF3",     IDM_FI_CLOSE, 0, MIA_DISABLED
  7404.                 MENUITEM "~Quit",          IDM_FI_QUIT
  7405.                 MENUITEM "",               IDM_FI_SEP1, MIS_SEPARATOR
  7406.                 MENUITEM "~About Sample",  IDM_FI_ABOUT
  7407.             END
  7408.         SUBMENU "~Edit", IDM_EDIT
  7409.             BEGIN
  7410.                 MENUITEM "~Undo",          IDM_ED_UNDO, 0, MIA_DISABLED
  7411.                 MENUITEM "",               IDM_ED_SEP1, MIS_SEPARATOR
  7412.                 MENUITEM "~Cut",           IDM_ED_CUT
  7413.                 MENUITEM "C~opy",          IDM_ED_COPY
  7414.                 MENUITEM "~Paste",         IDM_ED_PASTE
  7415.                 MENUITEM "C~lear",         IDM_ED_CLEAR
  7416.             END
  7417.         SUBMENU "Font", IDM_FONT
  7418.             BEGIN
  7419.                 SUBMENU "Style",           IDM_FONT_STYLE
  7420.                     BEGIN
  7421.                         MENUITEM "Plain",  IDM_FONT_STYLE_PLAIN
  7422.                         MENUITEM "Bold",   IDM_FONT_STYLE_BOLD
  7423.                         MENUITEM "Italic", IDM_FONT_STYLE_ITALIC
  7424.                     END
  7425.                 SUBMENU "Size",            IDM_FONT_SIZE
  7426.                     BEGIN
  7427.                         MENUITEM "10",     IDM_FONT_SIZE_10
  7428.                         MENUITEM "12",     IDM_FONT_SIZE_12
  7429.                         MENUITEM "14",     IDM_FONT_SIZE_14
  7430.                     END
  7431.             END
  7432.         MENUITEM "F1=Help", 0x00, MIS_TEXT | MIS_BUTTONSEPARATOR | MIS_HELP
  7433.     END
  7434.  
  7435. To define a menu item with the MIS_BITMAP style, an application must use a tool 
  7436. such as Icon Editor to create a bit map, include the bit map in its 
  7437. resource-definition file, and define a menu in the file (as shown in the 
  7438. following figure). The text for the bit map menu items is an ASCII 
  7439. representation of the resource identifier of the bit map resource to be 
  7440. displayed for that item. 
  7441.  
  7442.  
  7443. DefiningaMenuwiththeMIS _ BITMAPStyle
  7444.  
  7445.  
  7446.     /* Bring externally created bit maps into the resource file. */
  7447.     BITMAP 101 button.bmp
  7448.     BITMAP 102 hirest.bmp
  7449.     BITMAP 103 hizoom.bmp
  7450.     BITMAP 104 hired.bmp
  7451.  
  7452.     /* Connect a menu item with a bit map.                       */
  7453.     SUBMENU "~Bitmaps", IDM_BITMAP
  7454.         BEGIN
  7455.             MENUITEM "#101", IDM_BM_01, MIS_BITMAP
  7456.             MENUITEM "#102", IDM_BM_02, MIS_BITMAP
  7457.             MENUITEM "#103", IDM_BM_03, MIS_BITMAP
  7458.             MENUITEM "#104", IDM_BM_04, MIS_BITMAP
  7459.         END
  7460.  
  7461.  
  7462. ΓòÉΓòÉΓòÉ 11.2.2. Including a Menu Bar in a Standard Window ΓòÉΓòÉΓòÉ
  7463.  
  7464. If you have defined a menu resource in a resource-definition file, you can use 
  7465. the menu resource to create a menu bar in a standard window.  You include the 
  7466. menu bar by using the FCF_MENU attribute flag and specifying the menu-resource 
  7467. identifier in a call to WinCreateStdWindow, as shown in the following code 
  7468. fragment: 
  7469.  
  7470.     #define ID_MENU_RESOURCE 100
  7471.  
  7472.     HWND hwndFrame;
  7473.     CHAR szClassName[]="MyClass";
  7474.     CHAR szTitle[]="My Title";
  7475.  
  7476.     ULONG flControlStyle = FCF_MENU     | FCF_SIZEBORDER |
  7477.                            FCF_TITLEBAR | FCF_ACCELTABLE;
  7478.  
  7479.     hwndFrame = WinCreateStdWindow(HWND_DESKTOP,
  7480.         WS_VISIBLE,
  7481.         &flControlStyle,
  7482.         szClassName,
  7483.         szTitle,
  7484.         0, (HMODULE) NULL,
  7485.         ID_MENU_RESOURCE,
  7486.         NULL);
  7487.  
  7488. After you make this call, the operating system automatically includes the menu 
  7489. in the window, drawing the menu bar across the top of the window.  When the 
  7490. user chooses an item from the menu, the menu posts the message to the frame 
  7491. window.  The frame window passes any WM_COMMAND messages to the client window. 
  7492. (The frame window does not pass WM_SYSCOMMAND messages to the client window.) 
  7493. WM_HELP messages are posted to the focus window.  The WinDefWindowProc function 
  7494. passes WM_HELP messages to the parent window.  If a WM_HELP message is passed 
  7495. to a frame window, the frame window calls the HK_HELP hook.  Your client window 
  7496. procedure must process these messages to respond to the user's actions. 
  7497.  
  7498.  
  7499. ΓòÉΓòÉΓòÉ 11.2.3. Creating a Pop-up Menu ΓòÉΓòÉΓòÉ
  7500.  
  7501. The following code fragment shows how to make a pop-up menu appear when the 
  7502. user double-clicks mouse button 2 anywhere in the parent window.  The menu is 
  7503. positioned with the mouse pointer located on the item having the IDM_OPEN 
  7504. identifier and is constrained horizontally and vertically.  Then, the user can 
  7505. select an item from the pop-up menu using mouse button 2. 
  7506.  
  7507.     #define ID_MENU_RESOURCE  110
  7508.     #define IDM_OPEN          120
  7509.  
  7510.     HWND hwndFrame;
  7511.  
  7512.     MRESULT ClientWndProc(
  7513.     HWND hwnd,
  7514.     ULONG msg,
  7515.     MPARAM mp1,
  7516.     MPARAM mp2)
  7517.     {
  7518.         HWND hwndMenu;
  7519.         BOOL fSuccess;
  7520.  
  7521.         switch (msg) {
  7522.             .
  7523.             .   /* Process other messages. */
  7524.             .
  7525.             case WM_BUTTON2DBLCLK:
  7526.                 hwndMenu = WinLoadMenu(hwnd, (HMODULE) NULL, ID_MENU_RESOURCE);
  7527.                 fSuccess = WinPopupMenu(hwnd,
  7528.                                         hwndFrame,
  7529.                                         hwndMenu,
  7530.                                         20,
  7531.                                         50,
  7532.                                         IDM_OPEN,
  7533.                                         PU_POSITIONONITEM   |
  7534.                                         PU_HCONSTRAIN       |
  7535.                                         PU_VCONSTRAIN       |
  7536.                                         PU_MOUSEBUTTON2DOWN |
  7537.                                         PU_MOUSEBUTTON2);
  7538.  
  7539.                        .
  7540.                        .
  7541.                        .
  7542.  
  7543.  
  7544. ΓòÉΓòÉΓòÉ 11.2.4. Adding a Menu to a Dialog Window ΓòÉΓòÉΓòÉ
  7545.  
  7546. You might want to use menus in windows that were not created using the 
  7547. WinCreateStdWindow function.  For these windows, you can load a menu resource 
  7548. by using the WinLoadMenu function and specifying the parent window for the 
  7549. menu.  WinLoadMenu assigns the specified menu resource to the parent.  To see 
  7550. the menu in the window, you must send a WM_UPDATEFRAME message to the parent 
  7551. after loading the menu resource.  This strategy is especially useful for adding 
  7552. menus to a window created as a dialog window, but it can be used no matter what 
  7553. type of window is specified as the parent. 
  7554.  
  7555.  
  7556. ΓòÉΓòÉΓòÉ 11.2.5. Accessing the System Menu ΓòÉΓòÉΓòÉ
  7557.  
  7558. Although most applications do not alter the system menu, you can obtain the 
  7559. handle of the system menu by calling WinWindowFromID with a frame-window handle 
  7560. (or dialog-window handle) and the identifier FID_SYSMENU.  Once you have the 
  7561. handle of the system menu, you can access the individual menu items by using 
  7562. predefined constants.  For example, the following code fragment shows how to 
  7563. disable the Close menu item in the system menu of a window: 
  7564.  
  7565.     HWND hwndSysMenu;
  7566.     HWND hwndFrame;
  7567.  
  7568.     hwndSysMenu = WinWindowFromID(hwndFrame, FID_SYSMENU);
  7569.  
  7570.     WinSendMsg(hwndSysMenu, MM_SETITEMATTR,
  7571.         MPFROM2SHORT(SC_CLOSE, TRUE),
  7572.         MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED));
  7573.  
  7574.  
  7575. ΓòÉΓòÉΓòÉ 11.2.6. Responding to a User's Menu Choice ΓòÉΓòÉΓòÉ
  7576.  
  7577. When a user chooses a menu item, the client window procedure receives a 
  7578. WM_COMMAND message with SHORT1FROMMP(mp1) equal to the menu identifier of the 
  7579. chosen item.  Your application must use the menu identifier to guide its 
  7580. response to the choice.  Typically, the code in the client window procedure 
  7581. resembles the following code fragment: 
  7582.  
  7583.        case WM_COMMAND:
  7584.            DoMenuCommand(hwnd, SHORT1FROMMP(mp1));
  7585.            return 0;
  7586.  
  7587. The function that translates the menu identifier into an action typically 
  7588. resembles the following code fragment: 
  7589.  
  7590.  
  7591.     VOID DoMenuCommand(
  7592.     HWND hwnd,
  7593.     USHORT usItemID)
  7594.     {
  7595.  
  7596.         /* Test the menu item. */
  7597.         switch (usItemID) {
  7598.             case IDM_FI_NEW:
  7599.                 DoNew(hwnd);
  7600.                 break;
  7601.  
  7602.           .
  7603.           . /* etc. */
  7604.           .
  7605.  
  7606.         }
  7607.     }
  7608.  
  7609. The menu window sends a WM_MENUSELECT message every time the menu selection 
  7610. changes.  SHORT1FROMMP(mp1) contains the identifier of the item that is 
  7611. changing state, and SHORT2FROMMP(mp2) is a 16-bit Boolean value that describes 
  7612. whether or not the item is chosen; the mp2 parameter contains the handle of the 
  7613. menu. 
  7614.  
  7615. If the Boolean value is FALSE, the item is selected but not chosen; for 
  7616. example, the user may have moved the cursor or mouse pointer over the item 
  7617. while the button was down.  An application can use this message to display Help 
  7618. information at the bottom of the application window.  The return value is 
  7619. ignored. 
  7620.  
  7621. If the Boolean value is TRUE, the item is chosen-that is, the user pressed 
  7622. Enter or released the mouse button while an item was selected.  If the 
  7623. application returns FALSE, the menu does not generate a WM_COMMAND, 
  7624. WM_SYSCOMMAND, or WM_HELP message, and the menu is not dismissed. 
  7625.  
  7626.  
  7627. ΓòÉΓòÉΓòÉ 11.2.7. Setting and Querying Menu-Item Attributes ΓòÉΓòÉΓòÉ
  7628.  
  7629. Menu-item attributes are represented in the fAttribute field of the MENUITEM 
  7630. data structure.  Typically, attributes are set in the resource-definition file 
  7631. of the menu and are changed at run time as required.  Applications can use the 
  7632. MM_SETITEMATTR and MM_QUERYITEMATTR messages to set and query attributes for a 
  7633. particular menu item.  One of the most common uses of these messages is to 
  7634. check and uncheck menu items to let the user know what option is selected 
  7635. currently.  For example, if you have a menu item that should toggle between 
  7636. checked and unchecked each time the user selects it, you can use the following 
  7637. figure to change the checked attribute. In this example, you send an 
  7638. MM_QUERYITEMATTR message to the menu item to obtain its current checked 
  7639. attribute; then, you use the exclusive OR operator to toggle the state; and 
  7640. finally, you send the new attribute state back to the item using an 
  7641. MM_SETITEMATTR message. 
  7642.  
  7643.  
  7644. ChangingaMenuItemtoToggleBetweenCheckedandUnchecked
  7645.  
  7646.  
  7647.  
  7648.     usAttrib = SHORT1FROMMR(
  7649.         WinSendMsg(hwndMenu,           /* Submenu window        */
  7650.         MM_QUERYITEMATTR,              /* Message               */
  7651.         (MPARAM)itemID,                /* Item identifier       */
  7652.         (MPARAM)MIA_CHECKED            /* Attribute mask        */
  7653.         ));
  7654.  
  7655.     usAttrib = MIA_CHECKED;        /* XOR to toggle checked attribute */
  7656.  
  7657.     WinSendMsg(hwndMenu,                      /* Submenu window        */
  7658.         MM_SETITEMATTR,                       /* Message               */
  7659.         (MPARAM)itemID,                       /* Item identifier       */
  7660.         MPFROM2SHORT(MIA_CHECKED, usAttrib)); /* Attribute mask, value */
  7661.  
  7662.  
  7663. ΓòÉΓòÉΓòÉ 11.2.8. Adding and Deleting Menu Items ΓòÉΓòÉΓòÉ
  7664.  
  7665. An application can add and delete items from its menus dynamically by sending 
  7666. MM_INSERTITEM and MM_DELETEITEM messages to the menu window.  Any item, 
  7667. including those in submenus, can be deleted by sending a message to the menu 
  7668. window.  Messages to insert items in submenus must be sent to the submenu's 
  7669. window (rather than to the window of the top-level menu).  You can retrieve the 
  7670. handle of a submenu of the menu bar by sending an MM_QUERYITEM message to the 
  7671. menu-bar and specifying the identifier of the submenu item for the submenu, as 
  7672. shown in the following code fragment: 
  7673.  
  7674.     /* IDM_MYMENUID is the identifier of the submenu containing the item. */
  7675.  
  7676.     MENUITEM mi;
  7677.     HWND hwndMenu, hwndSubMenu, hwndPullDown,hwndFrame;
  7678.  
  7679.     hwndMenu = WinWindowFromID(hwndFrame, FID_MENU);
  7680.     WinSendMsg(hwndMenu,                           /* Handle of menu bar  */
  7681.         MM_QUERYITEM,                              /* Message             */
  7682.         MPFROM2SHORT(IDM_MYMENUID, TRUE),          /* Submenu identifier  */
  7683.         (MPARAM) &mi);                             /* Pointer to MENUITEM */
  7684.  
  7685.     hwndPullDown = mi.hwndSubMenu;                 /* Handle to submenu   */
  7686.  
  7687. Once the application has the handle of the submenu, it can insert an item by 
  7688. filling in a MENUITEM structure and sending an MM_INSERTITEM message to the 
  7689. submenu.  For text-menu items, the application must send a pointer to the text 
  7690. string as well as to the MENUITEM structure, as shown in the following figure. 
  7691.  
  7692.  
  7693. InsertingaMenuItem
  7694.  
  7695.  
  7696.     PSZ  pszNewItemString;
  7697.  
  7698.     mi.iPosition = MIT_END;
  7699.     mi.afStyle = MIS_TEXT;
  7700.     mi.afAttribute = 0;
  7701.     mi.id = IDM_MYMENU_FIRST;
  7702.     mi.hwndSubMenu = NULL;
  7703.     mi.hItem = 0;
  7704.  
  7705.     WinSendMsg(hwndPullDown, MM_INSERTITEM, (MPARAM) &mi,
  7706.         (MPARAM) pszNewItemString);
  7707.  
  7708. To delete an item, the application sends an MM_DELETEITEM message to the menu 
  7709. bar, specifying the identifier of the item to delete.  For example, to clear 
  7710. all the items following IDM_MYMENU_FIRST in a submenu in which the items are 
  7711. numbered sequentially, use the following code: 
  7712.  
  7713.  
  7714.     USHORT usItemNum;
  7715.  
  7716.     /* Clear all the items in MYMENU.                 */
  7717.     hwndMenu = WinWindowFromID(hwndFrame, FID_MENU);
  7718.     usItemNum = IDM_MYMENU_FIRST;
  7719.     while (WinSendMsg(hwndMenu, MM_DELETEITEM,
  7720.         MPFROM2SHORT(usItemNum++, TRUE), NULL) != 0);
  7721.  
  7722. Adding a complete submenu to the menu bar is a more complicated procedure than 
  7723. that shown in the previous examples.  There are two strategies.  The 
  7724. recommended technique is to define all possible submenus in your 
  7725. resource-definition file; and then, as your application runs, selectively 
  7726. remove and insert the submenus as needed. 
  7727.  
  7728. For example, assume that your application has a submenu that you want to be 
  7729. displayed only when a particular application tool is in use.  You must first 
  7730. define the submenu as part of the main menu resource in your 
  7731. resource-definition file, so that the system reads in the resource menu 
  7732. template and creates the submenu window along with the rest of the menu.  You 
  7733. then can remove the submenu from the menu bar, saving the title of the submenu 
  7734. and the MENUITEM structure that defines the submenu, as shown in the following 
  7735. figure: 
  7736.  
  7737.  
  7738. RemovingaSubmenufromtheMenuBar
  7739.  
  7740.  
  7741.     HWND hwndMenu, hwndClient;
  7742.     MENUITEM mi;
  7743.     CHAR szMenuTitle[MAX_STRINGSIZE];
  7744.  
  7745.     /* Remove a submenu so that you can replace it later.           */
  7746.  
  7747.     /* Obtain the handle of a menu.                                 */
  7748.     hwndMenu = WinWindowFromID(WinQueryWindow(hwndClient, QW_PARENT),
  7749.                                FID_MENU);
  7750.  
  7751.     /* Obtain information on the item to remove.                    */
  7752.     WinSendMsg(hwndMenu, MM_QUERYITEM,
  7753.         MPFROM2SHORT(IDM_MENUID, TRUE),  /* TRUE to search submenus */
  7754.         (MPARAM)&mi);
  7755.  
  7756.     /* Save the text for the submenu item.                          */
  7757.     WinSendMsg(hwndMenu, MM_QUERYITEMTEXT,
  7758.         MPFROM2SHORT(IDM_FONT, MAX_STRINGSIZE),
  7759.         (MPARAM)szMenuTitle);
  7760.  
  7761.     /* Remove the item, but retain mi and szMenuTitle.              */
  7762.     WinSendMsg(hwndMenu, MM_REMOVEITEM,
  7763.         MPFROM2SHORT(IDM_FONT, TRUE), NULL);
  7764.  
  7765. It is important to use the MM_REMOVEITEM message, rather than MM_DELETEITEM, to 
  7766. remove the item; deleting the item destroys the submenu window-removing it does 
  7767. not.  The submenu should remain intact so that you can insert it later. 
  7768.  
  7769. To reinsert the submenu, send an MM_INSERTITEM message to the menu bar, passing 
  7770. the MENUITEM structure and menu title that you saved when you removed the item. 
  7771. The following code fragment shows how to insert a submenu that was removed by 
  7772. using the previous code example: 
  7773.  
  7774.  
  7775.     /* Put the submenu back in and obtain the handle of the menu bar. */
  7776.     hwndMenu = WinWindowFromID(
  7777.                     WinQueryWindow(hwndClient, QW_PARENT), FID_MENU);
  7778.  
  7779.     /* Use the information that you saved when you removed the menu.  */
  7780.     WinSendMsg(hwndMenu, MM_INSERTITEM, (MPARAM)&mi,
  7781.                (MPARAM)szMenuTitle);
  7782.  
  7783. The other technique that you can use to insert a submenu in the menu bar is to 
  7784. build up, in memory, a data structure as a menu template and use that template 
  7785. and WinCreateWindow to create a submenu.  The resultant submenu window handle 
  7786. then is placed in the hwndSubMenu field of a MENUITEM structure, and the menu 
  7787. item is sent to the menu bar with an MM_INSERTITEM message. 
  7788.  
  7789. You also can create an empty submenu window by using WinCreateWindow.  Pass 
  7790. NULL for the pCtlData and pPresParams parameters, instead of building the menu 
  7791. template in memory.  Then insert a new menu item in the menu bar by using the 
  7792. MM_INSERTITEM message, setting the MIS_SUBMENU style, and putting the window 
  7793. handle of the created menu into the hwndSubMenu field.  Then use the 
  7794. MM_INSERTITEM message to insert the items in the new pull-down menu. 
  7795.  
  7796.  
  7797. ΓòÉΓòÉΓòÉ 11.2.9. Creating a Custom Menu Item ΓòÉΓòÉΓòÉ
  7798.  
  7799. Applications can customize the appearance of an individual menu item by setting 
  7800. the MIS_OWNERDRAW style bit for the item.  The operating system sends two 
  7801. different messages to an application that include owner-drawn menu items: 
  7802. WM_MEASUREITEM and WM_DRAWITEM.  Both messages include a pointer to an 
  7803. OWNERITEM data structure. 
  7804.  
  7805. WM_MEASUREITEM is sent only once for each owner-drawn item when the menu is 
  7806. initialized.  The message is sent to the owner of the menu (typically, a frame 
  7807. window), which forwards the message to its client window.  Typically, the 
  7808. client window procedure processes WM_MEASUREITEM by filling in the yTop and 
  7809. Right fields of the RECTL structure, specified by the rclItem field of this 
  7810. OWNERITEM structure; this specifies the size of the rectangle needed to enclose 
  7811. the item when it is drawn.  The following code fragment responds to a 
  7812. WM_MEASUREITEM message. 
  7813.  
  7814.     case WM_MEASUREITEM:
  7815.         ((POWNERITEM) mp2)->rclItem.xRight = 26;
  7816.         ((POWNERITEM) mp2)->rclItem.yTop = 10;
  7817.         return 0;
  7818.  
  7819. If a menu item has the MIS_OWNERDRAW style, the owner window receives a 
  7820. WM_DRAWITEM message every time the menu item needs to be drawn.  You process 
  7821. this message by using the hps and rclItem fields of the OWNERITEM structure to 
  7822. draw the item.  There are two situations in which the owner window receives a 
  7823. WM_DRAWITEM message: 
  7824.  
  7825. o When the item must be redrawn completely 
  7826. o When the item must be highlighted or have its highlight removed. 
  7827.  
  7828. You can choose to handle one or both of these situations.  Typically, you 
  7829. handle the drawing of the item.  You may not want to handle the second 
  7830. situation, however, since the system-default behavior (inverting the bits in 
  7831. the item rectangle) often is acceptable. 
  7832.  
  7833. The two situations in which a WM_DRAWITEM message is received are detected by 
  7834. comparing the values of the fsState and fsStateOld fields of the OWNERITEM 
  7835. structure that is sent as part of the message.  If the two fields are the same, 
  7836. draw the item.  Before drawing the item, however, check its attributes to see 
  7837. whether it has the attributes MIA_CHECKED, MIA_FRAMED, or MIA_DISABLED.  Then 
  7838. draw the item according to the attributes. 
  7839.  
  7840. For example, when the checked attribute of an owner-drawn menu item changes, 
  7841. the system sends a WM_DRAWITEM message to the item so that it can redraw itself 
  7842. and either draw or remove the check mark.  If you want the system-default check 
  7843. mark, simply draw the item and leave the fsAttribute and fsAttributeOld fields 
  7844. unchanged; the system draws the check mark if necessary.  If you draw the check 
  7845. mark yourself, clear the MIA_CHECKED bit in both fsAttribute and fsAttributeOld 
  7846. so that the system does not attempt to draw a check mark. 
  7847.  
  7848. In the same example, if fsAttribute and fsAttributeOld are not equal, the 
  7849. highlight showing that an item is selected needs to change.  The MIA_HILITED 
  7850. bit of the fsAttribute field is set if the item needs to be highlighted and is 
  7851. not set if the highlight needs to be removed.  If you do not want to provide 
  7852. your own highlighting, you should ignore any WM_DRAWITEM message in which 
  7853. fsAttribute and fsAttributeOld are not equal.  If you do not alter these two 
  7854. fields, the system performs its default highlighting operation.  If you want to 
  7855. provide your own visual cue that an item is selected, respond to a WM_DRAWITEM 
  7856. message in which the fsAttribute and fsAttributeOld fields are not equal by 
  7857. providing the cue and clearing the MIA_HILITED bit of both fields before 
  7858. returning from the message. 
  7859.  
  7860. Likewise, the MIA_CHECKED and MIA_FRAMED bits of fsAttribute and fsAttributeOld 
  7861. either can be used to perform the corresponding action or passed on, unchanged, 
  7862. so that the system performs the action. 
  7863.  
  7864. The following code fragment shows how to respond to a WM_DRAWITEM message when 
  7865. you want to draw the item and also be responsible for its highlighted state: 
  7866.  
  7867.  
  7868.     case WM_DRAWITEM:
  7869.         {
  7870.         POWNERITEM poi;
  7871.         RECTL      rcl;
  7872.         MPARAM     mp2;
  7873.  
  7874.         poi = (POWNERITEM) mp2;
  7875.  
  7876.         /*
  7877.          * If the new attribute equals the old attribute,
  7878.          * redraw the entire item.
  7879.          */
  7880.  
  7881.         if (poi->fsAttribute == poi->fsAttributeOld) {
  7882.  
  7883.             /*
  7884.              * Draw the item in poi->hps and poi->rclItem, and check the
  7885.              * attributes for check marks. If you produce your own check marks,
  7886.              * use this line of code:
  7887.              *
  7888.              *     poi->fsAttributeOld = (poi->fsAttribute &= ~MIA_CHECKED;
  7889.              */
  7890.  
  7891.         }
  7892.  
  7893.         /* Else highlight the item or remove its highlight. */
  7894.  
  7895.         else if ((poi->fsAttribute & MIA_HILITED) !=
  7896.                 (poi->fsAttributeOld & MIA_HILITED)) {
  7897.  
  7898.             /*
  7899.              * Set bits the same so that the menu window does not highlight
  7900.              * the item or remove its highlight.
  7901.              */
  7902.  
  7903.             poi->fsAttributeOld = (poi->fsAttribute &= ~MIA_HILITED);
  7904.         }
  7905.         return TRUE; /* TRUE means the item is drawn. */
  7906.         } /* endcase */
  7907.  
  7908.  
  7909. ΓòÉΓòÉΓòÉ 11.3. Summary ΓòÉΓòÉΓòÉ
  7910.  
  7911. This section lists the OS/2 functions, structures, and messages used with 
  7912. menus. 
  7913.  
  7914. Menu Functions 
  7915.  
  7916. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7917. ΓöéFunction Name           ΓöéDescription                         Γöé
  7918. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7919. ΓöéWinCreateMenu           ΓöéCreates a menu window from the menu Γöé
  7920. Γöé                        Γöétemplate.                           Γöé
  7921. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7922. ΓöéWinCheckMenuItem        ΓöéSets the check state of the         Γöé
  7923. Γöé                        Γöéspecified menu item to the flag.    Γöé
  7924. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7925. ΓöéWinEnableMenuItem       ΓöéSets the state of the specified menuΓöé
  7926. Γöé                        Γöéitem to the enable flag.            Γöé
  7927. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7928. ΓöéWinIsMenuItemChecked    ΓöéReturns the state (checked/not      Γöé
  7929. Γöé                        Γöéchecked) of the identified menu     Γöé
  7930. Γöé                        Γöéitem.                               Γöé
  7931. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7932. ΓöéWinIsMenuItemEnabled    ΓöéReturns the state (enable/disable)  Γöé
  7933. Γöé                        Γöéof the specified menu item.         Γöé
  7934. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7935. ΓöéWinIsMenuItemValid      ΓöéReturns TRUE if the specified item  Γöé
  7936. Γöé                        Γöéis a valid choice.                  Γöé
  7937. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7938. ΓöéWinLoadMenu             ΓöéCreates a menu window from the menu Γöé
  7939. Γöé                        Γöétemplate Menuid from Resource, and  Γöé
  7940. Γöé                        Γöéreturns in Menu the window handle   Γöé
  7941. Γöé                        Γöéfor the created window.             Γöé
  7942. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7943. ΓöéWinPopupMenu            ΓöéDisplays a pop-up menu.             Γöé
  7944. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7945. ΓöéWinSetMenuItemText      ΓöéSets the text for menu indexed item Γöé
  7946. Γöé                        Γöéto buffer.                          Γöé
  7947. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7948.  
  7949. Menu Structures 
  7950.  
  7951. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7952. ΓöéStructure Name          ΓöéDescription                         Γöé
  7953. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7954. ΓöéMENUITEM                ΓöéMenu item.                          Γöé
  7955. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7956. ΓöéOWNERITEM               ΓöéOwner item.                         Γöé
  7957. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7958.  
  7959. Messages Received by a Menu 
  7960.  
  7961. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7962. ΓöéMessage                 ΓöéDescription                         Γöé
  7963. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7964. ΓöéMM_DELETEITEM           ΓöéDeletes a menu item.                Γöé
  7965. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7966. ΓöéMM_ENDMENUMODE          ΓöéSent to a menu control to terminate Γöé
  7967. Γöé                        Γöémenu selection.                     Γöé
  7968. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7969. ΓöéMM_INSERTITEM           ΓöéInserts a menu item in a menu.      Γöé
  7970. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7971. ΓöéMM_ISITEMVALID          ΓöéReturns the selectable status of a  Γöé
  7972. Γöé                        Γöéspecified menu item.                Γöé
  7973. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7974. ΓöéMM_ITEMIDFROMPOSITION   ΓöéReturns the identity of a menu item Γöé
  7975. Γöé                        Γöéof a specified index.               Γöé
  7976. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7977. ΓöéMM_ITEMPOSITIONFROMID   ΓöéReturns the index of a menu item of Γöé
  7978. Γöé                        Γöéa particular identify.              Γöé
  7979. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7980. ΓöéMM_QUERYITEM            ΓöéReturns the definition of the       Γöé
  7981. Γöé                        Γöéspecified menu item.                Γöé
  7982. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7983. ΓöéMM_QUERYITEMATTR        ΓöéReturns the attributes of a menu    Γöé
  7984. Γöé                        Γöéitem.                               Γöé
  7985. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7986. ΓöéMM_QUERYITEMCOUNT       ΓöéReturns the number of items in the  Γöé
  7987. Γöé                        Γöémenu.                               Γöé
  7988. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7989. ΓöéMM_QUERYITEMRECT        ΓöéReturns the bounding rectangle of a Γöé
  7990. Γöé                        Γöémenu item.                          Γöé
  7991. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7992. ΓöéMM_QUERYITEMTEXT        ΓöéReturns the text of the specified   Γöé
  7993. Γöé                        Γöémenu item.                          Γöé
  7994. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7995. ΓöéMM_QUERYITEMTEXTLENGTH  ΓöéReturns the text length of the      Γöé
  7996. Γöé                        Γöéspecified menu item.                Γöé
  7997. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7998. ΓöéMM_QUERYSELITEMID       ΓöéReturns the identity of the selectedΓöé
  7999. Γöé                        Γöémenu item.                          Γöé
  8000. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8001. ΓöéMM_REMOVEITEM           ΓöéRemoves a menu item.                Γöé
  8002. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8003. ΓöéMM_SELECTITEM           ΓöéSelects or deselects a menu item.   Γöé
  8004. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8005. ΓöéMM_SETITEM              ΓöéSets the definition of a menu item. Γöé
  8006. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8007. ΓöéMM_SETITEMATTR          ΓöéSets the attributes of a menu item. Γöé
  8008. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8009. ΓöéMM_SETITEMHANDLE        ΓöéSets the handle of a menu item.     Γöé
  8010. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8011. ΓöéMM_SETITEMTEXT          ΓöéSets the text of a menu item.       Γöé
  8012. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8013. ΓöéMM_STARTMENUMODE        ΓöéUsed to begin menu selection.       Γöé
  8014. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8015.  
  8016. Messages Generated by a Menu 
  8017.  
  8018. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8019. ΓöéMessage                 ΓöéDescription                         Γöé
  8020. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8021. ΓöéWM_ADJUSTWINDOWPOS      ΓöéSent by WinSetWindowPos to enable   Γöé
  8022. Γöé                        Γöéthe window to adjust its new        Γöé
  8023. Γöé                        Γöéposition or size whenever it is     Γöé
  8024. Γöé                        Γöéabout to be moved.                  Γöé
  8025. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8026. ΓöéWM_BUTTON1DOWN          ΓöéOccurs when the user presses pointerΓöé
  8027. Γöé                        Γöébutton 1.                           Γöé
  8028. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8029. ΓöéWM_BUTTON2DOWN          ΓöéOccurs when the user presses pointerΓöé
  8030. Γöé                        Γöébutton 2.                           Γöé
  8031. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8032. ΓöéWM_BUTTON3DOWN          ΓöéOccurs when the user presses pointerΓöé
  8033. Γöé                        Γöébutton 3.                           Γöé
  8034. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8035. ΓöéWM_COMMAND              ΓöéOccurs when a control has a         Γöé
  8036. Γöé                        Γöésignificant event to notify to its  Γöé
  8037. Γöé                        Γöéowner or when a keystroke has been  Γöé
  8038. Γöé                        Γöétranslated by an accelerator table. Γöé
  8039. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8040. ΓöéWM_CONTEXTMENU          ΓöéOccurs when the operator requests a Γöé
  8041. Γöé                        Γöépop-up menu.                        Γöé
  8042. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8043. ΓöéWM_CONTROLPOINTER       ΓöéSent to the owner window of a       Γöé
  8044. Γöé                        Γöécontrol when the pointing device    Γöé
  8045. Γöé                        Γöépointer moves over the control      Γöé
  8046. Γöé                        Γöéwindow, enabling the owner to set   Γöé
  8047. Γöé                        Γöéthe pointer.                        Γöé
  8048. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8049. ΓöéWM_CREATE               ΓöéOccurs when an application requests Γöé
  8050. Γöé                        Γöéthe creation of a window.           Γöé
  8051. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8052. ΓöéWM_DESTROY              ΓöéOccurs when an application requests Γöé
  8053. Γöé                        Γöéthe destruction of a window.        Γöé
  8054. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8055. ΓöéWM_DRAWITEM             ΓöéSent to the owner of a menu control Γöé
  8056. Γöé                        Γöéeach time an item is to be drawn.   Γöé
  8057. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8058. ΓöéWM_ENABLE               ΓöéSets the enable state of a window.  Γöé
  8059. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8060. ΓöéWM_FOCUSCHANGE          ΓöéOccurs when the window possessing   Γöé
  8061. Γöé                        Γöéthe focus is changed.               Γöé
  8062. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8063. ΓöéWM_HELP                 ΓöéOccurs when a control has a         Γöé
  8064. Γöé                        Γöésignificant event to notify to its  Γöé
  8065. Γöé                        Γöéowner or when a keystroke has been  Γöé
  8066. Γöé                        Γöétranslated by an accelerator table  Γöé
  8067. Γöé                        Γöéinto a WM_HELP.                     Γöé
  8068. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8069. ΓöéWM_INITMENU             ΓöéOccurs when a menu control is about Γöé
  8070. Γöé                        Γöéto become active.                   Γöé
  8071. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8072. ΓöéWM_MEASUREITEM          ΓöéSent to the owner of a meu control  Γöé
  8073. Γöé                        Γöéto establish the height for an item Γöé
  8074. Γöé                        Γöéin that control.                    Γöé
  8075. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8076. ΓöéWM_MENUEND              ΓöéOccurs when a menu control is about Γöé
  8077. Γöé                        Γöéto terminate.                       Γöé
  8078. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8079. ΓöéWM_MENUSELECT           ΓöéOccurs when a menu item has been    Γöé
  8080. Γöé                        Γöéselected.                           Γöé
  8081. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8082. ΓöéWM_MOUSEMOVE            ΓöéOccurs when the pointing device     Γöé
  8083. Γöé                        Γöépointer moves.                      Γöé
  8084. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8085. ΓöéWM_NEXTMENU             ΓöéOccurs when either the beginning or Γöé
  8086. Γöé                        Γöéthe end of the menu is reached usingΓöé
  8087. Γöé                        Γöéthe cursor control keys.            Γöé
  8088. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8089. ΓöéWM_PAINT                ΓöéOccurs when a window needs          Γöé
  8090. Γöé                        Γöérepainting.                         Γöé
  8091. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8092. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  8093. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  8094. Γöé                        Γöéconversion of DBCS characters.      Γöé
  8095. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8096. ΓöéWM_SETFOCUS             ΓöéOccurs when a window is to receive  Γöé
  8097. Γöé                        Γöéor lose the input focus.            Γöé
  8098. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8099. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  8100. Γöé                        Γöéchanges the menu parameters.        Γöé
  8101. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8102. ΓöéWM_SYSCOMMAND           ΓöéOccurs when a control has a         Γöé
  8103. Γöé                        Γöésignificant event to notify to its  Γöé
  8104. Γöé                        Γöéowner or when a keystroke has been  Γöé
  8105. Γöé                        Γöétranslated by an accelerator table  Γöé
  8106. Γöé                        Γöéinto a WM_SYSCOMMAND.               Γöé
  8107. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8108.  
  8109.  
  8110. ΓòÉΓòÉΓòÉ 12. Entry-Field Controls ΓòÉΓòÉΓòÉ
  8111.  
  8112. An entry field is a control window that enables a user to view and edit a 
  8113. single line of text.  This chapter describes how to create and use entry-field 
  8114. controls in your PM applications. 
  8115.  
  8116.  
  8117. ΓòÉΓòÉΓòÉ 12.1. About Entry Fields ΓòÉΓòÉΓòÉ
  8118.  
  8119. An entry field provides the text-editing capabilities of a simple text editor 
  8120. and is useful whenever an application requires a short line of text from the 
  8121. user as illustrated in the following figure. 
  8122.  
  8123. Example of Entry Fields 
  8124.  
  8125. If the application requires more sophisticated text-editing capabilities and 
  8126. multiple lines of text from the user, the application can use a multiple-line 
  8127. entry (MLE) field. See Multiple-Line Entry Field Controls for more information 
  8128. about MLE controls. 
  8129.  
  8130. Both the user and the application can edit text in an entry field. 
  8131. Applications typically use entry fields in dialog windows, although they can be 
  8132. used in non-dialog windows as well. 
  8133.  
  8134. An application creates an entry field by specifying either the WC_ENTRYFIELD 
  8135. window class in the WinCreateWindow function or the ENTRYFIELD statement in a 
  8136. resource-definition file. 
  8137.  
  8138.  
  8139. ΓòÉΓòÉΓòÉ 12.1.1. Entry-Field Styles ΓòÉΓòÉΓòÉ
  8140.  
  8141. An entry field has a style that determines how it appears and behaves.  An 
  8142. application specifies the style in either the WinCreateWindow function or the 
  8143. ENTRYFIELD statement in a resource-definition file.  An application can specify 
  8144. a combination of the following styles for an entry field. 
  8145.  
  8146. Entry-Field Styles 
  8147.  
  8148. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8149. ΓöéStyle          ΓöéDescription                                  Γöé
  8150. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8151. ΓöéES_ANY         ΓöéAllows the entry-field text to contain a     Γöé
  8152. Γöé               Γöémixture of double-byte and single-byte       Γöé
  8153. Γöé               Γöécharacters.                                  Γöé
  8154. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8155. ΓöéES_AUTOSCROLL  ΓöéAutomatically scrolls text horizontally to   Γöé
  8156. Γöé               Γöéshow the insertion point.                    Γöé
  8157. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8158. ΓöéES_AUTOSIZE    ΓöéAutomatically sets the size of the entry     Γöé
  8159. Γöé               Γöéfield, based on the width of the field's textΓöé
  8160. Γöé               Γöéstring and the metrics of the current system Γöé
  8161. Γöé               Γöéfont.  This style can set the width, height, Γöé
  8162. Γöé               Γöéor both-whichever has a value of -1 in the   Γöé
  8163. Γöé               ΓöéWinCreateWindow function or                  Γöé
  8164. Γöé               Γöéresource-definition file.  This style affectsΓöé
  8165. Γöé               Γöéonly the initial size of the entry field; it Γöé
  8166. Γöé               Γöédoes not adjust the size as the font or      Γöé
  8167. Γöé               Γöétext-string width changes.                   Γöé
  8168. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8169. ΓöéES_AUTOTAB     ΓöéAutomatically moves the cursor to the next   Γöé
  8170. Γöé               Γöécontrol window when the user enters the      Γöé
  8171. Γöé               Γöémaximum number of characters.                Γöé
  8172. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8173. ΓöéES_CENTER      ΓöéCenters text within the entry field.         Γöé
  8174. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8175. ΓöéES_DBCS        ΓöéSpecifies that the entry-field text consist  Γöé
  8176. Γöé               Γöéof double-byte characters only.              Γöé
  8177. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8178. ΓöéES_LEFT        ΓöéLeft-aligns text within the entry field.     Γöé
  8179. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8180. ΓöéES_MARGIN      ΓöéDraws a border around the entry field. The   Γöé
  8181. Γöé               Γöéborder is 1/2-character wide and             Γöé
  8182. Γöé               Γöé1/4-character high. Without this style, the  Γöé
  8183. Γöé               Γöéapplication draws no border around the entry Γöé
  8184. Γöé               Γöéfield. The width of the entry-field rectangleΓöé
  8185. Γöé               Γöéis increased on all sides by the width of    Γöé
  8186. Γöé               Γöéthis margin. After an entry field with the   Γöé
  8187. Γöé               ΓöéES_MARGIN style is created, the              Γöé
  8188. Γöé               ΓöéWinQueryWindowRect function returns a larger Γöé
  8189. Γöé               Γöérectangle that includes this margin and whoseΓöé
  8190. Γöé               Γöéorigin, therefore, is different from the     Γöé
  8191. Γöé               Γöéorigin specified when the entry field was    Γöé
  8192. Γöé               Γöécreated. If an application does not adjust   Γöé
  8193. Γöé               Γöéfor this size difference when moving or      Γöé
  8194. Γöé               Γöésizing an entry field, the entry field       Γöé
  8195. Γöé               Γöébecomes larger after each moving and sizing  Γöé
  8196. Γöé               Γöéoperation.                                   Γöé
  8197. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8198. ΓöéES_MIXED       ΓöéAllows the entry-field text to contain a     Γöé
  8199. Γöé               Γöémixture of single-byte and double-byte       Γöé
  8200. Γöé               Γöécharacters. Unlike the ES_ANY style, this    Γöé
  8201. Γöé               Γöéstyle lets ASCII DBCS data be converted to   Γöé
  8202. Γöé               ΓöéEBCDIC DBCS data without causing an overflow Γöé
  8203. Γöé               Γöécondition.                                   Γöé
  8204. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8205. ΓöéES_READONLY    ΓöéPrevents the user from entering or editing   Γöé
  8206. Γöé               Γöétext in the entry field.                     Γöé
  8207. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8208. ΓöéES_RIGHT       ΓöéRight-aligns text within the entry field.    Γöé
  8209. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8210. ΓöéES_SBCS        ΓöéSpecifies that the entry-field text must     Γöé
  8211. Γöé               Γöéconsist of single-byte characters only.      Γöé
  8212. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8213. ΓöéES_UNREADABLE  ΓöéDisplays each character as an asterisk (*).  Γöé
  8214. Γöé               ΓöéThis style is useful when obtaining a        Γöé
  8215. Γöé               Γöépassword from the user.                      Γöé
  8216. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8217.  
  8218.  
  8219. ΓòÉΓòÉΓòÉ 12.1.2. Entry-Field Notification Codes ΓòÉΓòÉΓòÉ
  8220.  
  8221. An entry field is always owned by another window.  A WM_CONTROL notification 
  8222. message is sent to the owner whenever an event occurs in the entry field.  This 
  8223. message contains a notification code that specifies the exact nature of the 
  8224. event.  An entry field can send the notification codes described in the 
  8225. following table to its owner. 
  8226.  
  8227. Notification of Entry-Field Events 
  8228.  
  8229. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8230. ΓöéNotification Code       ΓöéDescription                         Γöé
  8231. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8232. ΓöéEN_CHANGE               ΓöéIndicates that the contents of an   Γöé
  8233. Γöé                        Γöéentry field have changed.           Γöé
  8234. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8235. ΓöéEN_INSERTMODETOGGLE     ΓöéIndicates that the insert mode has  Γöé
  8236. Γöé                        Γöébeen toggled.                       Γöé
  8237. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8238. ΓöéEN_KILLFOCUS            ΓöéIndicates that an entry field has   Γöé
  8239. Γöé                        Γöélost the keyboard focus.            Γöé
  8240. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8241. ΓöéEN_MEMERROR             ΓöéIndicates that an entry field cannotΓöé
  8242. Γöé                        Γöéallocate enough memory to perform   Γöé
  8243. Γöé                        Γöéthe requested operation, such as    Γöé
  8244. Γöé                        Γöéextending the text limit.           Γöé
  8245. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8246. ΓöéEN_OVERFLOW             ΓöéIndicates that either the user or   Γöé
  8247. Γöé                        Γöéthe application attempted to exceed Γöé
  8248. Γöé                        Γöéthe text limit.                     Γöé
  8249. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8250. ΓöéEN_SCROLL               ΓöéIndicates that the text in an entry Γöé
  8251. Γöé                        Γöéfield is about to scroll.           Γöé
  8252. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8253. ΓöéEN_SETFOCUS             ΓöéIndicates that an entry field       Γöé
  8254. Γöé                        Γöéreceived the keyboard focus.        Γöé
  8255. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8256.  
  8257. An application typically ignores notification messages from an entry field, 
  8258. thus allowing default text editing to occur.  For more specialized uses, an 
  8259. application can use notification messages to filter input.  For example, if an 
  8260. entry field is intended for numbers only, an application can use the EN_CHANGE 
  8261. notification code to check the contents of the entry field each time the user 
  8262. enters a non-numeric character. 
  8263.  
  8264. As an alternative, an application can prevent inappropriate characters from 
  8265. reaching an entry field by using EN_SETFOCUS and EN_KILLFOCUS, in filter code, 
  8266. placed in the main message loop.  Whenever the entry field has the keyboard 
  8267. focus, the filter code can intercept and filter WM_CHAR messages before the 
  8268. WinDispatchMsg function passes them to the entry field.  An application also 
  8269. can respond to certain keystrokes, such as the Enter key, as long as the 
  8270. entry-field control has the keyboard focus. 
  8271.  
  8272.  
  8273. ΓòÉΓòÉΓòÉ 12.1.3. Default Entry-Field Behavior ΓòÉΓòÉΓòÉ
  8274.  
  8275. The following table lists and describes all the messages specifically handled 
  8276. by the predefined entry-field control-window class (WC_ENTRYFIELD). 
  8277.  
  8278. Messages Handled by WC_ENTRYFIELD Class 
  8279.  
  8280. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8281. ΓöéMessage                 ΓöéDescription                         Γöé
  8282. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8283. ΓöéEM_CLEAR                ΓöéDeletes the current text selection  Γöé
  8284. Γöé                        Γöéfrom the control window.            Γöé
  8285. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8286. ΓöéEM_COPY                 ΓöéCopies the current text selection toΓöé
  8287. Γöé                        Γöéthe system clipboard, in CF_TEXT    Γöé
  8288. Γöé                        Γöéformat.                             Γöé
  8289. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8290. ΓöéEM_CUT                  ΓöéCopies the current text selection toΓöé
  8291. Γöé                        Γöéthe system clipboard, in CF_TEXT    Γöé
  8292. Γöé                        Γöéformat, and deletes the selection   Γöé
  8293. Γöé                        Γöéfrom the control window.            Γöé
  8294. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8295. ΓöéEM_PASTE                ΓöéCopies the current contents of the  Γöé
  8296. Γöé                        Γöésystem clipboard that have CF_TEXT  Γöé
  8297. Γöé                        Γöéformat, replacing the current text  Γöé
  8298. Γöé                        Γöéselection in the control window.    Γöé
  8299. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8300. ΓöéEM_QUERYCHANGED         ΓöéReturns TRUE if the text has changedΓöé
  8301. Γöé                        Γöésince the last EM_QUERYCHANGED      Γöé
  8302. Γöé                        Γöémessage.                            Γöé
  8303. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8304. ΓöéEM_QUERYFIRSTCHAR       ΓöéReturns the offset to the first     Γöé
  8305. Γöé                        Γöécharacter visible at the left edge  Γöé
  8306. Γöé                        Γöéof the control window.              Γöé
  8307. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8308. ΓöéEM_QUERYREADONLY        ΓöéDetermines whether the entry field  Γöé
  8309. Γöé                        Γöéis in the read-only state.          Γöé
  8310. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8311. ΓöéEM_QUERYSEL             ΓöéReturns a long word that contains   Γöé
  8312. Γöé                        Γöéthe offsets for the first and last  Γöé
  8313. Γöé                        Γöécharacters of the current selection Γöé
  8314. Γöé                        Γöéin the control window.              Γöé
  8315. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8316. ΓöéEM_SETFIRSTCHAR         ΓöéScrolls the text so that the        Γöé
  8317. Γöé                        Γöécharacter at the specified offset isΓöé
  8318. Γöé                        Γöéthe first character visible at the  Γöé
  8319. Γöé                        Γöéleft edge of the control window.    Γöé
  8320. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8321. ΓöéEM_SETINSERTMODE        ΓöéToggles the text-entry mode between Γöé
  8322. Γöé                        Γöéinsert and overstrike.              Γöé
  8323. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8324. ΓöéEM_SETREADONLY          ΓöéSets the entry field to the         Γöé
  8325. Γöé                        Γöéread-only state.                    Γöé
  8326. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8327. ΓöéEM_SETSEL               ΓöéSets the current selection to the   Γöé
  8328. Γöé                        Γöéspecified character offsets.        Γöé
  8329. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8330. ΓöéEM_SETTEXTLIMIT         ΓöéAllocates memory from the control   Γöé
  8331. Γöé                        Γöéheap for the specified maximum      Γöé
  8332. Γöé                        Γöénumber of characters, returning TRUEΓöé
  8333. Γöé                        Γöéif it is successful and FALSE if it Γöé
  8334. Γöé                        Γöéis not. Failure causes the entry    Γöé
  8335. Γöé                        Γöéfield to send a WM_CONTROL message  Γöé
  8336. Γöé                        Γöéwith the EN_MEMERROR notification   Γöé
  8337. Γöé                        Γöécode to the owner window.           Γöé
  8338. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8339. ΓöéWM_ADJUSTWINDOWPOS      ΓöéChanges the size of the control     Γöé
  8340. Γöé                        Γöérectangle if the control has the    Γöé
  8341. Γöé                        ΓöéES_MARGIN style.                    Γöé
  8342. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8343. ΓöéWM_BUTTON1DBLCLK        ΓöéOccurs when the user presses mouse  Γöé
  8344. Γöé                        Γöébutton 1 twice.                     Γöé
  8345. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8346. ΓöéWM_BUTTON1DOWN          ΓöéSets the mouse capture and keyboard Γöé
  8347. Γöé                        Γöéfocus to the entry field, and       Γöé
  8348. Γöé                        Γöéprepares to track the movement of   Γöé
  8349. Γöé                        Γöéthe mouse during WM_MOUSEMOVE       Γöé
  8350. Γöé                        Γöémessages.                           Γöé
  8351. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8352. ΓöéWM_BUTTON1UP            ΓöéReleases the mouse.                 Γöé
  8353. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8354. ΓöéWM_BUTTON2DOWN          ΓöéReturns TRUE to prevent this messageΓöé
  8355. Γöé                        Γöéfrom being processed further.       Γöé
  8356. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8357. ΓöéWM_BUTTON3DOWN          ΓöéReturns TRUE to prevent this messageΓöé
  8358. Γöé                        Γöéfrom being processed further.       Γöé
  8359. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8360. ΓöéWM_CHAR                 ΓöéHandles text entry and other        Γöé
  8361. Γöé                        Γöékeyboard input events.              Γöé
  8362. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8363. ΓöéWM_CREATE               ΓöéValidates the requested style and   Γöé
  8364. Γöé                        Γöésets the window text.               Γöé
  8365. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8366. ΓöéWM_DESTROY              ΓöéFrees the memory used for the windowΓöé
  8367. Γöé                        Γöétext.                               Γöé
  8368. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8369. ΓöéWM_ENABLE               ΓöéSent when an application changes theΓöé
  8370. Γöé                        Γöéenabled state of a window.          Γöé
  8371. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8372. ΓöéWM_MOUSEMOVE            ΓöéIf the mouse button is down, the    Γöé
  8373. Γöé                        Γöéentry field tracks the text         Γöé
  8374. Γöé                        Γöéselection. If the mouse button is   Γöé
  8375. Γöé                        Γöéup, the entry field sets the mouse  Γöé
  8376. Γöé                        Γöépointer to the default arrow shape. Γöé
  8377. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8378. ΓöéWM_PAINT                ΓöéDraws the entry field and text.     Γöé
  8379. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8380. ΓöéWM_QUERYDLGCODE         ΓöéReturns the predefined              Γöé
  8381. Γöé                        ΓöéDLGC_ENTRYFIELD constant.           Γöé
  8382. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8383. ΓöéWM_QUERYWINDOWPARAMS    ΓöéReturns the requested window        Γöé
  8384. Γöé                        Γöéparameters.                         Γöé
  8385. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8386. ΓöéWM_SETFOCUS             ΓöéIf the entry field is gaining the   Γöé
  8387. Γöé                        Γöéfocus, it creates a cursor and sendsΓöé
  8388. Γöé                        Γöéthe owner window a WM_CONTROL       Γöé
  8389. Γöé                        Γöémessage with the EN_SETFOCUS        Γöé
  8390. Γöé                        Γöénotification code. If the entry     Γöé
  8391. Γöé                        Γöéfield is losing the focus, it       Γöé
  8392. Γöé                        Γöédestroys the current cursor and     Γöé
  8393. Γöé                        Γöésends the owner window a WM_CONTROL Γöé
  8394. Γöé                        Γöémessage with the EN_KILLFOCUS       Γöé
  8395. Γöé                        Γöénotification code.                  Γöé
  8396. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8397. ΓöéWM_SETSELECTION         ΓöéToggles the current selection       Γöé
  8398. Γöé                        Γöéstatus.                             Γöé
  8399. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8400. ΓöéWM_SETWINDOWPARAMS      ΓöéSets the specified window           Γöé
  8401. Γöé                        Γöéparameters, redraws the entry field,Γöé
  8402. Γöé                        Γöéand sends the owner window a        Γöé
  8403. Γöé                        ΓöéWM_CONTROL message with the         Γöé
  8404. Γöé                        ΓöéEN_CHANGE notification code.        Γöé
  8405. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8406. ΓöéWM_TIMER                ΓöéBlinks the insertion point if the   Γöé
  8407. Γöé                        Γöéentry field has the focus. The entryΓöé
  8408. Γöé                        Γöéfield scrolls the text, if          Γöé
  8409. Γöé                        Γöénecessary, while extending the      Γöé
  8410. Γöé                        Γöéselection to text that becomes      Γöé
  8411. Γöé                        Γöévisible in the window.              Γöé
  8412. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8413.  
  8414.  
  8415. ΓòÉΓòÉΓòÉ 12.1.4. Entry-Field Text Editing ΓòÉΓòÉΓòÉ
  8416.  
  8417. The user can insert (type) text or numeric values in an entry field when that 
  8418. entry field has the keyboard focus.  An application can insert text by using 
  8419. the WinSetWindowText function.  An application can insert numeric values by 
  8420. using the WinSetDlgItemShort function.  The text or numeric value is inserted 
  8421. into the entry field at the cursor position. 
  8422.  
  8423. The entry field's entry mode, either insert or overstrike, determines what 
  8424. happens when the user enters text.  The user sets the entry mode by pressing 
  8425. the Insert key; the entry mode toggles each time the Insert key is pressed. 
  8426. The application can set the entry mode by sending the EM_SETINSERTMODE message 
  8427. to the entry field. 
  8428.  
  8429. The cursor position, identified by a blinking bar, is specified by a character 
  8430. offset relative to the beginning of the text.  The user can set the cursor 
  8431. position by using the mouse or the Arrow keys.  An application can set the 
  8432. cursor position by using the EM_SETSEL message.  This message directs the entry 
  8433. field to move the blinking bar to the given character position. 
  8434.  
  8435. The EM_SETSEL message also sets the selection.  The selection is one or more 
  8436. characters of text on which the entry field carries out an operation, such as 
  8437. deleting or copying to the clipboard.  The user selects text by pressing the 
  8438. Shift key while moving the cursor, or by pressing mouse button 1 while moving 
  8439. the mouse.  An application selects text by using the EM_SETSEL message to 
  8440. specify the cursor position and the anchor point.  The selection includes all 
  8441. text between the cursor position and the anchor point.  If the cursor position 
  8442. and anchor point are equal, there is no selection.  An application can retrieve 
  8443. the selection (cursor position and anchor point) by using the EM_QUERYSEL 
  8444. message. 
  8445.  
  8446. The user can delete characters, one at a time, by pressing the Delete key or 
  8447. the Backspace key.  The Delete key deletes the character to the right of the 
  8448. cursor; the Backspace key deletes the character to the left of the cursor.  The 
  8449. user also can delete a group of characters by selecting them and pressing the 
  8450. Delete key.  An application can delete selected text by using the EM_CLEAR 
  8451. message. 
  8452.  
  8453. An application can use the EM_QUERYCHANGED message to determine whether the 
  8454. contents of an entry field have changed. 
  8455.  
  8456. An application can prevent the user from editing an entry field by setting the 
  8457. ES_READONLY style in the WinCreateWindow function or in the ENTRYFIELD 
  8458. statement in the resource-definition file.  The application also can set and 
  8459. query the read-only state by using the EM_SETREADONLY and ES_QUERYREADONLY 
  8460. messages. 
  8461.  
  8462. If text extends beyond the left or right edges of an entry field, the user can 
  8463. scroll the text by using the Arrow keys.  An application can scroll the text by 
  8464. using the EM_SETFIRSTCHAR message to specify the first character visible at the 
  8465. left edge of the entry field.  For scrolling to occur, the entry field must 
  8466. have the ES_AUTOSCROLL style.  An application can use the EM_QUERYFIRSTCHAR 
  8467. message to obtain the first character that is currently visible. 
  8468.  
  8469.  
  8470. ΓòÉΓòÉΓòÉ 12.1.5. Entry-Field Control Copy and Paste Operations ΓòÉΓòÉΓòÉ
  8471.  
  8472. The user can cut, copy, and paste text in an entry field by using the 
  8473. Shift+Delete and Ctrl+Insert key combinations.  An application, either by 
  8474. itself or in response to the user, can cut, copy, and paste text by using the 
  8475. EM_CUT, EM_COPY, and EM_PASTE messages.  An application can use the ES_CUT and 
  8476. EM_COPY messages to copy the selected text to the clipboard.  The EM_CUT 
  8477. message also deletes the text (EM_COPY does not).  The EM_PASTE message copies 
  8478. the text on the clipboard to the current position in the entry field, replacing 
  8479. any existing text with the copied text.  An application can delete the selected 
  8480. text, without copying it to the clipboard, by using the EM_CLEAR message. 
  8481.  
  8482.  
  8483. ΓòÉΓòÉΓòÉ 12.1.6. Entry-Field Text Retrieval ΓòÉΓòÉΓòÉ
  8484.  
  8485. An application can retrieve selected text from an entry field by calling 
  8486. WinQueryWindowText and then sending an EM_QUERYSEL message to retrieve the 
  8487. offsets to the first and last characters of the text selection.  These offsets 
  8488. are used to retrieve selected text. 
  8489.  
  8490. An application can retrieve numeric values by calling WinQueryDlgItemShort, 
  8491. passing the entry-field identifier and the handle of the owner window. 
  8492. WinQueryDlgItemShort converts the entry-field text to a signed or unsigned 
  8493. integer and returns the value in a specified variable.  The application can use 
  8494. the WinWindowFromID function to retrieve the handle of the control window.  The 
  8495. entry-field identifier is specified in the dialog template in the application's 
  8496. resource-definition file. 
  8497.  
  8498.  
  8499. ΓòÉΓòÉΓòÉ 12.2. Using Entry-Field Controls ΓòÉΓòÉΓòÉ
  8500.  
  8501. This section explains how to perform the following tasks: 
  8502.  
  8503. o Create an entry field in a dialog or client window. 
  8504. o Change the default size of the entry field. 
  8505.  
  8506.  
  8507. ΓòÉΓòÉΓòÉ 12.2.1. Creating an Entry Field in a Dialog Window ΓòÉΓòÉΓòÉ
  8508.  
  8509. A dialog window usually serves as the parent and owner of an entry field.  The 
  8510. dialog window often includes a button that indicates whether the user wants to 
  8511. carry out an operation.  When the user selects the button, the application 
  8512. queries the contents of the entry field and proceeds with the operation. 
  8513.  
  8514. The definition of an entry field in an application's resource-definition file 
  8515. sets the initial text, window identifier, size, position, and style of the 
  8516. entry field.  The following example shows how to define an entry field as part 
  8517. of a dialog template: 
  8518.  
  8519.  
  8520.     DLGTEMPLATE IDD_SAMPLE
  8521.     BEGIN
  8522.         DIALOG "Sample Dialog", ID_DLG, 7, 7, 253, 145, FS_DLGBORDER,0
  8523.         BEGIN
  8524.             DEFPUSHBUTTON "~OK", DID_OK, 8, 151, 50, 23, WS_GROUP
  8525.             ENTRYFIELD "Here is some text", ID_ENTFLD, 42, 46, 68, 15,
  8526.                 ES_MARGIN | ES_AUTOSCROLL
  8527.         END
  8528.     END
  8529.  
  8530.  
  8531. ΓòÉΓòÉΓòÉ 12.2.2. Creating an Entry Field in a Client Window ΓòÉΓòÉΓòÉ
  8532.  
  8533. To create an entry field in a non-dialog window, an application calls 
  8534. WinCreateWindow with the window class WC_ENTRYFIELD.  The entry field is owned 
  8535. by an application's client window, whose window procedure receives notification 
  8536. messages from the entry field. 
  8537.  
  8538. The following code fragment shows how to create an entry field in a client 
  8539. window: 
  8540.  
  8541.  
  8542. CodeforCreatinganEntryFieldinaClientWindow
  8543.  
  8544.     #define ID_ENTRYFIELD 5
  8545.  
  8546.     HWND hwnd, hwndEntryField1, hwndClient;
  8547.     LONG xPos   =  50, yPos    = 100;
  8548.     LONG xWidth = 100, yHeight =  20;
  8549.  
  8550.     hwndEntryField1 = WinCreateWindow(
  8551.         hwndClient,            /* Parent-window handle */
  8552.         WC_ENTRYFIELD,         /* Window class         */
  8553.         "initial text",        /* Initial text         */
  8554.         WS_VISIBLE    |        /* Visible when created */
  8555.         ES_AUTOSCROLL |        /* Scroll text          */
  8556.         ES_MARGIN,             /* Create a border      */
  8557.         xPos, yPos,            /* x and y position     */
  8558.         xWidth, yHeight,       /* Width and height     */
  8559.         hwnd,                  /* Owner-window handle  */
  8560.         HWND_TOP,              /* Z-order position     */
  8561.         ID_ENTRYFIELD,         /* Window identifier    */
  8562.         NULL,                  /* No control data      */
  8563.         NULL);                 /* No pres. parameters  */
  8564.  
  8565.  
  8566. ΓòÉΓòÉΓòÉ 12.2.3. Changing the Default Size of an Entry Field ΓòÉΓòÉΓòÉ
  8567.  
  8568. The default text limit of an entry field is 32 characters.  An application can 
  8569. set a non-default size when creating an entry field by setting the cchEditLimit 
  8570. member of an ENTRYFDATA structure and supplying a pointer to the structure as 
  8571. the pCtlData parameter to WinCreateWindow. 
  8572.  
  8573. The following code fragment creates an entry field with a text limit of 12 
  8574. characters: 
  8575.  
  8576.  
  8577. CodeforCreatingEntryFieldwith12 - CharacterTextLimit
  8578.  
  8579.     HWND hwndEntryField2;
  8580.     HWND hwndClient;
  8581.     ENTRYFDATA efd;
  8582.     LONG xPos   = 50, yPos    = 50;
  8583.     LONG xWidth = -1, yHeight = -1; /* must be -1 for ES_AUTOSIZE */
  8584.  
  8585.     /* Initialize the ENTRYFDATA structure. */
  8586.     efd.cb = sizeof(ENTRYFDATA);
  8587.     efd.cchEditLimit = 12;
  8588.     efd.ichMinSel = 0;
  8589.     efd.ichMaxSel = 0;
  8590.  
  8591.     /* Create the entry field. */
  8592.     hwndEntryField2 = WinCreateWindow(
  8593.         hwndClient,            /* Parent-window handle */
  8594.         WC_ENTRYFIELD,         /* Window class         */
  8595.         "projects.xls",        /* No initial text      */
  8596.         WS_VISIBLE |           /* Visible when created */
  8597.         ES_MARGIN  |           /* Create a border.     */
  8598.         ES_AUTOSIZE,           /* System sets the size */
  8599.         xPos, yPos,            /* x and y positions    */
  8600.         xWidth, yHeight,       /* Width and height     */
  8601.         hwndClient,            /* Owner-window handle  */
  8602.         HWND_TOP,              /* Z-order position     */
  8603.         0,                     /* Window identifier    */
  8604.         &efd,                  /* Control data         */
  8605.         NULL);                 /* No pres. parameters  */
  8606.  
  8607. To expand or reduce the text limit after creating the entry field, an 
  8608. application can send an EM_SETTEXTLIMIT message specifying a new maximum text 
  8609. limit for the entry field.  The following code fragment increases to 20 
  8610. characters the text limit of the entry field created in the previous example: 
  8611.  
  8612.  
  8613. CodeforCreatingEntryFieldwith20 - CharacterTextLimit
  8614.  
  8615.     WinSendMsg(hwndEntryField2, EM_SETTEXTLIMIT,
  8616.         (MPARAM)20, (MPARAM)0);
  8617.  
  8618.  
  8619. ΓòÉΓòÉΓòÉ 12.2.4. Retrieving Text From an Entry Field ΓòÉΓòÉΓòÉ
  8620.  
  8621. An application can use the WinQueryWindowTextLength and WinQueryWindowText 
  8622. functions to retrieve the text from an entry field.  WinQueryWindowTextLength 
  8623. returns the length of the text; WinQueryWindowText copies the window text to a 
  8624. buffer. 
  8625.  
  8626. Typically, an application needs to retrieve the text from an entry field only 
  8627. if the user changes the text.  An entry field sends an EN_CHANGE notification 
  8628. code in the low word of the first message parameter of the WM_CONTROL message 
  8629. whenever the text changes.  The following code fragment sets a flag when it 
  8630. receives the EN_CHANGE code, checks the flag during the WM_COMMAND message and, 
  8631. if it is set, retrieves the text of the entry field: 
  8632.  
  8633.  
  8634. CodeforFlaggingaTextChangeinanEntryField
  8635.  
  8636.     HWND hwnd;
  8637.     ULONG msg;
  8638.     MPARAM mp1;
  8639.     CHAR chBuf[64];
  8640.     HWND hwndEntryField;
  8641.     LONG cbTextLen;
  8642.     LONG cbTextRead;
  8643.     static BOOL fFieldChanged = FALSE;
  8644.  
  8645.     switch (msg) {
  8646.         case WM_CONTROL:
  8647.             switch (SHORT1FROMMP(mp1)) {
  8648.                 case IDD_ENTRYFIELD:
  8649.  
  8650.                     /* Check if the user changed the entry-field text. */
  8651.                     if ((USHORT) SHORT2FROMMP(mp1) == EN_CHANGE)
  8652.                         fFieldChanged = TRUE;
  8653.                     return 0;
  8654.             }
  8655.  
  8656.         case WM_COMMAND:
  8657.             switch (SHORT1FROMMP(mp1)) {
  8658.                 case DID_OK:
  8659.  
  8660.                     /* If the user changed the entry-field text,       */
  8661.                     /* obtain the text and store it in a buffer.       */
  8662.                     if (fFieldChanged) {
  8663.                         hwndEntryField = WinWindowFromID(hwnd,
  8664.                             IDD_ENTRYFIELD);
  8665.                         cbTextLen = WinQueryWindowTextLength(hwndEntryField);
  8666.                         cbTextRead = WinQueryWindowText(hwndEntryField,
  8667.                             sizeof(chBuf), chBuf);
  8668.                         .
  8669.                         . /* Do something with the text.               */
  8670.                         .
  8671.                     }
  8672.                     WinDismissDlg(hwnd, 1);
  8673.                     return 0;
  8674.             }
  8675.     }
  8676.  
  8677.  
  8678. ΓòÉΓòÉΓòÉ 12.3. Summary ΓòÉΓòÉΓòÉ
  8679.  
  8680. Following are the OS/2 functions, structures, and messages used with 
  8681. entry-field controls. 
  8682.  
  8683. Entry-Field Functions 
  8684.  
  8685. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8686. ΓöéFunction Name           ΓöéDescription                         Γöé
  8687. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8688. ΓöéWinQueryDlgItemShort    ΓöéConverts the text of a dialog item  Γöé
  8689. Γöé                        Γöéinto an integer value.              Γöé
  8690. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8691. ΓöéWinQueryWindowText      ΓöéCopies window text into a buffer.   Γöé
  8692. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8693. ΓöéWinQueryWindowTextLengthΓöéReturns the length of the window    Γöé
  8694. Γöé                        Γöétext, excluding any NULL terminationΓöé
  8695. Γöé                        Γöécharacter.                          Γöé
  8696. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8697. ΓöéWinSetDlgItemShort      ΓöéConverts an integer value into the  Γöé
  8698. Γöé                        Γöétext of a dialog item.              Γöé
  8699. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8700. ΓöéWinSetWindowText        ΓöéSets the window text for a specifiedΓöé
  8701. Γöé                        Γöéwindow.                             Γöé
  8702. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8703.  
  8704. Entry-Field Structure 
  8705.  
  8706. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8707. ΓöéStructure Name          ΓöéDescription                         Γöé
  8708. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8709. ΓöéENTRYFDATA              ΓöéEntry-field data structure          Γöé
  8710. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8711.  
  8712. Messages Sent to an Entry Field 
  8713.  
  8714. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8715. ΓöéMessage                 ΓöéDescription                         Γöé
  8716. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8717. ΓöéEM_CLEAR                ΓöéDeletes the text that forms the     Γöé
  8718. Γöé                        Γöécurrent selection.                  Γöé
  8719. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8720. ΓöéEM_COPY                 ΓöéSends the current selection to the  Γöé
  8721. Γöé                        Γöéclipboard.                          Γöé
  8722. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8723. ΓöéEM_CUT                  ΓöéSends the text that forms the       Γöé
  8724. Γöé                        Γöécurrent selection to the clipboard, Γöé
  8725. Γöé                        Γöéthen deletes it from the entry fieldΓöé
  8726. Γöé                        Γöécontrol.                            Γöé
  8727. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8728. ΓöéEM_PASTE                ΓöéReplaces the text that forms the    Γöé
  8729. Γöé                        Γöécurrent selection with text from theΓöé
  8730. Γöé                        Γöéclipboard.                          Γöé
  8731. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8732. ΓöéEM_QUERYCHANGED         ΓöéQueries whether the text of the     Γöé
  8733. Γöé                        Γöéentry field control has been changedΓöé
  8734. Γöé                        Γöésince the last inquiry.             Γöé
  8735. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8736. ΓöéEM_QUERYFIRSTCHAR       ΓöéReturns the zero-based offset of theΓöé
  8737. Γöé                        Γöéfirst character displayed in the    Γöé
  8738. Γöé                        Γöéentry field control.                Γöé
  8739. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8740. ΓöéEM_QUERYREADONLY        ΓöéReturns the read-only state of an   Γöé
  8741. Γöé                        Γöéentry field control.                Γöé
  8742. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8743. ΓöéEM_QUERYSEL             ΓöéGets the zero-based offsets of the  Γöé
  8744. Γöé                        Γöébounds of the text that forms the   Γöé
  8745. Γöé                        Γöécurrent selection.                  Γöé
  8746. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8747. ΓöéEM_SETFIRSTCHAR         ΓöéSpecifies the offset of the         Γöé
  8748. Γöé                        Γöécharacter to be displayed in the    Γöé
  8749. Γöé                        Γöéfirst position of the entry field   Γöé
  8750. Γöé                        Γöécontrol.                            Γöé
  8751. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8752. ΓöéEM_SETINSERTMODE        ΓöéSets the insert mode of an entry    Γöé
  8753. Γöé                        Γöéfield.                              Γöé
  8754. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8755. ΓöéEM_SETREADONLY          ΓöéSets the read-only state of an entryΓöé
  8756. Γöé                        Γöéfield control.                      Γöé
  8757. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8758. ΓöéEM_SETSEL               ΓöéSets the zero-based offsets of the  Γöé
  8759. Γöé                        Γöébounds of the text that forms the   Γöé
  8760. Γöé                        Γöécurrent selection.                  Γöé
  8761. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8762. ΓöéEM_SETTEXTLIMIT         ΓöéSets the maximum number of bytes    Γöé
  8763. Γöé                        Γöéthat an entry field control can     Γöé
  8764. Γöé                        Γöécontain.                            Γöé
  8765. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8766.  
  8767. Message Generated by an Entry Field to its Owner Window 
  8768.  
  8769. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8770. ΓöéMessage                 ΓöéDescription                         Γöé
  8771. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8772. ΓöéWM_CHAR                 ΓöéOccurs when the user presses a key. Γöé
  8773. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8774. ΓöéWM_CONTROL              ΓöéOccurs when a control has a         Γöé
  8775. Γöé                        Γöésignificant event to notify to its  Γöé
  8776. Γöé                        Γöéowner.                              Γöé
  8777. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8778. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  8779. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  8780. Γöé                        Γöéconversion of DBCS characters.      Γöé
  8781. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8782. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  8783. Γöé                        Γöéthe entry field control window      Γöé
  8784. Γöé                        Γöéparameters.                         Γöé
  8785. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8786. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  8787. Γöé                        Γöéchanges the entry field control     Γöé
  8788. Γöé                        Γöéwindow parameters.                  Γöé
  8789. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8790.  
  8791.  
  8792. ΓòÉΓòÉΓòÉ 13. Multiple-Line Entry Field Controls ΓòÉΓòÉΓòÉ
  8793.  
  8794. A multiple-line entry (MLE) field is a sophisticated control window that 
  8795. enables a user to view and edit multiple lines of text.  This chapter describes 
  8796. how to create and use multiple-line entry field controls in a PM application. 
  8797.  
  8798.  
  8799. ΓòÉΓòÉΓòÉ 13.1. About Multiple-Line Entry Field Controls ΓòÉΓòÉΓòÉ
  8800.  
  8801. An MLE field control gives an application the text-editing capabilities of a 
  8802. simple text editor.  The application can create a multiple-line entry field by 
  8803. using the WinCreateWindow function or by specifying the MLE statement in a 
  8804. dialog-window template in a resource-definition file. 
  8805.  
  8806.  
  8807. ΓòÉΓòÉΓòÉ 13.1.1. MLE Styles ΓòÉΓòÉΓòÉ
  8808.  
  8809. The style of an MLE field control determines how the MLE field appears and 
  8810. behaves.  An application can specify a combination of the following styles for 
  8811. an MLE field: 
  8812.  
  8813. Multiple-Line Entry Field Styles 
  8814.  
  8815. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8816. ΓöéStyle          ΓöéDescription                                  Γöé
  8817. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8818. ΓöéMLS_BORDER     ΓöéDraws a border around the MLE field.         Γöé
  8819. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8820. ΓöéMLS_HSCROLL    ΓöéAdds a horizontal scroll bar to the MLE      Γöé
  8821. Γöé               Γöéfield.  The MLE control enables this scroll  Γöé
  8822. Γöé               Γöébar whenever any line exceeds the width of   Γöé
  8823. Γöé               Γöéthe MLE field.                               Γöé
  8824. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8825. ΓöéMLS_IGNORETAB  ΓöéDirects the MLE control to ignore the Tab    Γöé
  8826. Γöé               Γöékey.                                         Γöé
  8827. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8828. ΓöéMLS_READONLY   ΓöéPrevents the MLE field from accepting text   Γöé
  8829. Γöé               Γöéfrom the user.  This style is useful for     Γöé
  8830. Γöé               Γöédisplaying lengthy static text in a client orΓöé
  8831. Γöé               Γöédialog window.                               Γöé
  8832. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8833. ΓöéMLS_VSCROLL    ΓöéAdds a vertical scroll bar to the MLE field. Γöé
  8834. Γöé               ΓöéThe MLE control enables this scroll bar      Γöé
  8835. Γöé               Γöéwhenever the number of lines exceeds the     Γöé
  8836. Γöé               Γöéheight of the MLE field.                     Γöé
  8837. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8838. ΓöéMLS_WORDWRAP   ΓöéAutomatically breaks lines that are longer   Γöé
  8839. Γöé               Γöéthan the width of the MLE field.             Γöé
  8840. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8841.  
  8842.  
  8843. ΓòÉΓòÉΓòÉ 13.1.2. MLE Control Notification Codes ΓòÉΓòÉΓòÉ
  8844.  
  8845. An MLE field control sends WM_CONTROL messages containing notification codes to 
  8846. its owner whenever certain events occur-for example, when the user or 
  8847. application tries to insert too much text, or when the user uses the scroll 
  8848. bars.  The owner window uses the notification codes either to carry out custom 
  8849. operations for the MLE field or to respond to errors. 
  8850.  
  8851. An MLE field control can send the following notification codes to its owner: 
  8852.  
  8853. Multiple-Line Entry Field Control Notification Codes 
  8854.  
  8855. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8856. ΓöéCode                    ΓöéDescription                         Γöé
  8857. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8858. ΓöéMLN_CHANGE              ΓöéIndicates that the contents of the  Γöé
  8859. Γöé                        ΓöéMLE field have changed.             Γöé
  8860. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8861. ΓöéMLN_CLPBDFAIL           ΓöéIndicates that a clipboard operationΓöé
  8862. Γöé                        Γöéfailed.                             Γöé
  8863. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8864. ΓöéMLN_HSCROLL             ΓöéIndicates that the MLE text is aboutΓöé
  8865. Γöé                        Γöéto scroll horizontally.             Γöé
  8866. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8867. ΓöéMLN_KILLFOCUS           ΓöéIndicates that the MLE field lost   Γöé
  8868. Γöé                        Γöéthe input focus.                    Γöé
  8869. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8870. ΓöéMLN_MARGIN              ΓöéIndicates that the mouse moved      Γöé
  8871. Γöé                        Γöéacross the MLE field margin.        Γöé
  8872. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8873. ΓöéMLN_MEMERROR            ΓöéIndicates that the MLE field controlΓöé
  8874. Γöé                        Γöécannot allocate enough memory to    Γöé
  8875. Γöé                        Γöéperform the requested operation.    Γöé
  8876. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8877. ΓöéMLN_OVERFLOW            ΓöéIndicates that the specified MLE    Γöé
  8878. Γöé                        Γöéoperation would overflow the field'sΓöé
  8879. Γöé                        Γöétext limit or the format rectangle. Γöé
  8880. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8881. ΓöéMLN_PIXHORZOVERFLOW     ΓöéIndicates that the user entered moreΓöé
  8882. Γöé                        Γöétext than could fit horizontally in Γöé
  8883. Γöé                        Γöéthe MLE field.                      Γöé
  8884. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8885. ΓöéMLN_PIXVERTOVERFLOW     ΓöéIndicates that the user entered moreΓöé
  8886. Γöé                        Γöétext than could fit vertically in   Γöé
  8887. Γöé                        Γöéthe MLE field.                      Γöé
  8888. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8889. ΓöéMLN_SEARCHPAUSE         ΓöéIndicates that the MLE field controlΓöé
  8890. Γöé                        Γöépaused during a search operation    Γöé
  8891. Γöé                        Γöéinitiated by an MLM_SEARCH message. Γöé
  8892. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8893. ΓöéMLN_SETFOCUS            ΓöéIndicates that the MLE field        Γöé
  8894. Γöé                        Γöéreceived the input focus.           Γöé
  8895. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8896. ΓöéMLN_TEXTOVERFLOW        ΓöéIndicates that the user or          Γöé
  8897. Γöé                        Γöéapplication attempted to exceed the Γöé
  8898. Γöé                        Γöétext limit of the MLE field.        Γöé
  8899. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8900. ΓöéMLN_UNDOOVERFLOW        ΓöéIndicates that the MLE field controlΓöé
  8901. Γöé                        Γöécannot undo a text change because   Γöé
  8902. Γöé                        Γöéthe undo operation involves too muchΓöé
  8903. Γöé                        Γöétext.                               Γöé
  8904. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8905. ΓöéMLN_VSCROLL             ΓöéIndicates that the MLE text is aboutΓöé
  8906. Γöé                        Γöéto scroll vertically.               Γöé
  8907. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8908.  
  8909. The MLE field control sends the MLN_HSCROLL or MLN_VSCROLL notification codes 
  8910. when the user enables the scroll bars so that the application can monitor the 
  8911. visible contents of the MLE field.  The application also can monitor the 
  8912. contents of an MLE field by using the MLM_QUERYFIRSTCHAR message, which 
  8913. specifies the offset of the character in the upper-left corner of the MLE 
  8914. field.  This represents the first MLE character that is visible to the user. 
  8915. To provide an alternative way of scrolling the contents of an MLE field, an 
  8916. application can move the character at the specified offset to the upper-left 
  8917. corner of an MLE field using the MLM_SETFIRSTCHAR message. 
  8918.  
  8919. The MLE field control sends an MLN_CHANGE notification code when the user 
  8920. changes the text in some way.  This notification code is especially useful when 
  8921. the MLE field is in a dialog window, because the dialog procedure can use this 
  8922. code to determine whether it should process the contents of the MLE field.  If 
  8923. an application does not process MLN_CHANGE notification codes, it can use the 
  8924. MLM_QUERYCHANGED message to determine whether the user has made changes to the 
  8925. MLE text.  The MLM_SETCHANGED message makes the MLE field control send an 
  8926. MLN_CHANGE notification code with every event that occurs in the MLE field, 
  8927. regardless of whether the user has changed anything.  This code also can be 
  8928. used to hide a change made by a user. 
  8929.  
  8930.  
  8931. ΓòÉΓòÉΓòÉ 13.1.3. MLE Text Editing ΓòÉΓòÉΓòÉ
  8932.  
  8933. An MLE field contains one or more lines of text.  Each line consists of one or 
  8934. more characters and ends with one or more characters that represent the end of 
  8935. the line.  The end-of-line characters are determined by the format of the text. 
  8936.  
  8937. The user can type text in an MLE field when the MLE field has the focus.  The 
  8938. application can insert text at any time by using the MLM_INSERT message and 
  8939. specifying the text as a null-terminated string.  The MLE field control inserts 
  8940. the text at the cursor position or replaces the selected text. 
  8941.  
  8942. The MLE field control entry mode, insert or overstrike, determines what happens 
  8943. when the user inserts text.  The user sets the entry mode by pressing the 
  8944. Insert key.  The entry mode alternates each time the user presses Insert.  When 
  8945. overstrike mode is enabled, at least one character is selected.  This means 
  8946. that the MLM_INSERT message always replaces at least one character.  If insert 
  8947. mode is enabled, the MLM_INSERT message replaces only those characters the user 
  8948. or application has selected.  Otherwise, the MLE field makes room for the 
  8949. inserted characters by moving existing characters to the right, starting at the 
  8950. cursor position. 
  8951.  
  8952. The cursor position, identified by a blinking bar, is specified as a character 
  8953. offset relative to the beginning of the text.  The user can set the cursor 
  8954. position by using the mouse or Arrow keys to move the blinking bar.  An 
  8955. application can set the cursor position by using the MLM_SETSEL message, which 
  8956. directs the MLE field control to move the blinking bar to a given character 
  8957. position.  The MLM_SETSEL message also can set the selection. 
  8958.  
  8959. The selection is one or more characters of text on which the MLE field control 
  8960. carries out an operation, such as deleting or copying.  The user selects text 
  8961. by pressing the Shift key while moving the cursor or by pressing mouse button 1 
  8962. while moving the mouse.  The user also can select a word in a block of text by 
  8963. double-clicking on the word.  An application selects text by using the 
  8964. MLM_SETSEL message to specify the cursor position and the anchor point.  The 
  8965. selection is all the text between the cursor position and the anchor point.  If 
  8966. the cursor position and anchor point are equal, there is no selection.  An 
  8967. application can retrieve the cursor position, anchor point, or both, by using 
  8968. the MLM_QUERYSEL message. 
  8969.  
  8970. The user can delete characters, one at a time, by pressing the Delete key or 
  8971. the Backspace key.  Pressing the Delete key deletes the character to the right 
  8972. of the cursor; pressing the Backspace key deletes the character to the left of 
  8973. the cursor and changes the cursor position.  An application can delete one or 
  8974. more characters by using the MLM_DELETE message, which directs the MLE field 
  8975. control to delete a specified number of characters, starting at the given 
  8976. position.  This message does not change the cursor position.  An application 
  8977. can delete selected text by using the MLM_CLEAR message. 
  8978.  
  8979. An application can reverse the previous operation by using the MLM_UNDO 
  8980. message, which restores the MLE field to its previous state.  This is a quick 
  8981. way to fix editing mistakes.  However, not all operations can be undone. 
  8982.  
  8983. The application determines whether the previous operation can be undone by 
  8984. using the MLM_QUERYUNDO message, which returns TRUE and indicates the type of 
  8985. operation that can be undone.  Using the MLM_RESETUNDO message, an application 
  8986. can prevent a subsequent MLM_UNDO message from changing the state of an MLE 
  8987. field. 
  8988.  
  8989.  
  8990. ΓòÉΓòÉΓòÉ 13.1.4. MLE Text Formatting ΓòÉΓòÉΓòÉ
  8991.  
  8992. An application can retrieve the number of lines of text in an MLE field by 
  8993. using the MLM_QUERYLINECOUNT message and can retrieve the number of characters 
  8994. in the MLE field by using the MLM_QUERYTEXTLENGTH message.  The amount of text 
  8995. and, subsequently, the number of lines to be entered in an MLE field depend on 
  8996. the text limit.  An application sets the text limit by using the 
  8997. MLM_SETTEXTLIMIT message and determines the current limit by using the 
  8998. MLM_QUERYTEXTLIMIT message.  The user cannot set the text limit.  If the user 
  8999. types to the text limit, the MLE field control beeps and ignores any subsequent 
  9000. keystrokes.  If the application attempts to add text beyond the limit, the MLE 
  9001. field control truncates the text. 
  9002.  
  9003. An application can control the length of each line in an MLE field by enabling 
  9004. word wrapping.  When word wrapping is enabled, the MLE field control 
  9005. automatically breaks any line that is longer than the MLE field is wide.  An 
  9006. application can set word wrapping by using the MLM_SETWRAP message, and it can 
  9007. determine whether the MLE field control is wrapping text by using the 
  9008. MLM_QUERYWRAP message.  Word wrapping is disabled by default unless the 
  9009. application specifies the MLS_WORDWRAP style when creating the MLE field 
  9010. control. 
  9011.  
  9012. An application can set tab stops for an MLE control by using the MLM_SETTABSTOP 
  9013. message.  Tab stops specify the maximum width of a tab character.  When the 
  9014. user or an application inserts a tab character, the MLE field control expands 
  9015. the character so that it fills the space between the cursor position and the 
  9016. next tab stop.  The MLM_SETTABSTOP message sets the distance (in pels) between 
  9017. tab stops, and the MLE field control provides as many tab stops as necessary, 
  9018. no matter how long the line gets.  An application can retrieve the distance 
  9019. between tab stops using the MLM_QUERYTABSTOP message. 
  9020.  
  9021. An application can use the MLM_SETFORMATRECT message to set the format 
  9022. rectangle (MLE field).  The format rectangle is used to set the horizontal and 
  9023. vertical limits for text.  The MLE control sends a notification message to the 
  9024. parent window of the MLE field if text exceeds either of those limits.  An 
  9025. application typically uses the format rectangle to provide its own word 
  9026. wrapping or other special text processing.  An application can retrieve the 
  9027. current format rectangle by using the MLM_QUERYFORMATRECT message. 
  9028.  
  9029. An application can prevent the user's editing of the MLE field by setting the 
  9030. MLS_READONLY style in the WinCreateWindow function or in the MLE statement in 
  9031. the resource-definition file.  The application also can set and query the 
  9032. read-only state by using the MLM_SETREADONLY and MLM_QUERYREADONLY messages, 
  9033. respectively. 
  9034.  
  9035. An application can set the colors and font for an MLE field by using the 
  9036. MLM_SETTEXTCOLOR, MLM_SETBACKCOLOR, and MLM_SETFONT messages.  These messages 
  9037. affect all text in the MLE field.  An MLE field cannot contain a mixture of 
  9038. fonts and colors.  An application can retrieve the current values for the 
  9039. colors and font by using the MLM_QUERYTEXTCOLOR, MLM_QUERYBACKCOLOR, and 
  9040. MLM_QUERYFONT messages. 
  9041.  
  9042.  
  9043. ΓòÉΓòÉΓòÉ 13.1.5. MLE Text Import and Export Operations ΓòÉΓòÉΓòÉ
  9044.  
  9045. An application can copy text to and from an MLE field by importing and 
  9046. exporting.  To import text to an MLE field, an application can use the 
  9047. MLM_IMPORT message, which copies text from a buffer to the MLE field.  To 
  9048. export text from an MLE field, the application can use the MLM_EXPORT message, 
  9049. which copies text from the MLE field to a buffer.  The application uses the 
  9050. MLM_SETIMPORTEXPORT message to set the import and export buffers. 
  9051.  
  9052. An application can import and export text in a variety of formats.  A text 
  9053. format, set with the MLM_FORMAT message, identifies which characters are used 
  9054. for the end-of-line characters.  An MLE field can have the following text 
  9055. formats: 
  9056.  
  9057. Multiple-Line Entry Field Text Format 
  9058.  
  9059. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9060. ΓöéFormat         ΓöéDescription                                  Γöé
  9061. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9062. ΓöéMLFIE_CFTEXT   ΓöéExported lines end with a carriage           Γöé
  9063. Γöé               Γöéreturn/newline character pair (0x0D, 0x0A).  Γöé
  9064. Γöé               ΓöéImported lines must end with a newline       Γöé
  9065. Γöé               Γöécharacter, carriage return/newline character Γöé
  9066. Γöé               Γöépair, or newline/carriage return character   Γöé
  9067. Γöé               Γöépair.                                        Γöé
  9068. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9069. ΓöéMLFIE_NOTRANS  ΓöéImported and exported lines end with a       Γöé
  9070. Γöé               Γöénewline character (0x0A).                    Γöé
  9071. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9072. ΓöéMLFIE_WINFMT   ΓöéFor exported lines, the carriage             Γöé
  9073. Γöé               Γöéreturn/newline character pair marks a hard   Γöé
  9074. Γöé               Γöélinebreak (a break entered by the user).  TwoΓöé
  9075. Γöé               Γöécarriage-return characters and a newline     Γöé
  9076. Γöé               Γöécharacter (0x0D, 0x0D, 0x0A) mark a soft     Γöé
  9077. Γöé               Γöélinebreak (a break inserted during word      Γöé
  9078. Γöé               Γöéwrapping and not entered by the user).  For  Γöé
  9079. Γöé               Γöéimported lines, the extra carriage-return in Γöé
  9080. Γöé               Γöésoft linebreak characters is ignored.        Γöé
  9081. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9082.  
  9083. The text format can affect the number of characters in a selection.  To ensure 
  9084. that the export buffer is large enough to hold exported text, an application 
  9085. can send the MLM_QUERYFORMATLINELENGTH message.  The application can send the 
  9086. MLM_QUERYFORMATTEXTLENGTH message to determine the number of bytes in the text 
  9087. to be exported. 
  9088.  
  9089. Each time an application inserts text in an MLE field, the MLE field control 
  9090. automatically refreshes (repaints) the display by drawing the new text.  When 
  9091. an application copies large amounts of text to an MLE field, refreshing can be 
  9092. quite time-consuming, so the application should disable the refresh state.  The 
  9093. application disables the refresh state by sending the MLM_DISABLEREFRESH 
  9094. message.  After copying all the text, the application can restore the refresh 
  9095. state by sending the MLM_ENABLEREFRESH message. 
  9096.  
  9097.  
  9098. ΓòÉΓòÉΓòÉ 13.1.6. MLE Field Control Cut, Copy, and Paste Operations ΓòÉΓòÉΓòÉ
  9099.  
  9100. The user can cut, copy, and paste text in an MLE field by using the 
  9101. Ctrl+Delete, Shift+Delete, and Shift+Insert key combinations.  An 
  9102. application-either by itself or in response to the user-can cut, copy, and 
  9103. paste text by using the MLM_CUT, MLM_COPY, and MLM_PASTE messages.  The MLM_CUT 
  9104. and MLM_COPY messages copy the selected text to the clipboard.  The MLM_CUT 
  9105. message also deletes the text from the MLE field; MLM_COPY does not.  The 
  9106. MLM_PASTE message copies the text from the clipboard to the current position in 
  9107. the MLE field, replacing any existing text with the copied text.  An 
  9108. application can delete the selected text without copying it to the clipboard by 
  9109. using the MLM_CLEAR message. 
  9110.  
  9111. An application also can copy the selected text from an MLE field to a buffer by 
  9112. using the MLM_QUERYSELTEXT message.  This message does not affect the contents 
  9113. of the clipboard. 
  9114.  
  9115.  
  9116. ΓòÉΓòÉΓòÉ 13.1.7. MLE Field Control Search and Replace Operations ΓòÉΓòÉΓòÉ
  9117.  
  9118. An application can search for a specified string within MLE field text by using 
  9119. the MLM_SEARCH message, which searches for the string.  The MLE field control 
  9120. returns TRUE if the string is found.  The cursor does not move to the string 
  9121. unless the message specifies the MLFSEARCH_SELECTMATCH option. 
  9122.  
  9123. An application also can use the MLM_SEARCH message to replace one string with 
  9124. another.  If the message specifies the MLFSEARCH_CHANGEALL option, the MLE 
  9125. field control replaces all occurrences of the search string with the 
  9126. replacement string.  Both the search string and the replacement string must be 
  9127. specified in an MLE_SEARCHDATA structure passed with the message. 
  9128.  
  9129.  
  9130. ΓòÉΓòÉΓòÉ 13.2. Using Multiple-Line Entry Field Controls ΓòÉΓòÉΓòÉ
  9131.  
  9132. This section explains how to create an MLE field control by using the 
  9133. WinCreateWindow function and by specifying the MLE statement in a dialog 
  9134. template in a resource-definition file. 
  9135.  
  9136.  
  9137. ΓòÉΓòÉΓòÉ 13.2.1. Creating an MLE Field Control ΓòÉΓòÉΓòÉ
  9138.  
  9139. The following code fragment shows how to create an MLE field control by using 
  9140. WinCreateWindow: 
  9141.  
  9142. *xcode. 
  9143.  
  9144.     #define MLE_WINDOW_ID 2
  9145.  
  9146.     HWND hwndParent;
  9147.     HWND hwndMLE;
  9148.  
  9149.     hwndMLE = WinCreateWindow(
  9150.         hwndParent,    /* Parent window     */
  9151.         WC_MLE,        /* Window class      */
  9152.         "Test",        /* Initial text      */
  9153.         WS_VISIBLE |   /* Window style      */
  9154.         MLS_BORDER,    /* Window style      */
  9155.         100, 100,      /* x and y positions */
  9156.         100, 100,      /* Width and height  */
  9157.         hwndParent,    /* Owner window      */
  9158.         HWND_TOP,      /* Top of z-order    */
  9159.         MLE_WINDOW_ID, /* Identifier        */
  9160.         NULL,          /* Control data      */
  9161.         NULL);         /* Pres. parameters  */
  9162.  
  9163. It also is common to create an MLE field control by using an MLE statement in a 
  9164. dialog-window template in a resource file, as shown in the following code 
  9165. fragment: 
  9166.  
  9167.  
  9168.     MLE "", IDD_MLETEXT, 110, 10, 50, 100,
  9169.         WS_VISIBLE | MLS_BORDER | MLS_WORDWRAP
  9170.  
  9171. The predefined class for an MLE control is WC_MLE.  If you do not specify a 
  9172. style for the MLE control, the default styles used are MLS_BORDER, WS_GROUP, 
  9173. and WS_TABSTOP. 
  9174.  
  9175.  
  9176. ΓòÉΓòÉΓòÉ 13.2.2. Importing and Exporting MLE Text ΓòÉΓòÉΓòÉ
  9177.  
  9178. Importing and exporting MLE text takes place though a buffer.  An import 
  9179. operation copies text from the buffer to the MLE field; an export operation 
  9180. copies text from the MLE to the buffer.  Before an application can import or 
  9181. export MLE text, it must send an MLM_SETIMPORTEXPORT message to the MLE field 
  9182. control, specifying the address and size of the buffer. 
  9183.  
  9184. To import text, an application sends the MLM_IMPORT message to the MLE field 
  9185. control.  This message requires two parameters: plOffset and cbCopy.  The 
  9186. plOffset parameter is a pointer to a variable that specifies the position in 
  9187. the MLE field where the text from the buffer is to be placed.  The position is 
  9188. an offset from the beginning of the MLE text (that is, the number of characters 
  9189. from the beginning of the MLE text).  If plOffset points to a variable that 
  9190. equals -1, the MLE field control places the text starting at the current cursor 
  9191. position.  On return, this variable contains the offset to the first character 
  9192. beyond the imported text.  The cbCopy parameter of the MLM_IMPORT message 
  9193. points to a variable that specifies the number of bytes to import. 
  9194.  
  9195. The following code fragment reads text from a file to a buffer, then imports 
  9196. the text to an MLE field: 
  9197.  
  9198.     HWND hwndMle;
  9199.     CHAR szMleBuf[512];
  9200.     IPT lOffset = 0;
  9201.     PSZ pszTextFile;
  9202.     HFILE hf;
  9203.     ULONG cbCopied;
  9204.     ULONG ulAction;
  9205.     ULONG cbBytesRead;
  9206.  
  9207.     .
  9208.     . /* Obtain a file name from the user.                          */
  9209.     .
  9210.       /* Open the file.                                             */
  9211.  
  9212.     DosOpen(pszTextFile, &hf, &ulAction, 0, FILE_NORMAL,
  9213.         FILE_OPEN | FILE_CREATE, OPEN_ACCESS_READONLY |
  9214.         OPEN_SHARE_DENYNONE, NULL);
  9215.  
  9216.     /* Zero-fill the buffer using memset, a C run-time function.    */
  9217.     memset(szMleBuf, 0, sizeof(szMleBuf));
  9218.  
  9219.     /* Set the MLE import-export buffer.                            */
  9220.     WinSendMsg(hwndMle, MLM_SETIMPORTEXPORT, MPFROMP(szMleBuf),
  9221.         MPFROMSHORT ((USHORT) sizeof(szMleBuf)));
  9222.  
  9223.     /*
  9224.      * Read the text from the file to the buffer, then import it
  9225.      * to the MLE.
  9226.      */
  9227.  
  9228.     do {
  9229.         DosRead(hf, szMleBuf, sizeof(szMleBuf), &cbBytesRead);
  9230.         cbCopied = (ULONG) WinSendMsg(hwndMle, MLM_IMPORT,
  9231.             MPFROMP( &lOffset), MPFROMP(&cbBytesRead));
  9232.     } while (cbCopied);
  9233.  
  9234.     /* Close the file.                                              */
  9235.     DosClose(hf);
  9236.  
  9237. To export MLE text, an application sends the MLM_EXPORT message to the MLE 
  9238. control.  Like MLM_IMPORT, the MLM_EXPORT message takes the plOffset and cbCopy 
  9239. parameters.  The plOffset parameter is a pointer to a variable that specifies 
  9240. the offset to the first character to export.  A value of -1 specifies the 
  9241. current cursor position.  On return, the variable contains the offset to the 
  9242. first character in the MLE field not copied to the buffer.  The cbCopy 
  9243. parameter is a pointer to a variable that specifies the number of bytes to 
  9244. export.  On return, this variable equals 0 if the number of characters actually 
  9245. copied does not exceed the number specified to be copied.  The following code 
  9246. fragment shows how to export text from an MLE field, then store the text in a 
  9247. file: 
  9248.  
  9249.  
  9250.     HWND hwndMle;
  9251.     CHAR szMleBuf[512];
  9252.     IPT lOffset = 0;
  9253.     PSZ pszTextFile;
  9254.     HFILE hf;
  9255.     ULONG cbCopied;
  9256.     ULONG ulAction;
  9257.     ULONG cbBytesWritten;
  9258.     ULONG cbCopy;
  9259.  
  9260.     /* Zero-fill the buffer using memset, a C run-time function.  */
  9261.     memset(szMleBuf, 0, sizeof(szMleBuf));
  9262.  
  9263.     /* Set the MLE import-export buffer.                          */
  9264.     WinSendMsg(hwndMle, MLM_SETIMPORTEXPORT, MPFROMP(szMleBuf),
  9265.         MPFROMSHORT ((USHORT) sizeof(szMleBuf)));
  9266.         .
  9267.         . /* Obtain a filename from the user.                     */
  9268.         .
  9269.  
  9270.     /* Open the file.                                             */
  9271.     DosOpen(pszTextFile, &hf, &ulAction, 0, FILE_NORMAL,
  9272.         FILE_OPEN | FILE_CREATE, OPEN_ACCESS_WRITEONLY |
  9273.         OPEN_SHARE_DENYNONE, NULL);
  9274.  
  9275.     /* Find out how much text is in the MLE.                      */
  9276.     cbCopy = (ULONG) WinSendMsg(hwndMle, MLM_QUERYFORMATTEXTLENGTH,
  9277.         MPFROMLONG(lOffset), MPFROMLONG((-1)));
  9278.  
  9279.     /* Copy the MLE text to the buffer.                           */
  9280.     cbCopied = (ULONG) WinSendMsg(hwndMle, MLM_EXPORT,
  9281.         MPFROMP(&lOffset), MPFROMP(&cbCopy));
  9282.  
  9283.     /* Write the contents of the buffer to the file.              */
  9284.     DosWrite(hf, szMleBuf, sizeof(szMleBuf),
  9285.         &cbBytesWritten);
  9286.  
  9287.     /* Close the file.                                            */
  9288.     DosClose(hf);
  9289.  
  9290.  
  9291. ΓòÉΓòÉΓòÉ 13.2.3. Searching MLE Text ΓòÉΓòÉΓòÉ
  9292.  
  9293. An application uses the MLM_SEARCH message and the MLE_SEARCHDATA structure to 
  9294. search for strings in MLE text.  The first parameter of the MLM_SEARCH message 
  9295. is an array of flags that specify the style of the search.  The application can 
  9296. set the MLFSEARCH_CASESENSITIVE flag if a case-sensitive search is required. 
  9297. If the application sets the MLFSEARCH_SELECTMATCH flag, the MLE field control 
  9298. highlights a matching string and, if necessary, scrolls the string into view. 
  9299. An application can use the MLFSEARCH_CHANGEALL flag to replace every occurrence 
  9300. of the string with the string specified in the pchReplace member of the 
  9301. MLE_SEARCHDATA structure. 
  9302.  
  9303. The second parameter of the MLM_SEARCH message is a pointer to an 
  9304. MLE_SEARCHDATA structure that contains information required to perform the 
  9305. search operation.  This structure includes a pointer to the string and, if the 
  9306. MLFSEARCH_CHANGEALL flag is set in the MLM_SEARCH message, a pointer to the 
  9307. replacement string.  The iptStart and iptStop members specify the starting and 
  9308. ending positions of the search.  These positions are specified as offsets from 
  9309. the beginning of the MLE field.  A value of -1 in the iptStart member causes 
  9310. the search to start at the current cursor position.  A negative value in the 
  9311. iptStop member causes the search to end at the end of the MLE field.  If a 
  9312. matching string is found, the MLE field control returns the length of the 
  9313. string in the cchFound member. 
  9314.  
  9315. The following code fragment uses an entry field to obtain a search string from 
  9316. the user, then searches an MLE field for an occurrence of the string.  The 
  9317. search begins at the current cursor position and ends at the end of the MLE 
  9318. text.  When the MLFSEARCH_SELECTMATCH flag is specified, the MLE field control 
  9319. highlights a matching string and scrolls it into view. 
  9320.  
  9321.     #define IDD_SEARCHFIELD  101
  9322.  
  9323.     HWND hwnd;
  9324.     HWND hwndEntryFld;
  9325.     HWND hwndMle;
  9326.     MLE_SEARCHDATA mlesrch;
  9327.     CHAR szSearchString[64];
  9328.  
  9329.     /*
  9330.      * Obtain the handle of the entry field containing the
  9331.      * search string.
  9332.      */
  9333.     hwndEntryFld = WinWindowFromID(hwnd, IDD_SEARCHFIELD);
  9334.  
  9335.     /* Obtain the search string from the entry field.                */
  9336.     WinQueryWindowText(hwndEntryFld, sizeof(szSearchString),
  9337.         szSearchString);
  9338.  
  9339.     /* Fill the MLE_SEARCHDATA structure.                            */
  9340.     mlesrch.cb = sizeof(mlesrch);     /* Structure size              */
  9341.     mlesrch.pchFind = szSearchString; /* Search string               */
  9342.     mlesrch.pchReplace = NULL;        /* No replacement string       */
  9343.     mlesrch.cchFind = 0;              /* Not used                    */
  9344.     mlesrch.cchReplace = 0;           /* Not used                    */
  9345.     mlesrch.iptStart = -1;            /* Start at cursor position    */
  9346.     mlesrch.iptStop = -1;             /* Stop at end of file         */
  9347.  
  9348.     /* Start the search operation.                                   */
  9349.     WinSendMsg(hwndMle, MLM_SEARCH, MPFROMLONG(MLFSEARCH_SELECTMATCH),
  9350.         MPFROMP(&mlesrch));
  9351.  
  9352.  
  9353. ΓòÉΓòÉΓòÉ 13.3. Summary ΓòÉΓòÉΓòÉ
  9354.  
  9355. Following are the OS/2 structures and messages used with multiple-line entry 
  9356. field controls. 
  9357.  
  9358. Multiple-Line Entry Field Control Structures 
  9359.  
  9360. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9361. ΓöéStructure Name          ΓöéDescription                         Γöé
  9362. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9363. ΓöéMLECTLDATA              ΓöéMultiple-line entry field control   Γöé
  9364. Γöé                        Γöédata structure.                     Γöé
  9365. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9366. ΓöéMLEMARGSTRUCT           ΓöéMultiple-line entry field margin    Γöé
  9367. Γöé                        Γöéinformation                         Γöé
  9368. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9369. ΓöéMLEOVERFLOW             ΓöéMultiple-line entry field overflow  Γöé
  9370. Γöé                        Γöéerror structure.                    Γöé
  9371. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9372. ΓöéMLE_SEARCHDATA          ΓöéMultiple-line entry field search    Γöé
  9373. Γöé                        Γöéstructure.                          Γöé
  9374. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9375.  
  9376. Messages Received by an MLE Field Control 
  9377.  
  9378. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9379. ΓöéMessage                       ΓöéDescription                   Γöé
  9380. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9381. ΓöéMLM_CHARFROMLINE              ΓöéReturns the first insertion   Γöé
  9382. Γöé                              Γöépoint on a given line.        Γöé
  9383. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9384. ΓöéMLM_CLEAR                     ΓöéClears the current selection. Γöé
  9385. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9386. ΓöéMLM_COPY                      ΓöéCopies the current selection  Γöé
  9387. Γöé                              Γöéto the clipboard.             Γöé
  9388. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9389. ΓöéMLM_CUT                       ΓöéCopies the text that forms theΓöé
  9390. Γöé                              Γöécurrent selection to the      Γöé
  9391. Γöé                              Γöéclipboard, then deletes the   Γöé
  9392. Γöé                              Γöétext from the MLE field       Γöé
  9393. Γöé                              Γöécontrol.                      Γöé
  9394. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9395. ΓöéMLM_DELETE                    ΓöéDeletes text.                 Γöé
  9396. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9397. ΓöéMLM_DISABLEREFRESH            ΓöéDisables screen refresh.      Γöé
  9398. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9399. ΓöéMLM_ENABLEREFRESH             ΓöéEnables screen refresh.       Γöé
  9400. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9401. ΓöéMLM_EXPORT                    ΓöéExports text to a buffer.     Γöé
  9402. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9403. ΓöéMLM_FORMAT                    ΓöéSets the format to be used forΓöé
  9404. Γöé                              Γöébuffer importing and          Γöé
  9405. Γöé                              Γöéexporting.                    Γöé
  9406. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9407. ΓöéMLM_IMPORT                    ΓöéImports text from a buffer.   Γöé
  9408. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9409. ΓöéMLM_INSERT                    ΓöéDeletes the current selection Γöé
  9410. Γöé                              Γöéand replaces it with a text   Γöé
  9411. Γöé                              Γöéstring.                       Γöé
  9412. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9413. ΓöéMLM_LINEFROMCHAR              ΓöéReturns the line number       Γöé
  9414. Γöé                              Γöécorresponding to a given      Γöé
  9415. Γöé                              Γöéinsertion point.              Γöé
  9416. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9417. ΓöéMLM_PASTE                     ΓöéReplaces the text that forms  Γöé
  9418. Γöé                              Γöéthe current selection with    Γöé
  9419. Γöé                              Γöétext from the clipboard.      Γöé
  9420. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9421. ΓöéMLM_QUERYBACKCOLOR            ΓöéQueries the background color. Γöé
  9422. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9423. ΓöéMLM_QUERYCHANGED              ΓöéQueries the changed flag.     Γöé
  9424. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9425. ΓöéMLM_QUERYFIRSTCHAR            ΓöéQueries the first visible     Γöé
  9426. Γöé                              Γöécharacter.                    Γöé
  9427. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9428. ΓöéMLM_QUERYFONT                 ΓöéQueries which font is in use. Γöé
  9429. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9430. ΓöéMLM_QUERYFORMATLINELENGTH     ΓöéReturns the number of bytes toΓöé
  9431. Γöé                              Γöéend of line after formatting  Γöé
  9432. Γöé                              Γöéis applied.                   Γöé
  9433. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9434. ΓöéMLM_QUERYFORMATRECT           ΓöéQueries the format dimensions Γöé
  9435. Γöé                              Γöéand mode.                     Γöé
  9436. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9437. ΓöéMLM_QUERYFORMATTEXTLENGTH     ΓöéReturns the length of a       Γöé
  9438. Γöé                              Γöéspecified range of characters Γöé
  9439. Γöé                              Γöéafter the current formatting  Γöé
  9440. Γöé                              Γöéis applied.                   Γöé
  9441. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9442. ΓöéMLM_QUERYIMPORTEXPORT         ΓöéQueries the current transfer  Γöé
  9443. Γöé                              Γöébuffer.                       Γöé
  9444. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9445. ΓöéMLM_QUERYLINECOUNT            ΓöéQueries the number of lines ofΓöé
  9446. Γöé                              Γöétext.                         Γöé
  9447. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9448. ΓöéMLM_QUERYLINELENGTH           ΓöéReturns the number of bytes   Γöé
  9449. Γöé                              Γöébetween a given insertion     Γöé
  9450. Γöé                              Γöépoint and the end of line.    Γöé
  9451. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9452. ΓöéMLM_QUERYREADONLY             ΓöéQueries the read-only mode.   Γöé
  9453. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9454. ΓöéMLM_QUERYSEL                  ΓöéReturns the location of the   Γöé
  9455. Γöé                              Γöéselection.                    Γöé
  9456. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9457. ΓöéMLM_QUERYSELTEXT              ΓöéCopies the currently selected Γöé
  9458. Γöé                              Γöétext into a buffer.           Γöé
  9459. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9460. ΓöéMLM_QUERYTABSTOP              ΓöéQueries the pel interval at   Γöé
  9461. Γöé                              Γöéwhich tab stops are placed.   Γöé
  9462. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9463. ΓöéMLM_QUERYTEXTCOLOR            ΓöéQueries the text color.       Γöé
  9464. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9465. ΓöéMLM_QUERYTEXTLENGTH           ΓöéReturns the number of         Γöé
  9466. Γöé                              Γöécharacters in the text.       Γöé
  9467. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9468. ΓöéMLM_QUERYTEXTLIMIT            ΓöéQueries the maximum number of Γöé
  9469. Γöé                              Γöébytes that a multiple-line    Γöé
  9470. Γöé                              Γöéentry field control can       Γöé
  9471. Γöé                              Γöécontain.                      Γöé
  9472. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9473. ΓöéMLM_QUERYUNDO                 ΓöéQueries the possible undo or  Γöé
  9474. Γöé                              Γöéredo operations.              Γöé
  9475. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9476. ΓöéMLM_QUERYWRAP                 ΓöéQueries the wrap flag.        Γöé
  9477. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9478. ΓöéMLM_RESETUNDO                 ΓöéResets the undo state to      Γöé
  9479. Γöé                              Γöéindicate the no undo          Γöé
  9480. Γöé                              Γöéoperations are possible.      Γöé
  9481. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9482. ΓöéMLM_SEARCH                    ΓöéSearches for a specified text Γöé
  9483. Γöé                              Γöéstring.                       Γöé
  9484. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9485. ΓöéMLM_SETBACKCOLOR              ΓöéSets the background color.    Γöé
  9486. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9487. ΓöéMLM_SETCHANGED                ΓöéSets or clears the changed    Γöé
  9488. Γöé                              Γöéflag.                         Γöé
  9489. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9490. ΓöéMLM_SETFIRSTCHAR              ΓöéSets the first visible        Γöé
  9491. Γöé                              Γöécharacter.                    Γöé
  9492. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9493. ΓöéMLM_SETFONT                   ΓöéSets a font.                  Γöé
  9494. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9495. ΓöéMLM_SETFORMATRECT             ΓöéSets the format dimensions andΓöé
  9496. Γöé                              Γöémode.                         Γöé
  9497. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9498. ΓöéMLM_SETIMPORTEXPORT           ΓöéSets the current transfer     Γöé
  9499. Γöé                              Γöébuffer.                       Γöé
  9500. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9501. ΓöéMLM_SETREADONLY               ΓöéSets or clears read-only mode.Γöé
  9502. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9503. ΓöéMLM_SETSEL                    ΓöéSets a selection.             Γöé
  9504. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9505. ΓöéMLM_SETABSTOP                 ΓöéSets the pel interval at whichΓöé
  9506. Γöé                              Γöétab stops are placed.         Γöé
  9507. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9508. ΓöéMLM_SETTEXTCOLOR              ΓöéSets the text color.          Γöé
  9509. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9510. ΓöéMLM_SETTEXTLIMIT              ΓöéSets the maximum number of    Γöé
  9511. Γöé                              Γöébytes that a multiple-line    Γöé
  9512. Γöé                              Γöéentry field control can       Γöé
  9513. Γöé                              Γöécontain.                      Γöé
  9514. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9515. ΓöéMLM_SETWRAP                   ΓöéSets the wrap flag.           Γöé
  9516. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9517. ΓöéMLM_UNDO                      ΓöéPerforms any available undo   Γöé
  9518. Γöé                              Γöéoperations.                   Γöé
  9519. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9520.  
  9521. Messages Issued by an MLE Field Control to Its Owner Window 
  9522.  
  9523. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9524. ΓöéMessage                 ΓöéDescription                         Γöé
  9525. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9526. ΓöéWM_BUTTON1DBLCLK        ΓöéOccurs when the user presses pointerΓöé
  9527. Γöé                        Γöébutton 1 twice within a specified   Γöé
  9528. Γöé                        Γöétime.                               Γöé
  9529. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9530. ΓöéWM_BUTTON1DOWN          ΓöéOccurs when the user presses pointerΓöé
  9531. Γöé                        Γöébutton 1.                           Γöé
  9532. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9533. ΓöéWM_BUTTON1UP            ΓöéOccurs when the user releases       Γöé
  9534. Γöé                        Γöépointer button 1.                   Γöé
  9535. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9536. ΓöéWM_CHAR                 ΓöéSent when the user presses a key.   Γöé
  9537. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9538. ΓöéWM_CONTROL              ΓöéOccurs when an MLE field control hasΓöé
  9539. Γöé                        Γöéa significant event to notify to itsΓöé
  9540. Γöé                        Γöéowner.                              Γöé
  9541. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9542. ΓöéWM_ENABLE               ΓöéSets the state of the MLE field.    Γöé
  9543. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9544. ΓöéWM_MOUSEMOVE            ΓöéOccurs when the pointing device     Γöé
  9545. Γöé                        Γöépointer moves.                      Γöé
  9546. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9547. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  9548. Γöé                        Γöéthe entry field control window      Γöé
  9549. Γöé                        Γöéparameters.                         Γöé
  9550. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9551. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  9552. Γöé                        Γöéchanges the entry field control     Γöé
  9553. Γöé                        Γöéwindow parameters.                  Γöé
  9554. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9555.  
  9556.  
  9557. ΓòÉΓòÉΓòÉ 14. Scroll-Bar Controls ΓòÉΓòÉΓòÉ
  9558.  
  9559. Scroll bars are control windows that convert mouse and keyboard input into 
  9560. integers; they are used by an application to scroll the contents of a client 
  9561. window.  This chapter describes how to create and use scroll bars in PM 
  9562. applications. 
  9563.  
  9564.  
  9565. ΓòÉΓòÉΓòÉ 14.1. About Scroll Bars ΓòÉΓòÉΓòÉ
  9566.  
  9567. A scroll bar has three main parts: the bar, its arrows, and a slider (see the 
  9568. following figure). 
  9569.  
  9570. Scroll Bars in a Window 
  9571.  
  9572. The arrows are located at each end of the scroll bar. The left scroll arrow, on 
  9573. the left side of a horizontal scroll bar, enables the user to scroll to the 
  9574. left in a document. The right scroll arrow lets the user scroll to the right. 
  9575.  
  9576. On a vertical scroll bar, the upper scroll arrow enables the user to scroll 
  9577. upward in the document; the lower scroll arrow, downward.  The slider, which 
  9578. lies between the two scroll arrows, reflects the current value of the scroll 
  9579. bar.  Scroll bars monitor the slider and send notification messages to the 
  9580. owner window when the slider position changes as a result of mouse or keyboard 
  9581. input. 
  9582.  
  9583. Although, typically, scroll bars are used in frame windows, an application can 
  9584. use stand-alone scroll bars of any size or shape, at any position, in a window 
  9585. of almost any class.  Scroll bars can be used as parts of other control 
  9586. windows; for example, a list box uses a scroll bar to enable the user to view 
  9587. items when the list box is too small to display all the items. 
  9588.  
  9589.  
  9590. ΓòÉΓòÉΓòÉ 14.1.1. Scroll-Bar Creation ΓòÉΓòÉΓòÉ
  9591.  
  9592. An application can include a scroll bar in a standard frame window by 
  9593. specifying the FCF_HORZSCROLL or FCF_VERTSCROLL flag in the WinCreateStdWindow 
  9594. function.  To create a scroll bar in another type of window, an application can 
  9595. specify the predefined (preregistered) window class WC_SCROLLBAR in the 
  9596. WinCreateWindow function or in the CONTROL statement in a resource file. 
  9597.  
  9598. Although most applications specify an owner window when creating a scroll bar, 
  9599. an owner is not required.  If an application does not specify an owner, the 
  9600. scroll bar does not send notification messages. 
  9601.  
  9602.  
  9603. ΓòÉΓòÉΓòÉ 14.1.1.1. Scroll-Bar Styles ΓòÉΓòÉΓòÉ
  9604.  
  9605. A scroll bar has styles that determine what it looks like and how it responds 
  9606. to input.  Styles are specified in the WinCreateWindow function or the CONTROL 
  9607. statement.  A scroll-bar can have the following styles: 
  9608.  
  9609. Scroll-Bar Styles 
  9610.  
  9611. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9612. ΓöéStyle          ΓöéMeaning                                      Γöé
  9613. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9614. ΓöéSBS_AUTOTRACK  ΓöéCauses the entire slider to track the        Γöé
  9615. Γöé               Γöémovement of the mouse pointer when the user  Γöé
  9616. Γöé               Γöéscrolls the window. Without this style, only Γöé
  9617. Γöé               Γöéan outlined image of the slider tracks the   Γöé
  9618. Γöé               Γöémovement of the mouse pointer, and the sliderΓöé
  9619. Γöé               Γöéjumps to the new location when the user      Γöé
  9620. Γöé               Γöéreleases the mouse button.                   Γöé
  9621. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9622. ΓöéSBS_HORZ       ΓöéCreates a horizontal scroll bar.             Γöé
  9623. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9624. ΓöéSBS_THUMBSIZE  ΓöéCauses the SBCDATA structure to store        Γöé
  9625. Γöé               Γöéinformation used to calculate the size of theΓöé
  9626. Γöé               Γöéscroll-bar slider.                           Γöé
  9627. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9628. ΓöéSBS_VERT       ΓöéCreates a vertical scroll bar.               Γöé
  9629. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9630.  
  9631.  
  9632. ΓòÉΓòÉΓòÉ 14.1.1.2. Scroll-Bar Range and Position ΓòÉΓòÉΓòÉ
  9633.  
  9634. Every scroll bar has a range and a slider position.  The range specifies the 
  9635. minimum and maximum values for the slider position.  As the user moves the 
  9636. slider in a scroll bar, the scroll bar reports the slider position as an 
  9637. integer in this range.  If the slider position is the minimum value, the slider 
  9638. is at the top of a vertical scroll bar or at the left end of a horizontal 
  9639. scroll bar.  If the slider position is the maximum value, the slider is at the 
  9640. bottom or right end of the vertical or horizontal scroll bar, respectively. 
  9641.  
  9642. An application can adjust the range to convenient integers by using the 
  9643. SBM_SETSCROLLBAR message (or initially, by using the SBCDATA structure).  This 
  9644. makes it easy to translate the slider position into a value that corresponds to 
  9645. the data being scrolled.  For example, an application attempting to display 100 
  9646. lines of text in a window that can show only 20 lines at a time could set the 
  9647. vertical scroll-bar range from 1 through 100.  If the slider were at position 
  9648. 0, the first line would be at the top of the window.  If the slider were at 
  9649. position 100, the last line would be at the bottom of the window. 
  9650.  
  9651. To establish a useful relationship between the scroll-bar range and the data, 
  9652. an application must adjust the range whenever the data or the size of the 
  9653. window changes.  This means the application should adjust the range as part of 
  9654. processing WM_SIZE messages. 
  9655.  
  9656. An application must move the slider in a scroll bar.  Although the user 
  9657. requests scrolling in a scroll bar, the scroll bar does not update the slider 
  9658. position.  Instead, it passes the request to the owner window, which scrolls 
  9659. the data and updates the slider position using the SBM_SETPOS message.  The 
  9660. application controls the slider movement and can move the slider in the 
  9661. increments best suited for the data being scrolled. 
  9662.  
  9663. An application can retrieve the current slider position of a scroll bar by 
  9664. sending the SBM_QUERYPOS message to the scroll bar. 
  9665.  
  9666. If a scroll bar is a descendant of a frame window, its position relative to its 
  9667. parent can change when the position of the frame window changes.  Frame windows 
  9668. draw scroll bars relative to the upper-left corner of the frame window (rather 
  9669. than the lower-left corner).  The frame window can adjust the y coordinate of 
  9670. the scroll-bar position, which would be desirable if the scroll bar is a child 
  9671. of the frame window, but would be undesirable if the scroll bar is not a child 
  9672. window. 
  9673.  
  9674.  
  9675. ΓòÉΓòÉΓòÉ 14.1.2. Scroll-Bar Notification Messages ΓòÉΓòÉΓòÉ
  9676.  
  9677. A scroll bar sends notification messages to its window whenever the user clicks 
  9678. the scroll bar.  WM_VSCROLL and WM_HSCROLL are the notification messages for 
  9679. vertical and horizontal scroll bars, respectively.  If the scroll bar is a 
  9680. frame control window, the frame window passes the message to its client window. 
  9681.  
  9682. Each notification message includes the scroll-bar identifier, scroll-bar 
  9683. command code corresponding to the action of the user, and, in some cases, the 
  9684. position of the slider.  If an application creates a scroll bar as part of a 
  9685. frame control window, the scroll-bar identifier is the predefined constant 
  9686. FID_VERTSCROLL or FID_HORZSCROLL.  Otherwise, it is the identifier given in the 
  9687. WinCreateWindow function. 
  9688.  
  9689. The scroll-bar command codes specify the action the user has taken.  Operating 
  9690. system user-interface guidelines recommend certain responses for each action. 
  9691. The following figure illustrates the SBM_xxx messages your application can send 
  9692. to a scroll bar. 
  9693.  
  9694. Standard Window Scroll Bar and Command Codes 
  9695.  
  9696. Following is a list of the command codes; for each code, the user action is 
  9697. specified, followed by the application's response. In each case, a scrolling 
  9698. unit, appropriate for the given data, must be defined by the application.  For 
  9699. example, for scrolling text vertically, the typical unit is a line. 
  9700.  
  9701. Scroll-Bar Command Codes 
  9702.  
  9703. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9704. ΓöéCommand Code            ΓöéDescription                         Γöé
  9705. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9706. ΓöéSB_LINEUP               ΓöéIndicates that the user clicked the Γöé
  9707. Γöé                        Γöétop scroll arrow. Decrement the     Γöé
  9708. Γöé                        Γöéslider position by one, and scroll  Γöé
  9709. Γöé                        Γöétoward the top of the data by one   Γöé
  9710. Γöé                        Γöéunit.                               Γöé
  9711. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9712. ΓöéSB_LINEDOWN             ΓöéIndicates that the user clicked the Γöé
  9713. Γöé                        Γöébottom scroll arrow. Increment the  Γöé
  9714. Γöé                        Γöéslider position by one, and scroll  Γöé
  9715. Γöé                        Γöétoward the bottom of the data by oneΓöé
  9716. Γöé                        Γöéunit.                               Γöé
  9717. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9718. ΓöéSB_LINELEFT             ΓöéIndicates that the user clicked the Γöé
  9719. Γöé                        Γöéleft scroll arrow. Decrement the    Γöé
  9720. Γöé                        Γöéslider position by one, and scroll  Γöé
  9721. Γöé                        Γöétoward the left end of the data by  Γöé
  9722. Γöé                        Γöéone unit.                           Γöé
  9723. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9724. ΓöéSB_LINERIGHT            ΓöéIndicates that the user clicked the Γöé
  9725. Γöé                        Γöéright scroll arrow. Increment the   Γöé
  9726. Γöé                        Γöéslider position by one, and scroll  Γöé
  9727. Γöé                        Γöétoward the right end of the data by Γöé
  9728. Γöé                        Γöéone unit.                           Γöé
  9729. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9730. ΓöéSB_PAGEUP               ΓöéIndicates that the user clicked the Γöé
  9731. Γöé                        Γöéscroll-bar background above the     Γöé
  9732. Γöé                        Γöéslider. Decrement the slider        Γöé
  9733. Γöé                        Γöéposition by the number of data unitsΓöé
  9734. Γöé                        Γöéin the window, and scroll toward theΓöé
  9735. Γöé                        Γöétop of the data by the same number  Γöé
  9736. Γöé                        Γöéof units.                           Γöé
  9737. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9738. ΓöéSB_PAGEDOWN             ΓöéIndicates that the user clicked the Γöé
  9739. Γöé                        Γöéscroll-bar background below the     Γöé
  9740. Γöé                        Γöéslider. Increment the slider        Γöé
  9741. Γöé                        Γöéposition by the number of data unitsΓöé
  9742. Γöé                        Γöéin the window, and scroll toward theΓöé
  9743. Γöé                        Γöébottom of the data by the same      Γöé
  9744. Γöé                        Γöénumber of units.                    Γöé
  9745. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9746. ΓöéSB_PAGELEFT             ΓöéIndicates that the user clicked the Γöé
  9747. Γöé                        Γöéscroll-bar background to the left ofΓöé
  9748. Γöé                        Γöéthe slider. Decrement the slider    Γöé
  9749. Γöé                        Γöéposition by the number of data unitsΓöé
  9750. Γöé                        Γöéin the window, and scroll toward theΓöé
  9751. Γöé                        Γöéleft end of the data by the same    Γöé
  9752. Γöé                        Γöénumber of units.                    Γöé
  9753. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9754. ΓöéSB_PAGERIGHT            ΓöéIndicates that the user clicked the Γöé
  9755. Γöé                        Γöéscroll-bar background to the right  Γöé
  9756. Γöé                        Γöéof the slider. Increment the slider Γöé
  9757. Γöé                        Γöéposition by the number of data unitsΓöé
  9758. Γöé                        Γöéin the window, and scroll toward theΓöé
  9759. Γöé                        Γöéright end of the data by the same   Γöé
  9760. Γöé                        Γöénumber of units.                    Γöé
  9761. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9762. ΓöéSB_SLIDERTRACK          ΓöéIndicates that the user is dragging Γöé
  9763. Γöé                        Γöéthe slider. Applications that draw  Γöé
  9764. Γöé                        Γöédata quickly can set the slider to  Γöé
  9765. Γöé                        Γöéthe position given in the message,  Γöé
  9766. Γöé                        Γöéand scroll the data by the same     Γöé
  9767. Γöé                        Γöénumber of units the slider has      Γöé
  9768. Γöé                        Γöémoved. Applications that cannot drawΓöé
  9769. Γöé                        Γöédata quickly should wait for the    Γöé
  9770. Γöé                        ΓöéSB_SLIDERPOSITION code before movingΓöé
  9771. Γöé                        Γöéthe slider and scrolling the data.  Γöé
  9772. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9773. ΓöéSB_SLIDERPOSITION       ΓöéIndicates that the user released theΓöé
  9774. Γöé                        Γöéslider after dragging it. Set the   Γöé
  9775. Γöé                        Γöéslider to the position given in the Γöé
  9776. Γöé                        Γöémessage, and scroll the data by the Γöé
  9777. Γöé                        Γöésame number of units the slider was Γöé
  9778. Γöé                        Γöémoved.                              Γöé
  9779. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9780. ΓöéSB_ENDSCROLL            ΓöéIndicates that the user released theΓöé
  9781. Γöé                        Γöémouse after holding it on an arrow  Γöé
  9782. Γöé                        Γöéor in the scroll-bar background. No Γöé
  9783. Γöé                        Γöéresponse is necessary.              Γöé
  9784. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9785.  
  9786. If the command code is SB_SLIDERTRACK or SB_SLIDERPOSITION, indicating that the 
  9787. user is moving the scroll-bar slider, the notification message also contains 
  9788. the current position of the slider. 
  9789.  
  9790. The owner window can send a message to the scroll bar to read or reset the 
  9791. current value and range of the scroll bar.  To reflect any changes in the state 
  9792. of the scroll bar, the owner window also can adjust the data the scroll bar 
  9793. controls. 
  9794.  
  9795. An application can use the WinEnableWindow function to disable a scroll bar.  A 
  9796. disabled scroll bar ignores the actions of the user, sending out no 
  9797. notification messages when the user tries to manipulate it.  If an application 
  9798. has no data to scroll, or if all data fits in the client window, the 
  9799. application should disable the scroll bar. 
  9800.  
  9801.  
  9802. ΓòÉΓòÉΓòÉ 14.1.3. Scroll Bars and the Keyboard ΓòÉΓòÉΓòÉ
  9803.  
  9804. When a scroll bar has the keyboard focus, it generates notification messages 
  9805. for the following keys: 
  9806.  
  9807. Scroll-bar Notification Messages 
  9808.  
  9809. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9810. ΓöéKeys                    ΓöéResponse                            Γöé
  9811. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9812. ΓöéUP                      ΓöéSB_LINEUP or SB_LINELEFT            Γöé
  9813. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9814. ΓöéLEFT                    ΓöéSB_LINEUP or SB_LINELEFT            Γöé
  9815. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9816. ΓöéDOWN                    ΓöéSB_LINEDOWN or SB_LINERIGHT         Γöé
  9817. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9818. ΓöéRIGHT                   ΓöéSB_LINEDOWN or SB_LINERIGHT         Γöé
  9819. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9820. ΓöéPGUP                    ΓöéSB_PAGEUP or SB_PAGELEFT            Γöé
  9821. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9822. ΓöéPGDN                    ΓöéSB_PAGEDOWN or SB_PAGERIGHT         Γöé
  9823. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9824.  
  9825. If an application uses scroll bars to scroll data but does not give the scroll 
  9826. bar the input focus, the window with the focus must process keyboard input. 
  9827. The window can generate scroll-bar notification messages or carry out the 
  9828. indicated scrolling.  The following table shows the responses to keys that a 
  9829. window must process: 
  9830.  
  9831. Focus Window Message Responses to Keys 
  9832.  
  9833. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9834. ΓöéKey                     ΓöéResponse                            Γöé
  9835. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9836. ΓöéUP                      ΓöéSB_LINEUP                           Γöé
  9837. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9838. ΓöéDOWN                    ΓöéSB_LINEDOWN                         Γöé
  9839. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9840. ΓöéPGUP                    ΓöéSB_PAGEUP                           Γöé
  9841. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9842. ΓöéPGDN                    ΓöéSB_PAGEDOWN                         Γöé
  9843. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9844. ΓöéCTRL+HOME               ΓöéSB_SLIDERTRACK, with the slider set Γöé
  9845. Γöé                        Γöéto the minimum position             Γöé
  9846. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9847. ΓöéCTRL+END                ΓöéSB_SLIDERTRACK, with the slider set Γöé
  9848. Γöé                        Γöéto the maximum position             Γöé
  9849. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9850. ΓöéLEFT                    ΓöéSB_LINELEFT                         Γöé
  9851. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9852. ΓöéRIGHT                   ΓöéSB_LINERIGHT                        Γöé
  9853. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9854. ΓöéCTRL+PGUP               ΓöéSB_PAGELEFT                         Γöé
  9855. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9856. ΓöéCTRL+PGDN               ΓöéSB_PAGERIGHT                        Γöé
  9857. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9858. ΓöéHOME                    ΓöéSB_SLIDERTRACK, with the slider set Γöé
  9859. Γöé                        Γöéto the minimum position             Γöé
  9860. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9861. ΓöéEND                     ΓöéSB_SLIDERTRACK, with the slider set Γöé
  9862. Γöé                        Γöéto the maximum position             Γöé
  9863. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9864.  
  9865. For vertical scroll bars that are part of list boxes, the following table shows 
  9866. the responses to keys: 
  9867.  
  9868. List Box Responses to Keys 
  9869.  
  9870. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9871. ΓöéKey                           ΓöéCommand                       Γöé
  9872. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9873. ΓöéCTRL+UP                       ΓöéSB_SLIDERTRACK, with the      Γöé
  9874. Γöé                              Γöéslider set to the minimum     Γöé
  9875. Γöé                              Γöéposition                      Γöé
  9876. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9877. ΓöéCTRL+DOWN                     ΓöéSB_SLIDERTRACK, with the      Γöé
  9878. Γöé                              Γöéslider set to the maximum     Γöé
  9879. Γöé                              Γöéposition                      Γöé
  9880. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9881. ΓöéF7                            ΓöéSB_PAGEUP                     Γöé
  9882. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9883. ΓöéF8                            ΓöéSB_PAGEDOWN                   Γöé
  9884. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9885.  
  9886.  
  9887. ΓòÉΓòÉΓòÉ 14.2. Using Scroll Bars ΓòÉΓòÉΓòÉ
  9888.  
  9889. This section explains how to perform the following tasks: 
  9890.  
  9891. o Create scroll bars. 
  9892. o Retrieve a scroll-bar handle. 
  9893. o Initialize, adjust, and read the scroll-bar range and position. 
  9894.  
  9895.  
  9896. ΓòÉΓòÉΓòÉ 14.2.1. Creating Scroll Bars ΓòÉΓòÉΓòÉ
  9897.  
  9898. When creating a frame window, you can add scroll bars by specifying the 
  9899. FCF_HORZSCROLL flag, FCF_VERTSCROLL flag, or both flags in the 
  9900. WinCreateStdWindow function.  This adds horizontal, vertical, or both (as 
  9901. specified) scroll bars to the frame window.  The frame window owns the scroll 
  9902. bars and passes notification messages from the scroll bars to the client 
  9903. window. 
  9904.  
  9905. The following code fragment adds scroll bars to a frame window: 
  9906.  
  9907.  
  9908.     /* Set flags for a main window with scroll bars. */
  9909.     ULONG ulFrameControlFlags =
  9910.         FCF_STANDARD | FCF_HORZSCROLL | FCF_VERTSCROLL;
  9911.  
  9912.     /* Create the window.                            */
  9913.     hwndFrame = WinCreateStdWindow(HWND_DESKTOP,
  9914.         WS_VISIBLE,
  9915.         &ulFrameControlFlags,
  9916.         szClientClass,
  9917.         szFrameTitle,
  9918.         0,
  9919.         (HMODULE) NULL,
  9920.         0,
  9921.         &hwndClient);
  9922.  
  9923. Scroll bars created this way have the window identifier FID_HORZSCROLL or 
  9924. FID_VERTSCROLL.  To determine the size and position of the scroll bars, the 
  9925. frame window uses the standard size specified by the system values SV_CXVSCROLL 
  9926. and SV_CYHSCROLL.  The position always is defined by the right and bottom edges 
  9927. of the frame window. 
  9928.  
  9929. Another way to create scroll bars is using the WinCreateWindow function.  This 
  9930. method is most commonly used for stand-alone scroll bars.  Creating scroll bars 
  9931. this way lets you set the size and position of the scroll bars.  You also can 
  9932. specify which window should receive notification messages. 
  9933.  
  9934. The following code fragment creates a stand-alone scroll bar: 
  9935.  
  9936.     #define ID_SCROLL_BAR 1
  9937.  
  9938.     HWND hwndScroll,hwndClient;
  9939.     hwndScroll = WinCreateWindow(
  9940.         hwndClient,                      /* Scroll-bar parent window       */
  9941.         WC_SCROLLBAR,                    /* Preregistered scroll-bar class */
  9942.         (PSZ) NULL,                      /* No window title                */
  9943.         SBS_VERT | WS_VISIBLE,           /* Vertical style and visible     */
  9944.         10, 10,                          /* Position & Size
  9945. */         20, 100,                         /* Size                           */
  9946.         hwndClient,                      /* Owner                          */
  9947.         HWND_TOP,                        /* Z-order position               */
  9948.         ID_SCROLL_BAR,                   /* Scroll-bar identifier          */
  9949.         NULL,                            /* No class-specific data         */
  9950.         NULL);                           /* No presentation parameters     */
  9951.  
  9952.  
  9953. ΓòÉΓòÉΓòÉ 14.2.2. Retrieving a Scroll-Bar Handle ΓòÉΓòÉΓòÉ
  9954.  
  9955. If you use the WinCreateStdWindow function to create a scroll bar as a child of 
  9956. the frame window, you must be able to retrieve the scroll-bar handle.  One way 
  9957. to do this is to use the WinWindowFromID function, the frame-window handle, and 
  9958. a predefined identifier (such as FID_HORZSCROLL or FID_VERTSCROLL), as shown in 
  9959. the following code fragment: 
  9960.  
  9961.     HWND hwndFrame,hwndHorzScroll,hwndVertScroll;
  9962.  
  9963.     hwndHorzScroll = WinWindowFromID(hwndFrame, FID_HORZSCROLL);
  9964.     hwndVertScroll = WinWindowFromID(hwndFrame, FID_VERTSCROLL);
  9965.  
  9966. If the standard frame window includes a client window, you can use that handle 
  9967. to access the scroll bars.  The idea is to get the frame-window handle first; 
  9968. then, the scroll-bar handle. 
  9969.  
  9970.  
  9971.     HWND hwndScroll,hwndClient;
  9972.  
  9973.     /* Get a handle to the horizontal scroll bar. */
  9974.     hwndScroll = WinWindowFromID(
  9975.         WinQueryWindow(hwndClient, QW_PARENT),
  9976.         FID_HORZSCROLL);
  9977.  
  9978.  
  9979. ΓòÉΓòÉΓòÉ 14.2.3. Using the Scroll-Bar Range and Position ΓòÉΓòÉΓòÉ
  9980.  
  9981. You can initialize the current value and range of a scroll bar to non-default 
  9982. values by sending the SBCDATA structure with class-specific data for a call to 
  9983. WinCreateWindow: 
  9984.  
  9985.     #define ID_SCROLL_BAR 1
  9986.  
  9987.     SBCDATA sbcd;
  9988.     HWND hwndScroll,hwndClient;
  9989.  
  9990.     /* Set up scroll-bar control data.                     */
  9991.     sbcd.posFirst = 200;
  9992.     sbcd.posLast  = 400;
  9993.     sbcd.posThumb = 300;
  9994.  
  9995.     /* Create the scroll bar.                              */
  9996.     hwndScroll = WinCreateWindow(hwndClient,
  9997.         WC_SCROLLBAR,
  9998.         (PSZ) NULL,
  9999.         SBS_VERT | WS_VISIBLE,
  10000.         10, 10,
  10001.         20, 100,
  10002.         hwndClient,
  10003.         HWND_TOP,
  10004.         ID_SCROLL_BAR,
  10005.         &sbcd,                     /* Class-specific data  */
  10006.         NULL);
  10007.  
  10008. You can adjust a scroll-bar value and range by sending it an SBM_SETSCROLLBAR 
  10009. message: 
  10010.  
  10011.     /* Set the scroll-bar value and range. */
  10012.  
  10013.     WinSendMsg(hwndScroll, SBM_SETSCROLLBAR,
  10014.         (MPARAM)300,
  10015.         MPFROM2SHORT(200, 400));
  10016.  
  10017. You can read a scroll-bar value by sending it an SBM_QUERYPOS message: 
  10018.  
  10019.     USHORT usSliderPos;
  10020.  
  10021.     /* Read the scroll-bar value. */
  10022.     usSliderPos = (USHORT) WinSendMsg(hwndScroll,
  10023.         SBM_QUERYPOS, (MPARAM) NULL, (MPARAM) NULL);
  10024.  
  10025. Similarly, you can set a scroll-bar value by sending an SBM_SETPOS message: 
  10026.  
  10027.     /* Set the vertical scroll-bar value. */
  10028.     WinSendMsg(hwndScroll, SBM_SETPOS, (MPARAM)300, (MPARAM) NULL);
  10029.  
  10030. You can read a scroll-bar range by sending it an SBM_QUERYRANGE message: 
  10031.  
  10032.     MRESULT mr;
  10033.     USHORT  usMinimum, usMaximum;
  10034.  
  10035.     /* Read the vertical scroll-bar range.                               */
  10036.     mr = WinSendMsg(hwndScroll, SBM_QUERYRANGE, (MPARAM) NULL, (MPARAM) NULL);
  10037.  
  10038.     usMinimum = SHORT1FROMMR(mr);            /* minimum in the low word  */
  10039.     usMaximum = SHORT2FROMMR(mr);            /* maximum in the high word */
  10040.  
  10041.  
  10042. ΓòÉΓòÉΓòÉ 14.3. Summary ΓòÉΓòÉΓòÉ
  10043.  
  10044. Following are the operating system structure and messages used with scroll 
  10045. bars. 
  10046.  
  10047. Scroll-Bar Structure 
  10048.  
  10049. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10050. ΓöéStructure name          ΓöéDescription                         Γöé
  10051. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10052. ΓöéSBCDATA                 ΓöéScroll-bar control data structure.  Γöé
  10053. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10054.  
  10055. Messages Sent to a Scroll Bar 
  10056.  
  10057. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10058. ΓöéMessage                 ΓöéDescription                         Γöé
  10059. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10060. ΓöéSBM_QUERYPOS            ΓöéReturns the slider position.        Γöé
  10061. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10062. ΓöéSBM_QUERYRANGE          ΓöéReturns the scroll bar range.       Γöé
  10063. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10064. ΓöéSBM_SETPOS              ΓöéSets the position of the slider.    Γöé
  10065. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10066. ΓöéSBM_SETSCROLLBAR        ΓöéSets the scroll-bar range and sliderΓöé
  10067. Γöé                        Γöépositions.                          Γöé
  10068. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10069. ΓöéSBM_SETTHUMBSIZE        ΓöéSets the scroll bar slider size.    Γöé
  10070. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10071.  
  10072. Messages Sent from a Scroll Bar to Its Owner Window 
  10073.  
  10074. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10075. ΓöéMessage                 ΓöéDescription                         Γöé
  10076. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10077. ΓöéWM_HSCROLL              ΓöéOccurs when a horizontal scroll bar Γöé
  10078. Γöé                        Γöécontrol has a significant event to  Γöé
  10079. Γöé                        Γöénotify to its owner.                Γöé
  10080. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10081. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  10082. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  10083. Γöé                        Γöéconversion of DBCS characters.      Γöé
  10084. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10085. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  10086. Γöé                        Γöéthe scroll bar control window       Γöé
  10087. Γöé                        Γöéparameters.                         Γöé
  10088. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10089. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  10090. Γöé                        Γöéchanges the scroll bar control      Γöé
  10091. Γöé                        Γöéwindow.                             Γöé
  10092. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10093. ΓöéWM_VSCROLL              ΓöéOccurs when a vertical scroll bar   Γöé
  10094. Γöé                        Γöécontrol has a significant event to  Γöé
  10095. Γöé                        Γöénotify to its owner.                Γöé
  10096. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10097.  
  10098.  
  10099. ΓòÉΓòÉΓòÉ 15. Spin Button Controls ΓòÉΓòÉΓòÉ
  10100.  
  10101. A spin button control (WC_SPINBUTTON window class) is a visual component that 
  10102. gives users quick access to a finite set of data by letting them select from a 
  10103. scrollable ring of choices.  Since the user can see only one item at a time, a 
  10104. spin button should be used only with data that is intuitively related, such as 
  10105. a list of the months of the year, or an alphabetic list of cities or states. 
  10106. This chapter explains when and how to use spin buttons in PM applications. 
  10107.  
  10108.  
  10109. ΓòÉΓòÉΓòÉ 15.1. About Spin Buttons ΓòÉΓòÉΓòÉ
  10110.  
  10111. A spin button consists of at least one spin field that is a single-line entry 
  10112. (SLE) field, and up and down arrows that are stacked on top of one another. 
  10113. These arrows are positioned to the right of the SLE field. The following figure 
  10114. shows an example. 
  10115.  
  10116. Example of a Spin Button 
  10117.  
  10118. You can create multi-field spin buttons for those applications in which users 
  10119. must select more than one value.  For example, in setting a date, the spin 
  10120. button control can provide individual fields for setting the month, day, and 
  10121. year.  The first spin field in the spin button could contain a list of months; 
  10122. the second, a list of numbers; and the third, a list of years. 
  10123.  
  10124. The application uses a multi-field spin button by creating one master component 
  10125. that contains a spin field and the spin arrows, and servant components that 
  10126. contain only spin fields.  The spin buttons are created at component 
  10127. initialization.  The servant components are passed a handle to the master 
  10128. component in a message.  When a servant spin field has the focus, it is spun by 
  10129. the arrows in the master component. 
  10130.  
  10131. The list of values in a spin button entry field can be an array of data or a 
  10132. list of consecutive integers, defined by an upper and a lower limit. 
  10133.  
  10134.  
  10135. ΓòÉΓòÉΓòÉ 15.2. Creating a Spin Button ΓòÉΓòÉΓòÉ
  10136.  
  10137. A spin button is created as a public window class by using the WinCreateWindow 
  10138. function, with a class style of WC_SPINBUTTON and a window style of WS_VISIBLE. 
  10139. These are joined with any of the spin button style flags by using a logical OR 
  10140. (|).  The spin button style flags let you specify: 
  10141.  
  10142. o Character input restrictions (none, numeric, read-only) 
  10143. o Presentation of the data in the spin field (left-justified, right-justified, 
  10144.   centered) 
  10145. o Presence or absence of a border around the spin field 
  10146. o Spin speed 
  10147. o Zero-padding of numeric spin fields. 
  10148.  
  10149. The placement and width of the spin button component are specified as 
  10150. parameters in the WinCreateWindow function. 
  10151.  
  10152. The upper and lower limits of numeric fields, the value array pointer for 
  10153. arrays of strings, and the initial value in the spin field are all set by 
  10154. messages sent from the application to the component. 
  10155.  
  10156. You can destroy the spin button component window using the WinDestroyWindow 
  10157. function when finished.  The component handle that was returned when the spin 
  10158. button was created is the input parameter to the WinDestroyWindow function. 
  10159.  
  10160. The following figure is an example of how to create a spin button. 
  10161.  
  10162.  
  10163. Sample Code for Creating a Spin Button
  10164.  
  10165. ULONG      ulSpinStyle;              /* Spin Button style             */
  10166. HWND       hwndSpin;                 /* Spin Button window handle     */
  10167.  
  10168. /**********************************************************************/
  10169. /* Set the SPBS_* style flags.                                        */
  10170. /**********************************************************************/
  10171. ulSpinStyle    = SPBS_MASTER      |  /* Spinbtn has its own buttons,  */
  10172.                  SPBS_NUMERICONLY |  /* .. and it only holds numbers  */
  10173.                  SPBS_JUSTRIGHT   |  /* .. that are right justified,  */
  10174.                  SPBS_FASTSPIN;      /* .. and it spins faster as     */
  10175.                                      /*    the arrows are held down   */
  10176.  
  10177. /**********************************************************************/
  10178. /* Create the Spin Button control window.  The handle of the window   */
  10179. /* is returned in hwndSpin.                                           */
  10180. /**********************************************************************/
  10181. hwndSpin = WinCreateWindow (
  10182.                      hwndClient,     /* Parent window handle          */
  10183.                      WC_SPINBUTTON,  /* Spin Button window class name */
  10184.                      (PSZ)NULL,      /* No window text                */
  10185.                      ulSpinStyle,    /* Spin Button styles variable   */
  10186.  
  10187.                      (LONG)10,       /* X coordinate                  */
  10188.                      (LONG)10,       /* Y coordinate                  */
  10189.                      (LONG)150,      /* Window width                  */
  10190.                      (LONG)50,       /* Window height                 */
  10191.                      hwndClient,     /* Owner window handle           */
  10192.                      HWND_TOP,       /* Sibling window handle         */
  10193.                      ID_SPINBUTTON,  /* Spin Button control window ID */
  10194.                      (PVOID)NULL     /* No control data structure     */
  10195.                      (PVOID)NULL);   /* No presentation parameters    */
  10196.  
  10197. /**********************************************************************/
  10198. /* Set the limits of the Spin Button control, since it has a style    */
  10199. /* of SPBS_NUMERICONLY.                                               */
  10200. /**********************************************************************/
  10201. WinSendMsg (hwndSpin,                /* Spin Button window handle     */
  10202.             SPBM_SETLIMITS,          /* Set limits message            */
  10203.             (MPARAM)1000,            /* Spin Button maximum setting   */
  10204.             (MPARAM)0);              /* Spin Button minimum setting   */
  10205.  
  10206. /**********************************************************************/
  10207. /* Set the initial value of the Spin Button.                          */
  10208. /**********************************************************************/
  10209. WinSendMsg (hwndSpin,                /* Spin Button window handle     */
  10210.             SPBM_SETCURRENTVALUE,    /* Set current value message.    */
  10211.             (MPARAM)100,             /* Spin Button initial value     */
  10212.             (MPARAM)NULL);           /* Reserved value                */
  10213.  
  10214. /**********************************************************************/
  10215. /* Because all items have been set, make the control visible.         */
  10216. /**********************************************************************/
  10217. WinShowWindow (hwndSpin,             /* Spin Button window handle     */
  10218.                TRUE);                /* Make the window visible.      */
  10219.  
  10220.  
  10221. ΓòÉΓòÉΓòÉ 15.3. Graphical User Interface Support for Spin Buttons ΓòÉΓòÉΓòÉ
  10222.  
  10223. Users can interact with the spin button using either the keyboard or a pointing 
  10224. device, such as a mouse, as follows: 
  10225.  
  10226. o Using the select button (button 1) on the pointing device, users first give 
  10227.   focus to the spin field they want to change, and then click on either the Up 
  10228.   Arrow or Down Arrow until the value they want is displayed in the spin field. 
  10229.  
  10230. o Using a keyboard, users press the: 
  10231.  
  10232.    - Up Arrow and Down Arrow keys to see the choices 
  10233.  
  10234.    - Left Arrow and Right Arrow keys to move the cursor left and right within a 
  10235.      spin field 
  10236.  
  10237.    - Home and End keys to move the cursor to the first and last characters in a 
  10238.      spin field 
  10239.  
  10240.    - Tab and Back Tab (Shift+Tab) keys to move the input focus from one field 
  10241.      to another in multi-field spin buttons. 
  10242.  
  10243. Users can view the values in a spin field one at a time, or they can rapidly 
  10244. scroll a list by keeping either the Up or Down Arrow keys pressed.  When a spin 
  10245. button is not read-only, users can advance quickly to the value they want to 
  10246. set in a spin field by typing over the value currently displayed. 
  10247.  
  10248.  
  10249. ΓòÉΓòÉΓòÉ 15.4. Summary ΓòÉΓòÉΓòÉ
  10250.  
  10251. Following are tables that describe the OS/2 spin button control notification 
  10252. codes, notification message, and window messages: 
  10253.  
  10254. Spin Button Control Notification Codes 
  10255.  
  10256. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10257. ΓöéCode name               ΓöéDescription                         Γöé
  10258. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10259. ΓöéSPBN_CHANGE             ΓöéSent when the contents of the spin  Γöé
  10260. Γöé                        Γöéfield change.                       Γöé
  10261. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10262. ΓöéSPBN_DOWNARROW          ΓöéSent when the Down Arrow button is  Γöé
  10263. Γöé                        Γöéclicked on or the Down Arrow key is Γöé
  10264. Γöé                        Γöépressed.                            Γöé
  10265. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10266. ΓöéSPBN_ENDSPIN            ΓöéSent when the user releases the     Γöé
  10267. Γöé                        Γöéselect button or one of the arrow   Γöé
  10268. Γöé                        Γöékeys while spinning a button.       Γöé
  10269. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10270. ΓöéSPBN_KILLFOCUS          ΓöéSent when the spin field loses the  Γöé
  10271. Γöé                        Γöéfocus.                              Γöé
  10272. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10273. ΓöéSPBN_SETFOCUS           ΓöéSent when the spin field is         Γöé
  10274. Γöé                        Γöéselected.                           Γöé
  10275. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10276. ΓöéSPBN_UPARROW            ΓöéSent when the Up Arrow button is    Γöé
  10277. Γöé                        Γöéclicked on or the Up Arrow key is   Γöé
  10278. Γöé                        Γöépressed.                            Γöé
  10279. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10280.  
  10281. Spin Button Control Notification Message 
  10282.  
  10283. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10284. ΓöéMessage        ΓöéDescription                                  Γöé
  10285. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10286. ΓöéWM_CONTROL     ΓöéOccurs when the spin button control has a    Γöé
  10287. Γöé               Γöésignificant event to notify to its owner.    Γöé
  10288. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10289.  
  10290. Spin Button Control Window Messages 
  10291.  
  10292. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10293. ΓöéMessage                       ΓöéDescription                   Γöé
  10294. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10295. ΓöéSPBM_OVERRIDESETLIMITS        ΓöéCauses the component to set orΓöé
  10296. Γöé                              Γöéreset numeric limits.         Γöé
  10297. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10298. ΓöéSPBM_QUERYLIMITS              ΓöéEnables an application to     Γöé
  10299. Γöé                              Γöéquery the limits of a numeric Γöé
  10300. Γöé                              Γöéspin field.                   Γöé
  10301. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10302. ΓöéSPBM_QUERYVALUE               ΓöéCauses the component to show  Γöé
  10303. Γöé                              Γöéthe value in the spin field.  Γöé
  10304. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10305. ΓöéSPBM_SETARRAY                 ΓöéCauses the component to set orΓöé
  10306. Γöé                              Γöéreset the array of data.      Γöé
  10307. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10308. ΓöéSPBM_SETCURRENTVALUE          ΓöéCauses the component to set orΓöé
  10309. Γöé                              Γöéreset the current numeric     Γöé
  10310. Γöé                              Γöévalue or array index.         Γöé
  10311. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10312. ΓöéSPBM_SETLIMITS                ΓöéCauses the component to set orΓöé
  10313. Γöé                              Γöéreset numeric limits.         Γöé
  10314. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10315. ΓöéSPBM_SETMASTER                ΓöéCauses the component to       Γöé
  10316. Γöé                              Γöéidentify its master.          Γöé
  10317. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10318. ΓöéSPBM_SETTEXTLIMIT             ΓöéSets the maximum number of    Γöé
  10319. Γöé                              Γöécharacters allowed in a spin  Γöé
  10320. Γöé                              Γöéfield.                        Γöé
  10321. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10322. ΓöéSPBM_SPINDOWN                 ΓöéCauses the component to show  Γöé
  10323. Γöé                              Γöéthe previous value (spin      Γöé
  10324. Γöé                              Γöébackward).                    Γöé
  10325. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10326. ΓöéSPBM_SPINUP                   ΓöéCauses the component to show  Γöé
  10327. Γöé                              Γöéthe next value (spin forward).Γöé
  10328. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10329.  
  10330.  
  10331. ΓòÉΓòÉΓòÉ 16. Static Controls ΓòÉΓòÉΓòÉ
  10332.  
  10333. A static control is a simple text field, bit map, or icon that an application 
  10334. can use to label, enclose, or separate other control windows.  This chapter 
  10335. describes how to create and use static controls in a PM application. 
  10336.  
  10337.  
  10338. ΓòÉΓòÉΓòÉ 16.1. About Static Controls ΓòÉΓòÉΓòÉ
  10339.  
  10340. Unlike the other types of control windows, a static control does not accept 
  10341. user input nor send notification messages to its owner.  The primary advantage 
  10342. of a static control is that it provides a label or graphic that requires little 
  10343. attention from an application.  At most, an application might change the text 
  10344. or position of a static control. 
  10345.  
  10346.  
  10347. ΓòÉΓòÉΓòÉ 16.1.1. Keyboard Focus ΓòÉΓòÉΓòÉ
  10348.  
  10349. A static control never accepts the keyboard focus.  When a static control 
  10350. receives a WM_SETFOCUS message, or when a user clicks the static control, the 
  10351. system advances the focus to the next sibling window that is not a static 
  10352. control.  If the control has no siblings, the system gives the focus to the 
  10353. owner of the static control. 
  10354.  
  10355.  
  10356. ΓòÉΓòÉΓòÉ 16.1.2. Static-Control Handle ΓòÉΓòÉΓòÉ
  10357.  
  10358. Every static control is associated with a 32-bit data field.  A static control 
  10359. with the SS_BITMAP or SS_ICON style uses this field to store the handle of the 
  10360. bit map or icon that it displays.  An application can obtain that handle by 
  10361. sending the SM_QUERYHANDLE message to the control.  An application can replace 
  10362. the bit map or icon by sending the SM_SETHANDLE message to the control, 
  10363. specifying a valid icon or bit map handle.  Changing the handle causes the 
  10364. system to redraw the control. 
  10365.  
  10366. For a non-icon or non-bit map static control, the data field is available for 
  10367. application-defined data and has no effect on the appearance of the control. 
  10368.  
  10369. An application can retrieve the data field of a static-control window by 
  10370. calling WinWindowFromID, using the handle of the owner and the window 
  10371. identifier of the static control.  The static-control window identifier is 
  10372. specified in either the dialog-window template or the WinCreateWindow function. 
  10373.  
  10374.  
  10375. ΓòÉΓòÉΓòÉ 16.1.3. Static-Control Styles ΓòÉΓòÉΓòÉ
  10376.  
  10377. A static control has style bits that determine whether the control displays 
  10378. text, draws a simple box containing text, displays an icon or a bit map, or 
  10379. shows a framed or unframed colored box.  Applications can specify a combination 
  10380. of the following styles for a static control: 
  10381.  
  10382. Static-Control Styles 
  10383.  
  10384. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10385. ΓöéStyle          ΓöéDescription                                  Γöé
  10386. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10387. ΓöéSS_BITMAP      ΓöéDraws a bit map. The bit map resource must beΓöé
  10388. Γöé               Γöéprovided in the resource-definition file. To Γöé
  10389. Γöé               Γöéinclude the bit map in a dialog window, the  Γöé
  10390. Γöé               Γöéresource identifier must be specified in the Γöé
  10391. Γöé               Γöétext parameter of the CONTROL statement in   Γöé
  10392. Γöé               Γöéthe resource definition file. To include the Γöé
  10393. Γöé               Γöébit map in a non-dialog window, the ASCII    Γöé
  10394. Γöé               Γöérepresentation of the identifier must be     Γöé
  10395. Γöé               Γöéspecified in the pszName parameter of the    Γöé
  10396. Γöé               ΓöéWinCreateWindow function. That is, the first Γöé
  10397. Γöé               Γöébyte of the pszName parameter must be the    Γöé
  10398. Γöé               Γöécross-hatch character (#), and the remaining Γöé
  10399. Γöé               Γöétext must be the ASCII representation of the Γöé
  10400. Γöé               Γöéidentifier (for example, #125).              Γöé
  10401. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10402. ΓöéSS_BKGNDFRAME  ΓöéCreates a box whose frame has the background Γöé
  10403. Γöé               Γöécolor.                                       Γöé
  10404. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10405. ΓöéSS_BKGNDRECT   ΓöéCreates a rectangle filled with the          Γöé
  10406. Γöé               Γöébackground color.                            Γöé
  10407. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10408. ΓöéSS_FGNDFRAME   ΓöéCreates a box whose frame has the foreground Γöé
  10409. Γöé               Γöécolor.                                       Γöé
  10410. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10411. ΓöéSS_FGNDRECT    ΓöéCreates a rectangle filled with the          Γöé
  10412. Γöé               Γöéforeground color.                            Γöé
  10413. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10414. ΓöéSS_GROUPBOX    ΓöéCreates a box whose upper-right corner       Γöé
  10415. Γöé               Γöécontains control text. This style is useful  Γöé
  10416. Γöé               Γöéfor enclosing groups of radio buttons or     Γöé
  10417. Γöé               Γöécheck boxes in a box.                        Γöé
  10418. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10419. ΓöéSS_HALFTONEFΓöéCreates a box whose frame has halftone       Γöé
  10420. Γöé               Γöéshading.                                     Γöé
  10421. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10422. ΓöéSS_HALFTONERECTΓöéCreates a box filled with halftone shading.  Γöé
  10423. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10424. ΓöéSS_ICON        ΓöéDraws an icon. The resource identifier for   Γöé
  10425. Γöé               Γöéthe icon resource is determined the same way Γöé
  10426. Γöé               Γöéas the SS_BITMAP style. The icon resource    Γöé
  10427. Γöé               Γöémust be in the resource-definition file.     Γöé
  10428. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10429. ΓöéSS_SYSICON     ΓöéDraws a system-pointer icon. The resource    Γöé
  10430. Γöé               Γöéidentifier for the system-pointer resource isΓöé
  10431. Γöé               Γöédetermined the same way as the SS_BITMAP     Γöé
  10432. Γöé               Γöéstyle.  To display this system pointer, the  Γöé
  10433. Γöé               Γöésystem calls WinQuerySysPointer with the     Γöé
  10434. Γöé               Γöéspecified identifier.                        Γöé
  10435. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10436. ΓöéSS_TEXT        ΓöéCreates a box with formatted text. An        Γöé
  10437. Γöé               Γöéapplication can combine various formatting   Γöé
  10438. Γöé               Γöéoptions with this style to produce formatted Γöé
  10439. Γöé               Γöétext in the boundaries of the control. The   Γöé
  10440. Γöé               Γöéformatting flags are the same as those used  Γöé
  10441. Γöé               Γöéfor the WinDrawText function.                Γöé
  10442. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10443.  
  10444.  
  10445. ΓòÉΓòÉΓòÉ 16.1.4. Default Static-Control Performance ΓòÉΓòÉΓòÉ
  10446.  
  10447. The messages specifically handled by the predefined static-control class 
  10448. (WC_STATIC) are as follows: 
  10449.  
  10450. Messages Handled by WC_STATIC Class 
  10451.  
  10452. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10453. ΓöéMessage                       ΓöéDescription                   Γöé
  10454. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10455. ΓöéSM_SETHANDLE                  ΓöéSets the handle associated    Γöé
  10456. Γöé                              Γöéwith the static control and   Γöé
  10457. Γöé                              Γöéinvalidates the control       Γöé
  10458. Γöé                              Γöéwindow, forcing it to be      Γöé
  10459. Γöé                              Γöéredrawn.                      Γöé
  10460. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10461. ΓöéSM_QUERYHANDLE                ΓöéReturns the handle associated Γöé
  10462. Γöé                              Γöéwith the static-control       Γöé
  10463. Γöé                              Γöéwindow.                       Γöé
  10464. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10465. ΓöéWM_ADJUSTWINDOWPOS            ΓöéAdjusts the SWP structure so  Γöé
  10466. Γöé                              Γöéthat the new window size      Γöé
  10467. Γöé                              Γöématches the bit map, icon, or Γöé
  10468. Γöé                              Γöésystem-pointer dimensions     Γöé
  10469. Γöé                              Γöéassociated with the static    Γöé
  10470. Γöé                              Γöécontrol.                      Γöé
  10471. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10472. ΓöéWM_CREATE                     ΓöéSets the text for a           Γöé
  10473. Γöé                              Γöéstatic-text control. Loads theΓöé
  10474. Γöé                              Γöébit map or icon resource for  Γöé
  10475. Γöé                              Γöéthe bit map or icon static    Γöé
  10476. Γöé                              Γöécontrol. Returns TRUE if the  Γöé
  10477. Γöé                              Γöéresource cannot be loaded.    Γöé
  10478. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10479. ΓöéWM_DESTROY                    ΓöéFrees the text for a          Γöé
  10480. Γöé                              Γöéstatic-text control. Destroys Γöé
  10481. Γöé                              Γöéthe bit map or icon for a bit Γöé
  10482. Γöé                              Γöémap or icon static control.   Γöé
  10483. Γöé                              ΓöéThe icon for a system-pointer Γöé
  10484. Γöé                              Γöéstatic control is not         Γöé
  10485. Γöé                              Γöédestroyed because it belongs  Γöé
  10486. Γöé                              Γöéto the system.                Γöé
  10487. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10488. ΓöéWM_ENABLE                     ΓöéInvalidates the entire        Γöé
  10489. Γöé                              Γöéstatic-control window, forcingΓöé
  10490. Γöé                              Γöéit to be redrawn.             Γöé
  10491. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10492. ΓöéWM_HITTEST                    ΓöéReturns the value             Γöé
  10493. Γöé                              ΓöéHT_TRANSPARENT for the        Γöé
  10494. Γöé                              Γöéfollowing static-control      Γöé
  10495. Γöé                              Γöéstyles: BKGNDFRAME            Γöé
  10496. Γöé                              ΓöéSS_BKGNDRECT                  Γöé
  10497. Γöé                              ΓöéSS_FGNDFRAME                  Γöé
  10498. Γöé                              ΓöéSS_FGNDRECT                   Γöé
  10499. Γöé                              ΓöéSS_GROUPBOX                   Γöé
  10500. Γöé                              ΓöéSS_HALFTONEFRAME              Γöé
  10501. Γöé                              ΓöéSS_HALFTONERECT.              Γöé
  10502. Γöé                              ΓöéFor other styles, this messageΓöé
  10503. Γöé                              Γöéreturns the result of the     Γöé
  10504. Γöé                              ΓöéWinDefWindowProc function.    Γöé
  10505. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10506. ΓöéWM_MATCHMNEMONIC              ΓöéReturns TRUE if the mnemonic  Γöé
  10507. Γöé                              Γöépassed in the mp1 parameter   Γöé
  10508. Γöé                              Γöématches the mnemonic in the   Γöé
  10509. Γöé                              Γöécontrol-window text.          Γöé
  10510. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10511. ΓöéWM_MOUSEMOVE                  ΓöéSets the mouse pointer to the Γöé
  10512. Γöé                              Γöéarrow pointer and returns     Γöé
  10513. Γöé                              ΓöéTRUE.                         Γöé
  10514. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10515. ΓöéWM_PAINT                      ΓöéDraws the static control basedΓöé
  10516. Γöé                              Γöéon its style attributes.      Γöé
  10517. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10518. ΓöéWM_QUERYDLGCODE               ΓöéReturns the predefined        Γöé
  10519. Γöé                              Γöéconstant DLGC_STATIC.         Γöé
  10520. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10521. ΓöéWM_QUERYWINDOWPARAMS          ΓöéReturns the requested window  Γöé
  10522. Γöé                              Γöéparameters.                   Γöé
  10523. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10524. ΓöéWM_SETFOCUS                   ΓöéSets the focus to the next    Γöé
  10525. Γöé                              Γöésibling window that can acceptΓöé
  10526. Γöé                              Γöéthe focus; or if no such      Γöé
  10527. Γöé                              Γöésibling exists, sets the focusΓöé
  10528. Γöé                              Γöéto the parent window.         Γöé
  10529. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10530. ΓöéWM_SETWINDOWPARAMS            ΓöéAllows the text to be set     Γöé
  10531. Γöé                              Γöé(static-text controls only).  Γöé
  10532. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10533.  
  10534.  
  10535. ΓòÉΓòÉΓòÉ 16.2. Using Static Controls ΓòÉΓòÉΓòÉ
  10536.  
  10537. This section explains how to perform the following tasks: 
  10538.  
  10539. o Include a static control in a dialog window. 
  10540. o Include a static control in a client window. 
  10541.  
  10542.  
  10543. ΓòÉΓòÉΓòÉ 16.2.1. Including a Static Control in a Dialog Window ΓòÉΓòÉΓòÉ
  10544.  
  10545. To include a static control in a dialog window, you must define the control in 
  10546. a dialog-window template in a resource-definition file.  The following 
  10547. resource-definition file creates a dialog window that contains a static-text 
  10548. control and three static-icon controls: 
  10549.  
  10550.     DLGTEMPLATE IDD_TOOLDLG LOADONCALL MOVEABLE DISCARDABLE
  10551.     BEGIN
  10552.         DIALOG "", IDD_TOOLDLG, 114, 53, 161, 127, FS_NOBYTEALIGN |
  10553.                     FS_DLGBORDER | WS_VISIBLE | WS_SAVEBITS
  10554.         BEGIN
  10555.             CTEXT "Select a tool", IDS_TEXT, 49, 110, 56, 8,
  10556.                     SS_TEXT | DT_CENTER | DT_TOP | WS_GROUP | WS_VISIBLE
  10557.             AUTORADIOBUTTON "Paintbrush", IDB_BRUSH, 63, 87, 61, 10,
  10558.                     WS_TABSTOP | WS_GROUP | WS_VISIBLE
  10559.             AUTORADIOBUTTON "Scissors", IDB_SCISSORS, 63, 64, 60, 10,
  10560.                     WS_TABSTOP | WS_VISIBLE
  10561.             AUTORADIOBUTTON "Eraser", IDB_ERASER, 65, 39, 43, 10,
  10562.                     WS_TABSTOP | WS_VISIBLE
  10563.             ICON IDI_BRUSH, IDI_BRUSHICON, 33, 84, 22, 16,
  10564.                     WS_GROUP | WS_VISIBLE
  10565.             ICON IDI_SCISSORS, IDI_SCISSORSICON, 33, 60, 22, 16,
  10566.                     WS_GROUP | WS_VISIBLE
  10567.             ICON IDI_ERASER, IDI_ERASERICON, 33, 36, 22, 16,
  10568.                     WS_GROUP | WS_VISIBLE
  10569.             PUSHBUTTON "OK", DID_OK, 10, 12, 38, 13, WS_TABSTOP |
  10570.                     WS_GROUP | WS_VISIBLE
  10571.             PUSHBUTTON "Cancel", DID_CANCEL, 59, 12, 38, 13,
  10572.                     BS_DEFAULT | WS_TABSTOP | WS_GROUP | WS_VISIBLE
  10573.             PUSHBUTTON "Help", IDB_HELP, 111, 13, 38, 13,
  10574.                     BS_HELP | WS_TABSTOP | WS_GROUP | WS_VISIBLE
  10575.         END
  10576.     END
  10577.  
  10578.     ICON IDI_BRUSH brush.ico
  10579.     ICON IDI_SCISSORS scissr.ico
  10580.     ICON IDI_ERASER eraser.ico
  10581.  
  10582.  
  10583. ΓòÉΓòÉΓòÉ 16.2.2. Including a Static Control in a Client Window ΓòÉΓòÉΓòÉ
  10584.  
  10585. An application can include a static control in a non-dialog window by calling 
  10586. WinCreateWindow with the window class WC_STATIC.  The flStyle parameter to 
  10587. WinCreateWindow defines the appearance of the control. 
  10588.  
  10589. The following code fragment creates a static text control whose size and 
  10590. position are based on the size of the client window and the metrics for the 
  10591. current font: 
  10592.  
  10593.    #define ID_TITLE 5
  10594.  
  10595.    HWND hwnd,hwndStatic,hwndClient;
  10596.    HPS hps;
  10597.    RECTL rcl;
  10598.    FONTMETRICS fm;
  10599.    ULONG ulTitleLen;
  10600.    CHAR szTitle[] = "Static Text Controls";
  10601.  
  10602.    /* Obtain the size of the client window.              */
  10603.    WinQueryWindowRect(hwnd, &rcl);
  10604.  
  10605.    /* Obtain a presentation space handle and the metrics for
  10606.    * the current font.                                   */
  10607.    hps = WinBeginPaint (hwnd, (HPS) NULL, (PRECTL) NULL);
  10608.    GpiQueryFontMetrics(hps, sizeof(FONTMETRICS), &fm);
  10609.  
  10610.    /* Obtain the size of the static-control text string. */
  10611.    ulTitleLen = (ULONG) strlen(szTitle);
  10612.    /* Create the static control. Base the size and position
  10613.    * on the size of the client window and the metrics of the
  10614.    * current font.                                       */
  10615.  
  10616.    hwndStatic = WinCreateWindow(
  10617.        hwndClient,                     /* Parent window            */
  10618.        WC_STATIC,                      /* Window class             */
  10619.        szTitle,                        /* Window text              */
  10620.        WS_VISIBLE |                    /* Make it visible          */
  10621.        SS_TEXT    |                    /* Static-text control      */
  10622.        DT_VCENTER |                    /* Center text vertically   */
  10623.        DT_CENTER,                      /* Center text horizontally */
  10624.        ((rcl.xRight / 2) -
  10625.          (ulTitleLen / 2) * fm.lEmInc),/* x position               */
  10626.        rcl.yTop - fm.lEmHeight * 2,    /* y position               */
  10627.        fm.lEmInc * ulTitleLen,         /* Width                    */
  10628.        fm.lEmHeight * 2,               /* Height                   */
  10629.        hwndClient,                     /* Owner window             */
  10630.        HWND_TOP,                       /* Top of z-order           */
  10631.        ID_TITLE,                       /* Window identifier        */
  10632.        NULL,                           /* Control data             */
  10633.        NULL);                          /* Presentation parameters  */
  10634.  
  10635.    WinEndPaint(hps);
  10636.  
  10637. If your application creates a static control with the SS_ICON or SS_BITMAP 
  10638. style, make sure that the resource identifier specified in the pszName 
  10639. parameter corresponds to an icon or a bit map resource in the 
  10640. resource-definition file.  If there is no resource, the application cannot 
  10641. create the static control. 
  10642.  
  10643.  
  10644. ΓòÉΓòÉΓòÉ 16.3. Summary ΓòÉΓòÉΓòÉ
  10645.  
  10646. Following are the operating system functions and messages used with static 
  10647. controls: 
  10648.  
  10649. Static-Control Functions 
  10650.  
  10651. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10652. ΓöéFunction name           ΓöéDescription                         Γöé
  10653. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10654. ΓöéWinQuerySysPointer      ΓöéReturns the system pointer handle.  Γöé
  10655. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10656. ΓöéWinSetWindowPos         ΓöéAllows the general positioning of a Γöé
  10657. Γöé                        Γöéwindow.                             Γöé
  10658. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10659. ΓöéWinSetWindowText        ΓöéSets the window text for a specifiedΓöé
  10660. Γöé                        Γöéwindow.                             Γöé
  10661. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10662. ΓöéWinWindowFromID         ΓöéReturns the handle of the child     Γöé
  10663. Γöé                        Γöéwindow with the specified identity. Γöé
  10664. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10665.  
  10666. Static-Control Messages 
  10667.  
  10668. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10669. ΓöéMessage                 ΓöéDescription                         Γöé
  10670. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10671. ΓöéSM_QUERYHANDLE          ΓöéReturns the icon or bit map handle  Γöé
  10672. Γöé                        Γöéof a static control.                Γöé
  10673. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10674. ΓöéSM_SETHANDLE            ΓöéSets the icon or bit map handle of aΓöé
  10675. Γöé                        Γöéstatic control.                     Γöé
  10676. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10677. ΓöéWM_MATCHMNEMONIC        ΓöéSent by the dialog box to a control Γöé
  10678. Γöé                        Γöéwindow to determine whether a typed Γöé
  10679. Γöé                        Γöécharacter matches a mnemonic in its Γöé
  10680. Γöé                        Γöéwindow text.                        Γöé
  10681. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10682. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  10683. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  10684. Γöé                        Γöéconversion of DBCS characters.      Γöé
  10685. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10686. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  10687. Γöé                        Γöéthe static control window procedure Γöé
  10688. Γöé                        Γöéwindow parameters.                  Γöé
  10689. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10690. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  10691. Γöé                        Γöéchanges the static control window   Γöé
  10692. Γöé                        Γöéprocedure window parameters.        Γöé
  10693. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10694.  
  10695.  
  10696. ΓòÉΓòÉΓòÉ 17. Title-Bar Controls ΓòÉΓòÉΓòÉ
  10697.  
  10698. A title-bar is one of several control windows that comprise a standard frame 
  10699. window, giving the frame window its distinctive look and performance 
  10700. capabilities.  This chapter describes how to create and use title-bar control 
  10701. windows in PM applications. 
  10702.  
  10703.  
  10704. ΓòÉΓòÉΓòÉ 17.1. About Title Bars ΓòÉΓòÉΓòÉ
  10705.  
  10706. The title bar in a standard frame window performs the following four functions: 
  10707.  
  10708. o Displays the title of the window across the top of the frame window. 
  10709.  
  10710. o Changes its highlighted appearance to show whether the frame window is 
  10711.   active.  (Ordinarily, the topmost window on the screen is the active window.) 
  10712.  
  10713. o Responds to the actions of the user-for example, dragging the frame window to 
  10714.   a new location on the screen. 
  10715.  
  10716. o Flashes (as a result of the WinFlashWindow function) to get the attention of 
  10717.   the user. 
  10718.  
  10719. Title Bar in a Standard Frame Window 
  10720.  
  10721. Once the frame controls are in place in the frame window, an application 
  10722. typically ignores them, because the system handles frame controls.  In some 
  10723. cases, however, an application can take control of the title bar by sending 
  10724. messages to the title-bar control window. 
  10725.  
  10726.  
  10727. ΓòÉΓòÉΓòÉ 17.1.1. Default Title-Bar Behavior ΓòÉΓòÉΓòÉ
  10728.  
  10729. A title-bar control window sends messages to its owner (the frame window) when 
  10730. the control receives user input.  Following are the messages that the title-bar 
  10731. control processes.  Each message is described in terms of how the title-bar 
  10732. control responds to that message. 
  10733.  
  10734. Messages Processed by Title-Bar Control 
  10735.  
  10736. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10737. ΓöéMessage                 ΓöéDescription                         Γöé
  10738. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10739. ΓöéTBM_QUERYHILITE         ΓöéReturns the highlighted state of theΓöé
  10740. Γöé                        Γöétitle bar.                          Γöé
  10741. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10742. ΓöéTBM_SETHILITE           ΓöéSets the highlighted state of the   Γöé
  10743. Γöé                        Γöétitle bar, repainting the title bar Γöé
  10744. Γöé                        Γöéif the state is changing.           Γöé
  10745. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10746. ΓöéWM_BUTTON1DBLCLK        ΓöéRestores the title bar if the owner Γöé
  10747. Γöé                        Γöéwindow is minimized or maximized.   Γöé
  10748. Γöé                        ΓöéIf the window is neither minimized  Γöé
  10749. Γöé                        Γöénor maximized, this message         Γöé
  10750. Γöé                        Γöémaximizes the window.               Γöé
  10751. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10752. ΓöéWM_BUTTON1DOWN          ΓöéSends the WM_TRACKFRAME message to  Γöé
  10753. Γöé                        Γöéthe owner window to start the       Γöé
  10754. Γöé                        Γöétracking operation for the frame    Γöé
  10755. Γöé                        Γöéwindow.                             Γöé
  10756. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10757. ΓöéWM_CREATE               ΓöéSets the text for the title bar.    Γöé
  10758. Γöé                        ΓöéReturns FALSE if the text is alreadyΓöé
  10759. Γöé                        Γöéset.                                Γöé
  10760. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10761. ΓöéWM_DESTROY              ΓöéFrees the window text for the title Γöé
  10762. Γöé                        Γöébar.                                Γöé
  10763. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10764. ΓöéWM_HITTEST              ΓöéAlways returns HT_NORMAL, so that   Γöé
  10765. Γöé                        Γöéthe title bar does not beep when it Γöé
  10766. Γöé                        Γöéis disabled. (It is disabled when   Γöé
  10767. Γöé                        Γöéthe frame window is maximized.)     Γöé
  10768. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10769. ΓöéWM_PAINT                ΓöéDraws the title bar.                Γöé
  10770. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10771. ΓöéWM_QUERYDLGCODE         ΓöéReturns the predefined constant     Γöé
  10772. Γöé                        ΓöéDLGC_STATIC. The user cannot use theΓöé
  10773. Γöé                        ΓöéTab key to move to the title bar in Γöé
  10774. Γöé                        Γöéa dialog window.                    Γöé
  10775. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10776. ΓöéWM_QUERYWINDOWPARAMS    ΓöéReturns the requested window        Γöé
  10777. Γöé                        Γöéparameters.                         Γöé
  10778. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10779. ΓöéWM_SETWINDOWPARAMS      ΓöéSets the specified window           Γöé
  10780. Γöé                        Γöéparameters.                         Γöé
  10781. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10782. ΓöéWM_WINDOWPOSCHANGED     ΓöéReturns FALSE. Processes this       Γöé
  10783. Γöé                        Γöémessage to prevent the              Γöé
  10784. Γöé                        ΓöéWinDefWindowProc function from      Γöé
  10785. Γöé                        Γöésending the size and show messages. Γöé
  10786. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10787.  
  10788.  
  10789. ΓòÉΓòÉΓòÉ 17.2. Using Title-Bar Controls ΓòÉΓòÉΓòÉ
  10790.  
  10791. This section explains how to: 
  10792.  
  10793. o Include a title bar in a frame window. 
  10794. o Alter the dragging action of a title bar. 
  10795.  
  10796.  
  10797. ΓòÉΓòÉΓòÉ 17.2.1. Including a Title Bar in a Frame Window ΓòÉΓòÉΓòÉ
  10798.  
  10799. An application can include a title bar in a standard frame window by specifying 
  10800. the FCF_TITLEBAR flag in the WinCreateStdWindow function. 
  10801.  
  10802. The following code fragment shows how to create a standard frame window with a 
  10803. title bar, minimize and maximize (window-sizing) buttons, size border, system 
  10804. menu, and an application menu. 
  10805.  
  10806.     #define ID_MENU_RESOURCE 101
  10807.  
  10808.     HWND hwndFrame,hwndClient;
  10809.     UCHAR szClassName[255];
  10810.  
  10811.     ULONG flControlStyle = FCF_TITLEBAR | FCF_MINMAX | FCF_SIZEBORDER |
  10812.                            FCF_SYSMENU  | FCF_MENU;
  10813.  
  10814.     hwndFrame = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE | FS_ACCELTABLE,
  10815.                                    &flControlStyle, szClassName, "",
  10816.                                    0, (HMODULE) NULL, ID_MENU_RESOURCE,
  10817.                                    &hwndClient);
  10818.  
  10819.     #define ID_MENU_RESOURCE 101
  10820.  
  10821.     HWND hwndFrame,hwndClient;
  10822.     UCHAR szClassName[255];
  10823.  
  10824.     ULONG flControlStyle = FCF_TITLEBAR | FCF_MINMAX | FCF_SIZEBORDER |
  10825.                            FCF_SYSMENU  | FCF_MENU;
  10826.  
  10827.     hwndFrame = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE | FS_ACCELTABLE,
  10828.                                    &flControlStyle, szClassName, "",
  10829.                                    0, (HMODULE) NULL, ID_MENU_RESOURCE,
  10830.                                    &hwndClient);
  10831.  
  10832. To get the window handle of a title-bar control, an application calls 
  10833. WinWindowFromID, specifying the frame-window handle and a constant identifying 
  10834. the title-bar control, as shown in the following code fragment: 
  10835.  
  10836.  
  10837.     hwndTitleBar = WinWindowFromID(hwndFrame, FID_TITLEBAR);
  10838.  
  10839. To set the text of a title bar, an application can use the WinSetWindowText 
  10840. function.  The frame window passes the new text to the title-bar control in a 
  10841. WM_SETWINDOWPARAMS message. 
  10842.  
  10843.  
  10844. ΓòÉΓòÉΓòÉ 17.2.2. Altering Dragging Action ΓòÉΓòÉΓòÉ
  10845.  
  10846. When the user clicks the title bar, the title-bar control sends a WM_TRACKFRAME 
  10847. message to its owner (the frame window).  When the frame window receives the 
  10848. WM_TRACKFRAME message, the frame sends a WM_QUERYTRACKINFO message to itself to 
  10849. fill in a TRACKINFO structure that defines the tracking parameters and 
  10850. boundaries.  To modify the default behavior, an application must subclass the 
  10851. frame window, intercept the WM_QUERYTRACKINFO message, and modify the TRACKINFO 
  10852. structure.  If the application returns TRUE for the WM_QUERYTRACKINFO message, 
  10853. the tracking operation proceeds according to the information in the TRACKINFO 
  10854. structure.  If the application returns FALSE, no tracking occurs. 
  10855.  
  10856.  
  10857. ΓòÉΓòÉΓòÉ 17.3. Summary ΓòÉΓòÉΓòÉ
  10858.  
  10859. Following are the OS/2 functions, structures, and messages used with title-bar 
  10860. controls. 
  10861.  
  10862. Title-Bar Functions 
  10863.  
  10864. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10865. ΓöéFunction name           ΓöéDescription                         Γöé
  10866. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10867. ΓöéWinCreateStdWindow      ΓöéCreates a standard window.          Γöé
  10868. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10869. ΓöéWinFlashWindow          ΓöéStarts or stops the flashing of a   Γöé
  10870. Γöé                        Γöéwindow.                             Γöé
  10871. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10872. ΓöéWinSetWindowText        ΓöéSets the window text for a specifiedΓöé
  10873. Γöé                        Γöéwindow.                             Γöé
  10874. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10875. ΓöéWinWindowFromID         ΓöéReturns the handle of the child     Γöé
  10876. Γöé                        Γöéwindow with the specified identity. Γöé
  10877. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10878.  
  10879. Title-Bar Structures 
  10880.  
  10881. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10882. ΓöéStructure name          ΓöéDescription                         Γöé
  10883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10884. ΓöéSWP                     ΓöéSet window position structure.      Γöé
  10885. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10886. ΓöéTRACKINFO               ΓöéTracking information structure.     Γöé
  10887. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10888.  
  10889. Title-Bar Messages 
  10890.  
  10891. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10892. ΓöéMessage                 ΓöéDescription                         Γöé
  10893. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10894. ΓöéTBM_QUERYHILITE         ΓöéReturns the highlighting state of a Γöé
  10895. Γöé                        Γöétitle-bar control.                  Γöé
  10896. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10897. ΓöéTBM_SETHILITE           ΓöéUsed to highlight or unhighlight a  Γöé
  10898. Γöé                        Γöétitle-bar control.                  Γöé
  10899. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10900. ΓöéWM_BUTTON1DBLCLK        ΓöéOccurs when the user presses button Γöé
  10901. Γöé                        Γöé1 of the pointing device twice.     Γöé
  10902. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10903. ΓöéWM_BUTTON1DOWN          ΓöéOccurs when the user presses pointerΓöé
  10904. Γöé                        Γöébutton 1.                           Γöé
  10905. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10906. ΓöéWM_CREATE               ΓöéOccurs when an application requests Γöé
  10907. Γöé                        Γöéthe creation of a window.           Γöé
  10908. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10909. ΓöéWM_DESTROY              ΓöéOccurs when an application requests Γöé
  10910. Γöé                        Γöéthe destruction of a window.        Γöé
  10911. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10912. ΓöéWM_HITTEST              ΓöéSent to determine which window is   Γöé
  10913. Γöé                        Γöéassociated with an input from the   Γöé
  10914. Γöé                        Γöépointing device.                    Γöé
  10915. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10916. ΓöéWM_PAINT                ΓöéOccurs when a window needs          Γöé
  10917. Γöé                        Γöérepainting.                         Γöé
  10918. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10919. ΓöéWM_QUERYCONVERTPOS      ΓöéSent by an application to determine Γöé
  10920. Γöé                        Γöéwhether it is appropriate to begin  Γöé
  10921. Γöé                        Γöéconversion of DBCS characters.      Γöé
  10922. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10923. ΓöéWM_QUERYDLGCODE         ΓöéSent by the dialog manager to       Γöé
  10924. Γöé                        Γöéidentify the type of control, to    Γöé
  10925. Γöé                        Γöédetermine what kinds of messages theΓöé
  10926. Γöé                        Γöécontrol understands, and to         Γöé
  10927. Γöé                        Γöédetermine whether an input message  Γöé
  10928. Γöé                        Γöécan be processed by the dialog      Γöé
  10929. Γöé                        Γöémanager or passed down to the       Γöé
  10930. Γöé                        Γöécontrol.                            Γöé
  10931. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10932. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  10933. Γöé                        Γöéthe title-bar control window        Γöé
  10934. Γöé                        Γöéprocedure window parameters.        Γöé
  10935. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10936. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  10937. Γöé                        Γöéchanges the title-bar control windowΓöé
  10938. Γöé                        Γöéprocedure window parameters.        Γöé
  10939. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10940. ΓöéWM_TRACKFRAME           ΓöéSent to a window whenever it is to  Γöé
  10941. Γöé                        Γöébe moved or sized.                  Γöé
  10942. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10943. ΓöéWM_WINDOWPOSCHANGED     ΓöéSent to the window procedure of the Γöé
  10944. Γöé                        Γöéwindow whose position is changed.   Γöé
  10945. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10946.  
  10947.  
  10948. ΓòÉΓòÉΓòÉ 18. Container Controls ΓòÉΓòÉΓòÉ
  10949.  
  10950. A container control (WC_CONTAINER window class) is a visual component that 
  10951. holds objects.  It provides a powerful and flexible component for easily 
  10952. developing products that conform to the Common User Access (CUA) user interface 
  10953. guidelines.  This chapter describes the container control component and how to 
  10954. use it in PM applications. 
  10955.  
  10956.  
  10957. ΓòÉΓòÉΓòÉ 18.1. About Container Controls ΓòÉΓòÉΓòÉ
  10958.  
  10959. A container can display objects in various formats and views.  Generally 
  10960. speaking, each view displays different information about each object.  If a 
  10961. container's data is too large for the window's client area (hereinafter 
  10962. referred to as work area in accordance with CUA guidelines), scrolling 
  10963. mechanisms are enabled.  The CUA direct manipulation protocol is fully 
  10964. supported, enabling a user to visually drag an object in a container window and 
  10965. drop it on another object or container window. 
  10966.  
  10967. Containers are an integral component of the CUA user interface.  For a complete 
  10968. description of CUA containers, refer to the SAA CUA Guide to User Interface 
  10969. Design and the SAA CUA Advanced Interface Design Reference. 
  10970.  
  10971.  
  10972. ΓòÉΓòÉΓòÉ 18.1.1. Container Control Functions ΓòÉΓòÉΓòÉ
  10973.  
  10974. The container control implements the following functions: 
  10975.  
  10976. o Multiple types of views of a container's contents, such as: 
  10977.  
  10978.    - Icon view 
  10979.    - Name view 
  10980.    - Text view 
  10981.    - Tree view 
  10982.    - Details view. 
  10983.  
  10984. o Switching between container views quickly and easily 
  10985.  
  10986. o Sharing records among multiple containers in the same process 
  10987.  
  10988. o Displaying each view with a different font 
  10989.  
  10990. o Directly editing container control text in all views, including blank text 
  10991.   fields 
  10992.  
  10993. o A split bar for vertically splitting the details view into two parts so that 
  10994.   a user can widen one part to see more information 
  10995.  
  10996. o Supporting various data types, such as: 
  10997.  
  10998.    - Icons or bit maps for the icon, name, tree, and details views. In the 
  10999.      details view, this includes the ability to use icons or bit maps in column 
  11000.      headings as well as in the columns themselves. 
  11001.  
  11002.    - Text that is supported in the following situations: 
  11003.  
  11004.       o For container titles in all views 
  11005.       o Beneath icons or bit maps in the icon view 
  11006.       o To the right of icons or bit maps in the name and tree views 
  11007.       o For any column or column heading in the details view 
  11008.       o For container items in the text view. 
  11009.  
  11010.    - Date, time, and number format, for container items in the details view. 
  11011.  
  11012. o Direct manipulation 
  11013.  
  11014. o Selection types, such as: 
  11015.  
  11016.    - Single selection 
  11017.    - Extended selection 
  11018.    - Multiple selection. 
  11019.  
  11020. o Selection techniques, such as: 
  11021.  
  11022.    - Marquee selection 
  11023.    - Two-swipe selections, such as: 
  11024.  
  11025.       o Touch swipe 
  11026.       o Range swipe. 
  11027.  
  11028.    - First-letter selection. 
  11029.  
  11030. o Selection mechanisms, such as: 
  11031.  
  11032.    - Any pointing device 
  11033.    - Keyboard. 
  11034.  
  11035. o Multiple forms of emphasis: 
  11036.  
  11037.    - In-use emphasis 
  11038.    - Selected-state emphasis 
  11039.    - Target emphasis. 
  11040.  
  11041. o Ownerdraw, which enables an application to draw the container items instead 
  11042.   of the container control's drawing them.  In the details view, this can be 
  11043.   done for each column. 
  11044.  
  11045. o Sorting and filtering container items 
  11046.  
  11047. o Arranging container items in the icon view, such as: 
  11048.  
  11049.    - Automatic reposition mode that, when set, repositions container items as a 
  11050.      result of inserting, removing, sorting, or filtering items, or changing 
  11051.      window or font size 
  11052.  
  11053.    - Arrange message mode that arranges overlapping icons or bit maps so that 
  11054.      they no longer overlap. 
  11055.  
  11056. o Scrolling a container's work area, such as: 
  11057.  
  11058.    - When the current size of a container's work area is not large enough for 
  11059.      all the container items to be visible 
  11060.  
  11061.    - Dynamic scrolling to provide visible feedback, showing the movement of the 
  11062.      container items relative to the position of the scroll box. 
  11063.  
  11064. o Data caching: 
  11065.  
  11066.    - To efficiently remove items from, and insert items in, a container as they 
  11067.      scroll in and out of view. 
  11068.  
  11069. o An option to optimize memory usage. 
  11070.  
  11071.  
  11072. ΓòÉΓòÉΓòÉ 18.1.2. Container Control Basics ΓòÉΓòÉΓòÉ
  11073.  
  11074. This section contains basic information about the container control that you 
  11075. need to understand before reading the remainder of the chapter.  This important 
  11076. information is presented in the following order: 
  11077.  
  11078. o Creating a container 
  11079. o Understanding container items 
  11080. o Allocating memory for container records and columns 
  11081. o Understanding container views 
  11082. o Changing a container view. 
  11083.  
  11084.  
  11085. ΓòÉΓòÉΓòÉ 18.1.2.1. Creating a Container ΓòÉΓòÉΓòÉ
  11086.  
  11087. You create a container by using the WC_CONTAINER window class name in the 
  11088. ClassName parameter of the WinCreateWindow function. The following figure shows 
  11089. the creation of the container. The styles specified in the ulCnrStyles variable 
  11090. (the CCS_* values) specifies that the container is to be created with the 
  11091. automatic positioning of container items and extended selection. 
  11092.  
  11093.  
  11094. Sample Code for Creating a Container
  11095.  
  11096. HWND hwndCnr;                  /* Container window handle             */
  11097. ULONG ulCnrStyles;             /* Container window styles             */
  11098.  
  11099. /**********************************************************************/
  11100. /* Set CCS_* flags to customize the                                   */
  11101. /* container.                                                         */
  11102. /**********************************************************************/
  11103. ulCnrStyles =
  11104.   CCS_AUTOPOSITION |            /* Auto position                      */
  11105.   CCS_ EXTENDSEL;               /* Extended selection                 */
  11106.  
  11107. /**********************************************************************/
  11108. /* Create the container control window.                               */
  11109. /**********************************************************************/
  11110. hwndCnr =
  11111.   WinCreateWindow(
  11112.     ClientHwnd,                /* Parent window handle                */
  11113.     WC_CONTAINER,              /* Container class name                */
  11114.  
  11115.     NULL,                      /* No window text                      */
  11116.     ulCnrStyles,               /* Container styles                    */
  11117.     (LONG)10,                  /* X coordinate                        */
  11118.     (LONG)10,                  /* Y coordinate                        */
  11119.     (LONG)300,                 /* Window width                        */
  11120.     (LONG)200,                 /* Window height                       */
  11121.  
  11122.     ClientHwnd,                /* Owner window handle                 */
  11123.     HWND_TOP,                  /* Sibling window handle               */
  11124.     CONTAINER_ID,              /* Container window ID                 */
  11125.     NULL,                      /* No control data                     */
  11126.     NULL);                     /* No presentation parameters          */
  11127.  
  11128. /**********************************************************************/
  11129. /* Make the container control visible.                                */
  11130. /**********************************************************************/
  11131. WinShowWindow(
  11132.   hwndCnr,                     /* Container window handle             */
  11133.   TRUE);                       /* Make the window visible             */
  11134.  
  11135. The container is created with a default set of control data, which can be 
  11136. changed using the CM_SETCNRINFO message.  Refer to the OS/2 2.0 Programming 
  11137. Reference for a list of the default control data for the CNRINFO data 
  11138. structure. 
  11139.  
  11140.  
  11141. ΓòÉΓòÉΓòÉ 18.1.2.2. Understanding Container Items ΓòÉΓòÉΓòÉ
  11142.  
  11143. Container items can be anything that your application or a user might store in 
  11144. a container.  Examples are executable programs, word processing files, graphics 
  11145. images, and database records. 
  11146.  
  11147. Container item data is stored in RECORDCORE and MINIRECORDCORE data structures. 
  11148. Both the application and the container have access to the data stored in these 
  11149. records.  Refer to the OS/2 2.0 Programming Reference for more information 
  11150. about the RECORDCORE and MINIRECORDCORE data structures. 
  11151.  
  11152. The application is responsible for allocating memory for each record by using 
  11153. the CM_ALLOCRECORD message. See Allocating Memory for Container Records and 
  11154. Allocating Memory for Container Columns for more information. 
  11155.  
  11156. The maximum number of records is limited by the amount of memory in the user's 
  11157. computer.  The container control does not limit the number of records that a 
  11158. container can have. 
  11159.  
  11160. The following list shows which types of data can be displayed for each 
  11161. container view. See Understanding Container Views for descriptions of the 
  11162. container views. 
  11163.  
  11164. Types of Container Views for Displaying Types of Data 
  11165.  
  11166. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11167. ΓöéView Types     ΓöéData                                         Γöé
  11168. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11169. ΓöéIcon           ΓöéIcons or bit maps with text strings beneath. Γöé
  11170. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11171. ΓöéName           ΓöéIcons or bit maps with text strings to the   Γöé
  11172. Γöé               Γöéright.                                       Γöé
  11173. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11174. ΓöéText           ΓöéText strings.                                Γöé
  11175. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11176. ΓöéTree           ΓöéIcons or bit maps, and text strings.         Γöé
  11177. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11178. ΓöéDetails        ΓöéIcons or bit maps, text strings, numbers,    Γöé
  11179. Γöé               Γöétimes, and dates.                            Γöé
  11180. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11181.  
  11182.  
  11183. ΓòÉΓòÉΓòÉ 18.1.2.3. Allocating Memory for Container Records ΓòÉΓòÉΓòÉ
  11184.  
  11185. Your application is required to allocate memory for a container record by using 
  11186. the CM_ALLOCRECORD message, which also enables you to allocate memory for 
  11187. additional application data.  The sample code in the following figure shows how 
  11188. to allocate memory for one record. A pointer to the record is returned. 
  11189.  
  11190.  
  11191. Sample Code for Allocating Memory for Container Records
  11192.  
  11193. HWND        hwndCnr;           /* Container window handle             */
  11194. PRECORDCORE pRecord;           /* Pointer to RECORDCORE structure     */
  11195. ULONG       nRecords = 1;      /* 1 record to be allocated            */
  11196.  
  11197. pRecord =
  11198.   (PRECORDCORE)WinSendMsg(
  11199.     hwndCnr,                   /* Container window handle             */
  11200.     CM_ALLOCRECORD,            /* Message for allocating the record   */
  11201.     (MPARAM)NULL,              /* No additional memory                */
  11202.     (MPARAM)nRecords);         /* Number of records to be allocated   */
  11203.  
  11204. Your application also can use the CM_ALLOCRECORD message to allocate memory for 
  11205. more than one container record.  The application can request n container 
  11206. records with the nRecords parameter.  If n is greater than one, the pRecord 
  11207. parameter returns a pointer to the first record in a linked list of n records. 
  11208. Refer to the OS/2 2.0 Programming Reference for a description of the 
  11209. CM_ALLOCRECORD message and the RECORDCORE data structure. 
  11210.  
  11211.  
  11212. ΓòÉΓòÉΓòÉ 18.1.2.4. Allocating Memory for Container Columns ΓòÉΓòÉΓòÉ
  11213.  
  11214. In addition to allocating memory for records, an application also must allocate 
  11215. memory for columns of data if the details view is used.  In the details view, a 
  11216. container's data is displayed in columns, each of which is described in a 
  11217. FIELDINFO data structure. 
  11218.  
  11219. Memory is allocated for FIELDINFO data structures using the 
  11220. CM_ALLOCDETAILFIELDINFO message.  Unlike the CM_ALLOCRECORD message, the 
  11221. CM_ALLOCDETAILFIELDINFO message does not allow the application to allocate 
  11222. memory for additional application data.  However, the pUserData field of the 
  11223. FIELDINFO data structure can be used to store a pointer to the 
  11224. application-allocated data. 
  11225.  
  11226. Multiple FIELDINFO data structures can be allocated with the nFieldInfo 
  11227. parameter of the CM_ALLOCDETAILFIELDINFO message.  See Details View for a 
  11228. description of the details view.  Refer to the OS/2 2.0 Programming Reference 
  11229. for descriptions of the FIELDINFO data structure and the 
  11230. CM_ALLOCDETAILFIELDINFO message. 
  11231.  
  11232.  
  11233. ΓòÉΓòÉΓòÉ 18.1.3. Understanding Container Views ΓòÉΓòÉΓòÉ
  11234.  
  11235. When a user opens a container, the contents of that container are displayed in 
  11236. a window.  A container window can present various views of its contents.  Each 
  11237. view can provide different information about its container items.  The 
  11238. container control provides the following views: 
  11239.  
  11240. Views of a Container's Contents 
  11241.  
  11242. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11243. ΓöéType of View   ΓöéContents Displayed                           Γöé
  11244. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11245. ΓöéIcon view      ΓöéDisplays either icons or bit maps, with text Γöé
  11246. Γöé               Γöébeneath the icons or bit maps, to represent  Γöé
  11247. Γöé               Γöécontainer items.  These are called icon/text Γöé
  11248. Γöé               Γöéor bit-map/text pairs.  Each icon/text or    Γöé
  11249. Γöé               Γöébit-map/text pair represents one container   Γöé
  11250. Γöé               Γöéitem.  This is the default view.  See Icon   Γöé
  11251. Γöé               ΓöéView for a description of the icon view.     Γöé
  11252. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11253. ΓöéName view      ΓöéDisplays either icons or bit maps, with text Γöé
  11254. Γöé               Γöéto the right of the icons or bit maps, to    Γöé
  11255. Γöé               Γöérepresent container items.  These are called Γöé
  11256. Γöé               Γöéicon/text or bit-map/text pairs.  Each       Γöé
  11257. Γöé               Γöéicon/text or bit-map/text pair represents oneΓöé
  11258. Γöé               Γöécontainer item.  See Name View for a         Γöé
  11259. Γöé               Γöédescription of the name view.                Γöé
  11260. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11261. ΓöéText view      ΓöéDisplays a simple text list to represent     Γöé
  11262. Γöé               Γöécontainer items.  See Text View for a        Γöé
  11263. Γöé               Γöédescription of the text view.                Γöé
  11264. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11265. ΓöéTree view      ΓöéDisplays a hierarchical view of the containerΓöé
  11266. Γöé               Γöéitems.  Three types of tree views are        Γöé
  11267. Γöé               Γöéavailable: tree text, tree icon, and tree    Γöé
  11268. Γöé               Γöéname.  See Tree View for a description of theΓöé
  11269. Γöé               Γöétree view.                                   Γöé
  11270. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11271. ΓöéDetails view   ΓöéDisplays detailed information about each     Γöé
  11272. Γöé               Γöécontainer item.  The same type of data is    Γöé
  11273. Γöé               Γöédisplayed for each container item, arranged  Γöé
  11274. Γöé               Γöéin columns.  The data in each column can     Γöé
  11275. Γöé               Γöéconsist of an icon or bit map, text, numbers,Γöé
  11276. Γöé               Γöédates, or times.  See Details View for a     Γöé
  11277. Γöé               Γöédescription of the details view.             Γöé
  11278. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11279.  
  11280. The container control does not support both icons and bit maps in the same 
  11281. view.  To specify whether icons or bit maps are used, an application can set 
  11282. either the CA_DRAWICON attribute or CA_DRAWBITMAP attribute, respectively, in 
  11283. the flWindowAttr field.  The default is the CA_DRAWICON attribute.  The size of 
  11284. the icon or bit map can be specified in the slBitmapOrIcon field.  flWindowAttr 
  11285. and slBitmapOrIcon are fields of the CNRINFO data structure.  Refer to the OS/2 
  11286. 2.0 Programming Reference for a description of the CNRINFO data structure. 
  11287.  
  11288. If a text string is not specified for a view in a place where a text string 
  11289. could be used, a blank space is used as a placeholder.  For example, if a text 
  11290. string is not placed beneath an icon in the icon view, a blank space is 
  11291. inserted just as though the text string was there.  If this blank space is not 
  11292. a read-only field, the user can put text in the space by editing it directly. 
  11293. See Direct Editing of Text in a Container for more information about editing 
  11294. text directly in a container control. 
  11295.  
  11296.  
  11297. ΓòÉΓòÉΓòÉ 18.1.4. Icon View ΓòÉΓòÉΓòÉ
  11298.  
  11299. The icon view (CV_ICON attribute) displays icon/text pairs or bit-map/text 
  11300. pairs to represent container items; this is the default.  CV_ICON is an 
  11301. attribute of the CNRINFO data structure's flWindowAttr field. 
  11302.  
  11303. In the icon view, icon/text pairs and bit-map/text pairs are icons and bit 
  11304. maps, respectively, with one or more lines of text displayed below each icon or 
  11305. bit map.  Each line can contain one or more text characters, which are centered 
  11306. below the icon or bit map.  The container control does not limit the number of 
  11307. lines or the number of characters in each line. 
  11308.  
  11309. Generally, the icon or bit map contains an image that depicts the type of 
  11310. container item that it represents.  For example, an icon or bit map that 
  11311. represents a bar chart might contain an image of a bar chart. 
  11312.  
  11313. In the icon view, container items are positioned according to x- and 
  11314. y-coordinate positions.  These are called workspace coordinates.  You can 
  11315. supply these coordinates for each container item by using the ptlIcon field of 
  11316. the RECORDCORE data structure.  See Positioning Container Items for information 
  11317. about using workspace coordinates to position container items.  Refer to the 
  11318. OS/2 2.0 Programming Reference for a description of the RECORDCORE data 
  11319. structure. The following figure provides an example of the icon view with 
  11320. various x- and y-coordinates specified in the ptlIcon field. 
  11321.  
  11322. Icon View with Items Positioned at Workspace Coordinates 
  11323.  
  11324. If you do not specify x- and y-coordinate positions, the container control 
  11325. positions the icons or bit maps at (0,0).  However, your application can 
  11326. arrange the icons or bit maps either by sending the CM_ARRANGE message or by 
  11327. setting the CCS_AUTOPOSITION style bit when creating a container.  With both of 
  11328. these methods, the container items are arranged in rows, and any coordinates 
  11329. specified in the ptlIcon field are ignored. 
  11330.  
  11331. The container items fill the topmost row until the width of the work area is 
  11332. reached.  The container items then wrap to form another row immediately below 
  11333. the filled row.  This process is repeated until all the container items are 
  11334. positioned in rows.  Default spacing is implemented according to the guidelines 
  11335. for the CUA user interface. The following figure shows an example of the 
  11336. container after the CM_ARRANGE message was sent, or if the container was 
  11337. created with the CCS_AUTOPOSITION style bit set. 
  11338.  
  11339. Icon View When Items Are Arranged or Automatically Positioned 
  11340.  
  11341. If the CCS_AUTOPOSITION style bit is set and the container is displaying the 
  11342. icon view, container items are arranged automatically without the CM_ARRANGE 
  11343. message being sent when: 
  11344.  
  11345. o The window size changes 
  11346. o Container items are inserted, removed, sorted, invalidated, or filtered 
  11347. o The font or font size changes. 
  11348.  
  11349. In all of these cases, container items are arranged the same as when the 
  11350. CM_ARRANGE message is sent.  The CCS_AUTOPOSITION style bit is valid only when 
  11351. it is used with the icon view. 
  11352.  
  11353. If the CM_ARRANGE message is issued and the container control is not currently 
  11354. displaying the icon view, the container items are still arranged logically. 
  11355. Nothing changes in the current view; the arrangement of the container items is 
  11356. not visible until the user switches to the icon view. 
  11357.  
  11358.  
  11359. ΓòÉΓòÉΓòÉ 18.1.5. Name View ΓòÉΓòÉΓòÉ
  11360.  
  11361. The name view (CV_NAME attribute) displays icon/text or bit-map/text pairs to 
  11362. represent container items.  CV_NAME is an attribute of the CNRINFO data 
  11363. structure's flWindowAttr field. 
  11364.  
  11365. In the name view, icon/text pairs and bit-map/text pairs are icons and bit 
  11366. maps, respectively, with one or more lines of text displayed to the right of 
  11367. each icon or bit map.  Each line can contain one or more text characters, which 
  11368. are left-justified.  The container control does not limit the number of lines 
  11369. or the number of characters in each line. 
  11370.  
  11371. The container control offers the option of flowing or not flowing the container 
  11372. items in the name view.  To flow container items means to dynamically arrange 
  11373. them in columns. 
  11374.  
  11375.  
  11376. ΓòÉΓòÉΓòÉ 18.1.5.1. Non-Flowed Name View ΓòÉΓòÉΓòÉ
  11377.  
  11378. If the container items are not flowed, the icon/text or bit-map/text pairs are 
  11379. placed in a single column in the leftmost portion of the work area, as in the 
  11380. following figure. 
  11381.  
  11382. Non-Flowed Name View 
  11383.  
  11384.  
  11385. ΓòÉΓòÉΓòÉ 18.1.5.2. Flowed Name View ΓòÉΓòÉΓòÉ
  11386.  
  11387. If the container items are flowed (CV_NAME | CV_FLOW), the container appears, 
  11388. as shown in the following figure. In this case, the container items fill the 
  11389. leftmost column until the depth of the work area is reached.  The container 
  11390. items then wrap to form another column immediately to the right of the filled 
  11391. column.  This process is repeated until all of the container items are 
  11392. positioned in columns. 
  11393.  
  11394. The width of each column is determined by the widest text string within the 
  11395. column.  The depth of the work area is determined by the size of the window. 
  11396.  
  11397. Flowed Name View 
  11398.  
  11399.  
  11400. ΓòÉΓòÉΓòÉ 18.1.6. Text View ΓòÉΓòÉΓòÉ
  11401.  
  11402. The text view (CV_TEXT attribute) displays one or more lines of text to 
  11403. represent container items.  CV_TEXT is an attribute of the CNRINFO data 
  11404. structure's flWindowAttr field. 
  11405.  
  11406. Each line can contain one or more text characters, which are left-justified. 
  11407. The container control does not limit the number of lines or the number of 
  11408. characters in each line. 
  11409.  
  11410. The container control offers the option of flowing or not flowing the container 
  11411. items in the text view. 
  11412.  
  11413.  
  11414. ΓòÉΓòÉΓòÉ 18.1.6.1. Non-Flowed Text View ΓòÉΓòÉΓòÉ
  11415.  
  11416. If the text strings are not flowed, the text for each container item is placed 
  11417. in a single column in the leftmost portion of the work area, as shown in the 
  11418. following figure. 
  11419.  
  11420. Non-Flowed Text View 
  11421.  
  11422.  
  11423. ΓòÉΓòÉΓòÉ 18.1.6.2. Flowed Text View ΓòÉΓòÉΓòÉ
  11424.  
  11425. If the text strings are flowed (CV_TEXT | CV_FLOW), the container appears as 
  11426. shown in the following figure. In this case, the text strings fill the leftmost 
  11427. column until the depth of the work area is reached. The text strings then wrap 
  11428. to form another column immediately to the right of the filled column. This 
  11429. process is repeated until all the text strings are positioned in columns. 
  11430.  
  11431. The width of each column is determined by the widest text string within the 
  11432. column.  The depth of the work area is determined by the size of the window. 
  11433.  
  11434. Flowed Text View 
  11435.  
  11436.  
  11437. ΓòÉΓòÉΓòÉ 18.1.7. Tree View ΓòÉΓòÉΓòÉ
  11438.  
  11439. The tree view (CV_TREE attribute) displays container items arranged 
  11440. hierarchically.  CV_TREE is an attribute of the CNRINFO data structure's 
  11441. flWindowAttr field. 
  11442.  
  11443. The leftmost items displayed in the tree view are at the root level and are the 
  11444. same items displayed in all the other container views.  Items that contain 
  11445. other items are called parent items.  The item or items that a parent item 
  11446. contains are called child items and can be displayed only in the tree view. 
  11447. Child items that contain other items serve a dual role: they are the children 
  11448. of their parent item, but they are parent items as well, with children of their 
  11449. own.  For example, a parent item might be a book that contains individual child 
  11450. items for its chapters, or a folder that contains several reports.  The 
  11451. chapters or reports, in turn, could be parent items that contain their own 
  11452. children, such as the major sections of a chapter or report. 
  11453.  
  11454. If the child item or items of a parent item are not displayed, the parent item 
  11455. can be expanded to display them as a new branch in the tree view.  Once a 
  11456. parent item has been expanded, it can be collapsed to remove its child items 
  11457. from the display. 
  11458.  
  11459. You can use the cxTreeIndent and cxTreeLine fields of the CNRINFO data 
  11460. structure to specify the number of pels that a new branch is to be indented 
  11461. horizontally, and the width of the lines that are used to connect branches of 
  11462. the tree.  These lines are displayed only if the CA_TREELINE attribute is 
  11463. specified in the flWindowAttr field. 
  11464.  
  11465. The tree view has three different types: tree icon view, tree text view, and 
  11466. tree name view. The following figure uses the tree icon view to provide 
  11467. examples of root level, parent, and child items that were defined in this 
  11468. section. The expanded and collapsed bit maps shown in this figure are defined 
  11469. in the following section. 
  11470.  
  11471. Sample Tree View Showing Root Level, Parent, and Child Items 
  11472.  
  11473.  
  11474. ΓòÉΓòÉΓòÉ 18.1.7.1. Tree Icon View and Tree Text View ΓòÉΓòÉΓòÉ
  11475.  
  11476. The tree icon and tree text views are identical in every aspect except one: 
  11477. their appearance on the screen.  Container items in the tree icon view 
  11478. (CV_TREE | CV_ICON) are displayed as either icon/text pairs or bit-map/text 
  11479. pairs.  The items are drawn as icons or bit maps with one or more lines of text 
  11480. displayed to the right of each icon or bit map. The following figure provides 
  11481. an example of a tree icon view that uses the default expanded and collapsed bit 
  11482. maps. 
  11483.  
  11484. Tree Icon View 
  11485.  
  11486. Container items in the tree text view (CV_TREE | CV_TEXT) are displayed as text 
  11487. strings.  In both views, the container control does not limit the number of 
  11488. lines of text or the number of characters in each line. The following figure 
  11489. provides an example of the tree text view, again showing the default expanded 
  11490. and collapsed bit maps. 
  11491.  
  11492. Tree Text View 
  11493.  
  11494. In the tree icon and tree text views, a parent item is expanded by selecting 
  11495. the collapsed icon/bit map, which is displayed to the left of the parent item. 
  11496.  
  11497. The collapsed icon/bit map should contain some visible indication that the item 
  11498. can be expanded.  The default collapsed bit map that is provided by the 
  11499. container control uses a plus sign (+) to indicate that more items, the 
  11500. children of this parent, can be added to the view. 
  11501.  
  11502. When the child items of a parent item are displayed, the collapsed icon/bit map 
  11503. to the left of that parent item changes to an expanded icon/bit map.  Just as 
  11504. the collapsed icon/bit map provides a visible indication that an item can be 
  11505. expanded, so should the expanded icon/bit map indicate that an item can be 
  11506. collapsed.  The default expanded bit map provided by the container control uses 
  11507. a minus sign (-) to indicate that the child items of this parent can be 
  11508. subtracted from the view.  If any of the child items have children of their 
  11509. own, a collapsed or expanded icon/bit map is displayed to their immediate left 
  11510. as well. 
  11511.  
  11512. To display your own collapsed and expanded icons or bit maps, specify their 
  11513. handles by using the hptrCollapsed and hptrExpanded fields of the CNRINFO data 
  11514. structure for icons, and the hbmCollapsed and hbmExpanded fields for bit maps. 
  11515. Also, you can use the slTreeBitmapOrIcon field to specify the size, in pels, of 
  11516. these collapsed and expanded icons and bit maps.  Refer to the description of 
  11517. the CNRINFO data structure in the OS/2 2.0 Programming Reference for more 
  11518. information. 
  11519.  
  11520.  
  11521. ΓòÉΓòÉΓòÉ 18.1.8. Tree Name View ΓòÉΓòÉΓòÉ
  11522.  
  11523. Container items in the tree name view (CV_TREE | CV_NAME) are displayed as 
  11524. either icon/text pairs or bit-map/text pairs.  Similar to the tree icon view, 
  11525. the items are drawn as icons or bit maps with one or more lines of text 
  11526. displayed to the right of each icon or bit map.  The container control does not 
  11527. limit the number of lines or the number of characters in each line of text. 
  11528.  
  11529. Unlike the tree icon view, however, separate collapsed and expanded icons/bit 
  11530. maps are not used.  Instead, if an item is a parent, the icon or bit map that 
  11531. represents that item contains the same type of visible indication that is 
  11532. placed in a separate icon/bit map in the tree icon view to show that an item 
  11533. can be collapsed or expanded.  In this way, the icon or bit map that represents 
  11534. the parent item can serve a dual purpose, and thus preserve space on the 
  11535. screen, an important consideration if the text strings used to describe items 
  11536. become too long. 
  11537.  
  11538. The container control does not provide default icons or bit maps for the tree 
  11539. name view.  To display your own collapsed and expanded icons or bit maps, 
  11540. specify their handles using the hptrCollapsed and hptrExpanded fields of the 
  11541. TREEITEMDESC data structure for icons, and the hbmCollapsed and hbmExpanded 
  11542. fields for bit maps.  Also, you can use the slBitmapOrIcon field of the CNRINFO 
  11543. data structure to specify the size, in pels, of these collapsed and expanded 
  11544. icons and bit maps. Refer to the description of the TREEITEMDESC and CNRINFO 
  11545. data structures in the OS/2 2.0 Programming Reference for more information 
  11546. about these data structures and the following figure for an example of the tree 
  11547. name view. 
  11548.  
  11549. Tree Name View 
  11550.  
  11551.  
  11552. ΓòÉΓòÉΓòÉ 18.1.9. Details View ΓòÉΓòÉΓòÉ
  11553.  
  11554. The details view (CV_DETAIL attribute) of the container control can display the 
  11555. following data types to represent container items:  icons or bit maps, text, 
  11556. numbers, dates, and times.  CV_DETAIL is an attribute of the CNRINFO data 
  11557. structure's flWindowAttr field. 
  11558.  
  11559. The data is arranged in columns, which can have headings.  Each column can 
  11560. contain data that belongs to only one of the valid data types.  Column headings 
  11561. can contain text, icons, or bit maps. 
  11562.  
  11563. The width of each column can be explicitly specified in the cxWidth field of 
  11564. the FIELDINFO data structure.  If a column width is not specified, it is 
  11565. determined by the widest entry in the column.  Refer to the OS/2 2.0 
  11566. Programming Reference for a description of the FIELDINFO data structure. 
  11567.  
  11568. Columns can be inserted or removed dynamically.  All of the columns in a given 
  11569. row represent a single container item; selecting the data portion of a row 
  11570. selects the entire row, not just the individual column. 
  11571.  
  11572. Details view column headings and data can be top- or bottom-justified or 
  11573. vertically centered, as well as left- or right-justified or horizontally 
  11574. centered.  In addition, horizontal separator lines can be specified between the 
  11575. column headings and the data; vertical separator lines can be placed between 
  11576. columns. In the example in the following figure, Container Items, the icon, 
  11577. Description, and Item Size are the column headings. 
  11578.  
  11579. Ownerdraw is supported for each column. 
  11580.  
  11581. Details View See Drawing Container Items and Painting Backgrounds for more 
  11582. information about ownerdraw. 
  11583.  
  11584. Split Bar Support for the Details View 
  11585. A split bar enables the application to split the container window vertically 
  11586. between two column boundaries.  This function is available only in the details 
  11587. view. 
  11588.  
  11589. The two portions of the work area on either side of the split bar appear 
  11590. side-by-side.  They scroll in unison vertically, but they scroll independently 
  11591. horizontally. 
  11592.  
  11593. The application is responsible for specifying the position of the split bar, 
  11594. which is defined with the xVertSplitbar field.  Also, the rightmost column of 
  11595. the left split window is specified with the pFieldInfoLast field. 
  11596. xVertSplitbar and pFieldInfoLast are fields of the CNRINFO data structure. 
  11597. Refer to the OS/2 2.0 Programming Reference for a description of the CNRINFO 
  11598. data structure. 
  11599.  
  11600. The left split window cannot be empty if there is data in the right window. 
  11601. The right split window is not required to have data.  However, because data 
  11602. cannot be scrolled from the right split window into the left split window, or 
  11603. from left to right, the split bar loses much of its usefulness if the right 
  11604. split window is empty. 
  11605.  
  11606. The user can drag the vertical split bar within the limits of the window.  As 
  11607. the user drags the split bar to the left, the right split window becomes wider; 
  11608. and as the split bar is dragged to the right, the left split window becomes 
  11609. wider. 
  11610.  
  11611. Each container control can have one vertical split bar.  Horizontal split bars 
  11612. are not supported. 
  11613.  
  11614. The following figure shows a split bar between the Description column and the 
  11615. Date Created column. 
  11616.  
  11617. Details View with Split Bar 
  11618.  
  11619.  
  11620. ΓòÉΓòÉΓòÉ 18.1.10. Changing a Container View ΓòÉΓòÉΓòÉ
  11621.  
  11622. The sample code in the following figure shows how to use the CM_SETCNRINFO 
  11623. message to change from the current view of a container (name, details, or text) 
  11624. to the icon view. 
  11625.  
  11626.  
  11627. Sample Code for Changing a Container View
  11628.  
  11629. CNRINFO cnrInfo;
  11630.  
  11631. /**********************************************************************/
  11632. /* Set the attribute field to the icon view.                          */
  11633. /**********************************************************************/
  11634. cnrInfo.flWindowAttr = CV_ICON;
  11635.  
  11636. /**********************************************************************/
  11637. /* Change the view from the current view to the icon view.            */
  11638. /**********************************************************************/
  11639. WinSendMsg(
  11640.   hwndCnr,                     /* Container window handle             */
  11641.   CM_SETCNRINFO,               /* Container message for setting       */
  11642.   MPFROMP(&cnrInfo),           /* Container control data              */
  11643.   MPFROMLONG(
  11644.     CMA_FLWINDOWATTR));        /* Message attribute that sets         */
  11645.                                /* container window attributes         */
  11646.  
  11647. Refer to the OS/2 2.0 Programming Reference for a complete description of the 
  11648. CM_SETCNRINFO message. 
  11649.  
  11650.  
  11651. ΓòÉΓòÉΓòÉ 18.2. Using a Container ΓòÉΓòÉΓòÉ
  11652.  
  11653. You need the following information to use a container control in your 
  11654. application after it is created: 
  11655.  
  11656. o Inserting container records 
  11657. o Removing container records 
  11658. o Setting the container control focus. 
  11659.  
  11660.  
  11661. ΓòÉΓòÉΓòÉ 18.2.1. Inserting Container Records ΓòÉΓòÉΓòÉ
  11662.  
  11663. After the memory is allocated, you can insert one or more container records by 
  11664. using the CM_INSERTRECORD message.  This message enables you to provide two 
  11665. pointers.  The first pointer points to the record or records that are to be 
  11666. inserted, which is specified in the pRecord parameter.  When you are inserting 
  11667. multiple records, use this parameter to specify a pointer to a linked list of 
  11668. records. 
  11669.  
  11670. The second pointer points to a RECORDINSERT data structure, which specifies 
  11671. information the container needs for inserting records. 
  11672.  
  11673. One of the elements of information that this data structure contains is the 
  11674. order in which the record or records are to be inserted, which is specified in 
  11675. the pRecordOrder field. In this field you have two options.  The first option 
  11676. is to specify a pointer to a container record.  The record or records being 
  11677. inserted will be placed immediately after that record.  In this case, the 
  11678. pRecordParent field is ignored. 
  11679.  
  11680. The second option is to specify whether the record or records being inserted 
  11681. are to be placed at the beginning or end of a list of records.  This is done by 
  11682. specifying either the CMA_FIRST or CMA_END attributes, respectively.  If you 
  11683. choose this option, the list of records used depends on the value of the 
  11684. pRecordParent field. 
  11685.  
  11686. If CMA_FIRST or CMA_END is specified and the value of the pRecordParent field 
  11687. is NULL, the inserted record or records are placed at the beginning or end, 
  11688. respectively, of the root level records.  However, if CMA_FIRST or CMA_END is 
  11689. specified and pRecordParent contains a pointer to a parent item record, the 
  11690. records are inserted at the beginning or end, respectively, of the list of 
  11691. child item records that this parent record contains.  See Tree View for more 
  11692. information about root level, parent, and child items. 
  11693.  
  11694. The RECORDINSERT structure also lets you specify the z-order position of the 
  11695. record or records being inserted.  The CMA_TOP and CMA_BOTTOM attributes of the 
  11696. zOrder field place the record at the top or bottom, respectively, relative to 
  11697. the other records in the z-order list.  This field applies to the icon view 
  11698. only. 
  11699.  
  11700. To specify the number of records that are being inserted, use the 
  11701. cRecordsInsert field.  The value of this field must be greater than 0. 
  11702.  
  11703. The last field in the RECORDINSERT structure is flInvalidateRecord, which 
  11704. enables you to control whether the record or records are displayed 
  11705. automatically when they are inserted.  If you specify TRUE in this field, the 
  11706. display is updated automatically.  However, if you specify FALSE, the 
  11707. application must send the CM_INVALIDATERECORD message after the record or 
  11708. records are inserted to update the display. 
  11709.  
  11710. Where items are positioned in a container depends on the view the user has 
  11711. specified.  If the icon view is specified and the CCS_AUTOPOSITION style bit is 
  11712. not set, the x- and y-coordinates for each record, which are stored in the 
  11713. ptlIcon field of the RECORDCORE and MINIRECORDCORE data structures, determine 
  11714. its position.  Records displayed in the name view, text view, tree view, and 
  11715. details view are positioned as previously described in this section. 
  11716.  
  11717. Note:  Records inserted into a list of child record items can be displayed in 
  11718.        the tree view only.  These records will be visible only if the parent 
  11719.        record item to which these child record items belong is expanded. 
  11720.  
  11721. The following figure provides sample code that inserts a record into a 
  11722. container. 
  11723.  
  11724.  
  11725. SampleCodeforInsertingaRecordintoaContainer
  11726.  
  11727. typedef struct _USERRECORD {
  11728.    RECORDCORE   RecordCore;     /* RECORDCORE structure               */
  11729.    PSZ          pszFile;        /* Text string for the details view   */
  11730.                                 /* column                             */
  11731.    CDATE        Date;           /* Date for details view column       */
  11732. }  USERRECORD, *PUSERRECORD;    /* User-defined record declaration    */
  11733.  
  11734. HWND             hwndCnr;       /* Container window handle            */
  11735. PUSERRECORD      pUserRecord;   /* Pointer to user-defined data       */
  11736.                                 /* structure                          */
  11737. ULONG            nRecords = 1;  /* Number of records                  */
  11738. ULONG            cbRecordData;  /* Number of bytes of additional      */
  11739.                                 /* memory                             */
  11740. RECORDINSERT     recordInsert;  /* RECORDINSERT structure             */
  11741. HPS              hps;           /* Handle to a presentation space     */
  11742. HMODULE          hmodIcons;     /* Module handle for resources        */
  11743.  
  11744. hps = WinGetPS (hwndCnr);
  11745. DosLoadModule ("Container Tester", 16, "ICONS", &hmodIcons);
  11746.  
  11747. /**********************************************************************/
  11748. /* Allocate memory for USERRECORD                                     */
  11749. /**********************************************************************/
  11750. cbRecordData = (ULONG)(sizeof(USERRECORD) - sizeof(RECORDCORE));
  11751.  
  11752. pUserRecord = (PUSERRECORD)WinSendMsg(
  11753.                hwndCnr,
  11754.                CM_ALLOCRECORD,
  11755.                MPFROMLONG(cbRecordData),
  11756.                (MPARAM)nRecords);
  11757.  
  11758. /**********************************************************************/
  11759. /* Allocate memory for text strings, as application requires.         */
  11760. /**********************************************************************/
  11761.  
  11762. /**********************************************************************/
  11763. /* Initialize text strings.                                           */
  11764. /**********************************************************************/
  11765. strcpy  (pUserRecord->RecordCore.pszText, "Text View");
  11766. strcpy  (pUserRecord->RecordCore.pszName, "Name View");
  11767. strcpy  (pUserRecord->RecordCore.pszIcon, "Icon View");
  11768. strcpy  (pUserRecord->RecordCore.pszTree, "Tree View");
  11769. strcpy  (pUserRecord->pszFile, "File Name");
  11770.  
  11771. /**********************************************************************/
  11772. /* Initialize date.                                                   */
  11773. /**********************************************************************/
  11774. pUserRecord->Date.day = 5;
  11775. pUserRecord->Date.month = 2;
  11776. pUserRecord->Date.year = 91;
  11777.  
  11778. /**********************************************************************/
  11779. /* Initialize attributes, icon, and bit-map pointers.                 */
  11780. /**********************************************************************/
  11781. pUserRecord->RecordCore.hptrIcon = WinLoadPointer(HWND_DESKTOP,
  11782.                                                   hmodIcons,
  11783.                                                   5000);
  11784.  
  11785. pUserRecord->RecordCore.hbmBitmap = GpiLoadBitmap(hps,
  11786.                                                   hmodIcons,
  11787.                                                   8000,
  11788.                                                   0L, 0L);
  11789.  
  11790. /**********************************************************************/
  11791. /* Initialize the record position for the icon view.                  */
  11792. /**********************************************************************/
  11793. pUserRecord->RecordCore.ptlIcon.x = 100;
  11794. pUserRecord->RecordCore.ptlIcon.y = 200;
  11795.  
  11796. /**********************************************************************/
  11797. /* Initialize CM_INSERTRECORD data structure.                         */
  11798. /**********************************************************************/
  11799. recordInsert.pRecordOrder = (PRECORDCORE)CMA_FIRST;
  11800. recordInsert.zOrder = (ULONG)CMA_TOP;
  11801. recordInsert.cRecordsInsert = nRecords;
  11802. recordInsert.fInvalidateRecord = TRUE;
  11803. recordInsert.pRecordParent = NULL;
  11804.  
  11805. /**********************************************************************/
  11806. /* Insert record.                                                     */
  11807. /**********************************************************************/
  11808. WinSendMsg(hwndCnr,
  11809.            CM_INSERTRECORD,
  11810.            MPFROMP(pUserRecord),
  11811.            MPFROMP(&recordInsert));
  11812.  
  11813. /**********************************************************************/
  11814. /* Clean up.                                                          */
  11815. /**********************************************************************/
  11816. DosFreeModule(hmodIcons);
  11817. WinReleasePS(hps);
  11818.  
  11819.  
  11820. ΓòÉΓòÉΓòÉ 18.2.2. Removing Container Records ΓòÉΓòÉΓòÉ
  11821.  
  11822. The CM_REMOVERECORD message can be used to remove one or more container records 
  11823. from the container control.  The application must set the pointers to each 
  11824. record in an array to be removed. 
  11825.  
  11826. If the fRemoveRecord parameter of this message includes the CMA_FREE attribute, 
  11827. the records are removed and the memory is freed.  If this attribute is not set, 
  11828. the records are removed from the list of items in the container, and the 
  11829. application must use the CM_FREERECORD message to free the memory.  The default 
  11830. is to not free the memory. 
  11831.  
  11832. If the fRemoveRecord parameter includes the CMA_INVALIDATERECORD attribute, the 
  11833. container is invalidated after the records are removed.  The default is to not 
  11834. invalidate the container.  The CMA_INVALIDATERECORD attribute can be used with 
  11835. the CMA_FREE attribute, separated by a logical OR operator (|), to free the 
  11836. record's memory and invalidate the container. 
  11837.  
  11838. The sample code in the following figure removes all records from a container 
  11839. and frees the memory associated with those records.  It is the application's 
  11840. responsibility to free all application-allocated memory that is associated with 
  11841. the removed container records.  The container is invalidated and repainted. 
  11842.  
  11843.  
  11844. Sample Code for Removing Container Records
  11845.  
  11846. USHORT cNumRecord;             /* Number of records to be removed     */
  11847. USHORT fRemoveRecord;          /* Container message attributes        */
  11848.  
  11849. /**********************************************************************/
  11850. /* Zero means remove all records.                                     */
  11851. /**********************************************************************/
  11852. cNumRecord = 0;
  11853.  
  11854. /**********************************************************************/
  11855. /* Specify attributes to invalidate the container and free the memory */
  11856. /**********************************************************************/
  11857. fRemoveRecord =
  11858.   CMA_INVALIDATERECORD | CMA_FREE;
  11859.  
  11860. /**********************************************************************/
  11861. /* Remove the records.                                                */
  11862. /**********************************************************************/
  11863. WinSendMsg(hwndCnr,            /* Container window handle             */
  11864.   CM_REMOVERECORD,             /* Container message for removing      */
  11865.                                /* records                             */
  11866.   NULL,                        /* NULL PRECORDARRAY                   */
  11867.   MPFROM2SHORT(
  11868.     cNumRecord,                /* Number of records                   */
  11869.     fRemoveRecord));           /* Memory invalidation flags           */
  11870.  
  11871.  
  11872. ΓòÉΓòÉΓòÉ 18.2.3. Setting the Container Control Focus ΓòÉΓòÉΓòÉ
  11873.  
  11874. The application must set the focus of the container control by using the 
  11875. WinSetFocus function. 
  11876.  
  11877.  
  11878. ΓòÉΓòÉΓòÉ 18.3. Graphical User Interface Support ΓòÉΓòÉΓòÉ
  11879.  
  11880. The following describes the container control support for graphical user 
  11881. interfaces (GUIs).  Except where noted, this support conforms to the guidelines 
  11882. in the SAA CUA Advanced Interface Design Reference.  The GUI support provided 
  11883. by the container control consists of: 
  11884.  
  11885. o Scrolling 
  11886. o Selecting container items 
  11887. o Providing emphasis 
  11888. o Using direct manipulation 
  11889. o Specifying space between container items. 
  11890.  
  11891.  
  11892. ΓòÉΓòÉΓòÉ 18.3.1. Scrolling ΓòÉΓòÉΓòÉ
  11893.  
  11894. The container control automatically provides horizontal or vertical scroll 
  11895. bars, or both, whenever all or part of one or more container items are not 
  11896. visible in a container window's work area. 
  11897.  
  11898. If all container items are visible in the work area, the scroll bars are either 
  11899. removed or disabled, depending on the view and how the items are positioned, as 
  11900. follows: 
  11901.  
  11902. o If container items are displayed in the icon or tree view, and one or more 
  11903.   items are not visible in the work area, a horizontal scroll bar, vertical 
  11904.   scroll bar, or both, are provided, depending on the position of the items 
  11905.   outside of the work area.  If container items are positioned to the right or 
  11906.   left of the work area, a horizontal scroll bar is provided; if container 
  11907.   items are positioned below or above the work area, a vertical scroll bar is 
  11908.   provided. 
  11909.  
  11910.   Scroll bars are not provided if all the container items are visible in the 
  11911.   work area.  Scroll bars are removed from the container window if either of 
  11912.   the following occurs: 
  11913.  
  11914.    - Container items positioned outside the work area are moved into the work 
  11915.      area 
  11916.  
  11917.    - The size of the container window is increased so that container items 
  11918.      formerly not visible become visible. 
  11919.  
  11920. o If container items are displayed in non-flowed text and non-flowed name 
  11921.   views, a vertical scroll bar is provided; this scroll bar is disabled if all 
  11922.   the container items are visible in the work area.  A horizontal scroll bar is 
  11923.   used in these views only when the work area is too narrow to allow the widest 
  11924.   container item to be seen in its entirety.  If the user changes the window 
  11925.   size to allow the entire widest container item to be seen, the horizontal 
  11926.   scroll bar is removed. 
  11927.  
  11928. o If container items are displayed in flowed text and flowed name views, a 
  11929.   horizontal scroll bar is provided; this scroll bar is disabled if all the 
  11930.   container items are visible in the work area.  A vertical scroll bar is used 
  11931.   in these views only when the work area is too short to allow the tallest 
  11932.   container item to be seen in its entirety.  If the user changes the window 
  11933.   size to allow the entire tallest container item or items to be seen, the 
  11934.   vertical scroll bar is removed. 
  11935.  
  11936. o If container items are displayed in the details view, both horizontal and 
  11937.   vertical scroll bars are provided.  These scroll bars are disabled if all the 
  11938.   container items are visible in the work area. 
  11939.  
  11940.   Note:  A details view that is split has two horizontal scroll bars, one for 
  11941.          each portion of the split window. 
  11942.  
  11943.  
  11944. ΓòÉΓòÉΓòÉ 18.3.2. Dynamic Scrolling ΓòÉΓòÉΓòÉ
  11945.  
  11946. The container control supports dynamic scrolling, which enables the user to 
  11947. drag the scroll box in the scroll bar and get immediate visible feedback on 
  11948. where the scrolling will stop when the scroll box is dropped.  If the scrolling 
  11949. range is greater than 32KB pels, dynamic scrolling is disabled. 
  11950.  
  11951.  
  11952. ΓòÉΓòÉΓòÉ 18.3.3. Selecting Container Items ΓòÉΓòÉΓòÉ
  11953.  
  11954. Except during direct manipulation and direct editing of text in a container, a 
  11955. user must select a container item before performing an action on it.  The 
  11956. container control provides several selection types, along with selection 
  11957. techniques to implement those types.  The container control also supports two 
  11958. selection mechanisms: any pointing device, such as a mouse, and the keyboard. 
  11959.  
  11960.  
  11961. ΓòÉΓòÉΓòÉ 18.3.3.1. Selection Types ΓòÉΓòÉΓòÉ
  11962.  
  11963. The container control supports the following selection types: 
  11964.  
  11965. o Single selection 
  11966.  
  11967.   Single selection enables a user to select only one container item at a time. 
  11968.   This is the default selection type for all views and is the only selection 
  11969.   type supported for the tree view. 
  11970.  
  11971. o Extended selection 
  11972.  
  11973.   Extended selection enables a user to select one or more container items, in 
  11974.   any combination.  The CUA-defined keyboard augmentation keys are implemented 
  11975.   for extended selection.  When used with a pointing device, these keys enable 
  11976.   a user to select discontiguous sets of container items.  Extended selection 
  11977.   is valid for all views except the tree view. 
  11978.  
  11979. o Multiple selection 
  11980.  
  11981.   Multiple selection enables a user to select none, some, or all of the 
  11982.   container items.  Multiple selection is valid for all views except the tree 
  11983.   view. 
  11984.  
  11985. Only one of these selection types can be used for each container.  The 
  11986. selection type for a container is defined when the container is created. 
  11987.  
  11988. These selection types conform to the guidelines in the SAA CUA Advanced 
  11989. Interface Design Reference.  Refer to that book for detailed information. 
  11990.  
  11991.  
  11992. ΓòÉΓòÉΓòÉ 18.3.3.2. Selection Techniques ΓòÉΓòÉΓòÉ
  11993.  
  11994. Depending on the type of view and the type of selection, a user can select 
  11995. container items using the following selection techniques: 
  11996.  
  11997. o Marquee selection 
  11998.  
  11999.   Marquee selection is supported only in the icon view and is only valid with 
  12000.   the extended and multiple selection types.  This selection technique enables 
  12001.   a user to begin selection from an anchor point that is established by moving 
  12002.   the pointer to white space in the container and pressing, but not releasing, 
  12003.   the select button on the pointing device.  As the user presses the select 
  12004.   button and drags the pointer, a tracking rectangle is drawn between the 
  12005.   anchor point and the current pointer position.  All items whose icons or bit 
  12006.   maps are entirely within the tracking rectangle are dynamically selected. 
  12007.  
  12008. o Swipe selection 
  12009.  
  12010.   Swipe selection is valid only with the extended and multiple selection types. 
  12011.   The container control implements two techniques for swipe selection: touch 
  12012.   swipe and range swipe. 
  12013.  
  12014.    - Touch swipe 
  12015.  
  12016.      Touch swipe selection is implemented in the icon view.  With this 
  12017.      selection technique, the pointer must pass over some portion of a 
  12018.      container item while the user is pressing the select button for that item 
  12019.      to be selected. 
  12020.  
  12021.    - Range swipe 
  12022.  
  12023.      In views other than the icon and tree views, range swipe selection is 
  12024.      available.  With this method, the user presses the select button while 
  12025.      moving the pointer.  However, the pointer does not have to pass directly 
  12026.      over a container item for that item to be selected.  Aside from pressing 
  12027.      the select button and moving the pointer, the only other requirement for 
  12028.      selection is that the container item must be within a range of items that 
  12029.      is being selected.  The range begins at the pointer's position when the 
  12030.      user presses the select button; it ends at the pointer's position when the 
  12031.      user releases the select button. Refer to the SAA CUA Advanced Interface 
  12032.      Design Reference for complete information on touch swipe and range swipe 
  12033.      selection. 
  12034.  
  12035. o First-letter selection 
  12036.  
  12037.   For the icon, name, text, and tree views, first letter selection occurs when 
  12038.   a character key is pressed, and the first container item whose text begins 
  12039.   with that character is displayed with selected-state emphasis.  The same is 
  12040.   true for the details view, except that all the columns for a record are 
  12041.   searched for a matching character before the next record is searched.  The 
  12042.   effect of first letter selection on other selected container items depends on 
  12043.   the chosen selection type (single, multiple, or extended). 
  12044.  
  12045. All these selection techniques conform to the descriptions in the SAA CUA Guide 
  12046. to User Interface Design. 
  12047.  
  12048. Note:  If more than one container window is open, selecting a container item in 
  12049.        one window has no effect on the selections in any other window. 
  12050.  
  12051.  
  12052. ΓòÉΓòÉΓòÉ 18.3.3.3. Selection Mechanisms ΓòÉΓòÉΓòÉ
  12053.  
  12054. The SAA CUA Guide to User Interface Design defines mouse button 1, the select 
  12055. button, to be used for selecting container items and mouse button 2, the drag 
  12056. button, to be used for dragging and dropping container items during direct 
  12057. manipulation.  These definitions also apply to the same buttons on any other 
  12058. pointing device. 
  12059.  
  12060. In addition, a user can press a keyboard key while pressing a mouse button; 
  12061. this is called keyboard augmentation.  The only instance of keyboard 
  12062. augmentation defined specifically for the container control is pressing the Alt 
  12063. key with the select button, which starts direct editing of text in a container. 
  12064. Refer to the SAA CUA Advanced Interface Design Reference for a complete list of 
  12065. the keys that are defined in the CUA guidelines for keyboard augmentation. 
  12066.  
  12067. In addition, the container control supports two keyboard cursors that can be 
  12068. moved by using keyboard navigation keys: 
  12069.  
  12070. o The selection cursor, a dotted black box drawn around a container item, which 
  12071.   represents the current position for the purpose of keyboard navigation. 
  12072.  
  12073. o The text cursor, a vertical line that shows the user where text can be 
  12074.   inserted or deleted when container text is being edited directly. 
  12075.  
  12076. Keyboard navigation consists of the use of the Up, Down, Left, and Right Arrow 
  12077. keys, the Home key, the End key, the PgUp (page up) key, and the PgDn (page 
  12078. down) key.  If container items are not visible within the work area, navigation 
  12079. with these keys causes the items to scroll into view if the user is not editing 
  12080. container text directly.  Refer to the SAA CUA Guide to User Interface Design 
  12081. for a description of the keyboard interface model. 
  12082.  
  12083.  
  12084. ΓòÉΓòÉΓòÉ 18.3.4. Providing Emphasis ΓòÉΓòÉΓòÉ
  12085.  
  12086. The container control supports various types of emphasis.  Emphasis is applied 
  12087. as described in the SAA CUA Guide to User Interface Design.  Refer to that book 
  12088. for complete information about the use of emphasis.  The following list 
  12089. describes forms of emphasis that have a distinct visible representation in the 
  12090. container control: 
  12091.  
  12092. o Selected-state emphasis 
  12093.  
  12094.   When a container item is selected, the entire container item receives 
  12095.   selected-state emphasis, which means that selected-state emphasis is applied 
  12096.   to icon/text or bit-map/text pairs in the icon, name, tree icon, and tree 
  12097.   name views; text strings in the text and tree text views; and an entire row 
  12098.   that represents a container item in the details view. The following figure 
  12099.   illustrates selected-state and unavailable-state emphasis; the emphasis on 
  12100.   the choice in the pull-down menu indicates that the choice is unavailable. 
  12101.  
  12102.   Selected-State and Unavailable-State Emphasis 
  12103.  
  12104.   The color for selected-state emphasis can be changed by using the control 
  12105.   panel, or the WinSetPresParam function, which results in a 
  12106.   WM_PRESPARAMCHANGED message being sent to the container. See the 
  12107.   WinSetPresParam function and WM_PRESPARAMCHANGED (in Container Controls) 
  12108.   message in the OS/2 2.0 Programming Reference for more information. 
  12109.  
  12110. o In-use emphasis 
  12111.  
  12112.   Cross-hatching behind an icon or bit map indicates in-use emphasis.  In-use 
  12113.   emphasis is not applied to container items in the text view, tree text view, 
  12114.   or details view when it contains text only.  However, the details view often 
  12115.   includes icons or bit maps in one column of each record, usually the leftmost 
  12116.   column.  In this situation, specify the column that contains the icons or bit 
  12117.   maps so that in-use emphasis can be applied to them.  This column can be set 
  12118.   by using the pFieldInfoObject field of the CNRINFO data structure. 
  12119.  
  12120. o Target emphasis 
  12121.  
  12122.   Target emphasis is used during direct manipulation.  When a user drags one 
  12123.   container item over another, the item beneath the dragged item displays 
  12124.   target emphasis. Two forms of target emphasis (visible feedback) are 
  12125.   available: a black line and a black border.  These forms of emphasis indicate 
  12126.   the target, where the container item will be dropped if the user releases the 
  12127.   drag button.  The CA_ORDEREDTARGETEMPH and CA_MIXEDTARGETEMPH attributes of 
  12128.   the CNRINFO data structure's flWindowAttr field determine the form of 
  12129.   emphasis applied for the text, name, and details views, as follows: 
  12130.  
  12131.    - If the CA_ORDEREDTARGETEMPH attribute is set: 
  12132.  
  12133.       o The CN_DRAGAFTER notification code is sent when a container item is 
  12134.         being dragged. 
  12135.  
  12136.       o A black line is drawn between container items to show the current 
  12137.         target position. 
  12138.  
  12139.    - If the CA_MIXEDTARGETEMPH attribute is set: 
  12140.  
  12141.       o The CN_DRAGAFTER and CN_DRAGOVER notification codes are sent when a 
  12142.         container item is being dragged.  The notification code sent depends on 
  12143.         the position of the pointer relative to the item it is positioned over. 
  12144.  
  12145.       o A black line is drawn if the pointer is positioned such that the item 
  12146.         being dragged will be inserted between two target items. 
  12147.  
  12148.       o A black border is drawn around either the entire target item for the 
  12149.         text and details views or the icon or bit map for the name view if the 
  12150.         pointer is positioned such that the item being dragged will be dropped 
  12151.         on the target item. 
  12152.  
  12153.    - If the CA_ORDEREDTARGETEMPH and CA_MIXEDTARGETEMPH attributes are not set: 
  12154.  
  12155.       o The CN_DRAGOVER notification code is sent when a container item is 
  12156.         being dragged. 
  12157.  
  12158.       o A black border is drawn around the entire target item for the text and 
  12159.         details views, and around the icon or bit map only for the name view. 
  12160.  
  12161.   For the icon and tree view, the CA_ORDEREDTARGETEMPH and CA_MIXEDTARGETEMPH 
  12162.   attributes are ignored, so target emphasis is applied as follows: 
  12163.  
  12164.    - The CN_DRAGOVER notification code is sent when a container item is 
  12165.      dragged. 
  12166.  
  12167.    - A black border is drawn around the target, as follows: 
  12168.  
  12169.       o For the icon view, if the target is another container item, a black 
  12170.         border is drawn around the icon or bit map that represents the 
  12171.         container item, but not around the text string beneath it.  If the 
  12172.         target is white space, a black border is drawn around the outer edge of 
  12173.         the entire work area. 
  12174.  
  12175.       o For the tree icon and tree name views, a black border is drawn around 
  12176.         the icon or bit map that represents the container item, but not around 
  12177.         the text string to the right of it. 
  12178.  
  12179.       o For the tree text view, a black border is drawn around the entire 
  12180.         target item. 
  12181.  
  12182.  
  12183. ΓòÉΓòÉΓòÉ 18.3.5. Using Direct Manipulation ΓòÉΓòÉΓòÉ
  12184.  
  12185. Direct manipulation is a protocol that enables the user to drag a container 
  12186. item within its current window or from one window to another.  The user can 
  12187. drop the container item either on white space in a window or on another item. 
  12188.  
  12189. Direct manipulation can be performed with all views of the container control. 
  12190. An API is provided so that the application is notified if an item is dropped on 
  12191. another item in the container and if an item is dragged from the container. 
  12192.  
  12193. The user can drag any container item, whether or not it is selected.  If the 
  12194. user presses the drag button when the pointer is over a selected container 
  12195. item, the application drags all selected items.  See Selection Techniques for 
  12196. information about the selection techniques. 
  12197.  
  12198. If the user presses the drag button when the pointer is over a container item 
  12199. that is not selected, the application drags only the item that the pointer is 
  12200. over. 
  12201.  
  12202. The container control fully supports direct manipulation.  Refer to the SAA CUA 
  12203. Guide to User Interface Design for more information about the effects of direct 
  12204. manipulation. 
  12205.  
  12206.  
  12207. ΓòÉΓòÉΓòÉ 18.3.6. Specifying Space between Container Items ΓòÉΓòÉΓòÉ
  12208.  
  12209. You can specify the amount of vertical space, in pels, to allow between 
  12210. container items by using the cyLineSpacing field of the CNRINFO data structure. 
  12211. If you do not specify how much vertical space can be used, the container 
  12212. control sets the space between the items using a default value.  For the tree 
  12213. view, you can specify the horizontal distance between the levels by using the 
  12214. cxTreeIndent field of the CNRINFO data structure.  If this value is less than 
  12215. 0, a default is used. 
  12216.  
  12217.  
  12218. ΓòÉΓòÉΓòÉ 18.4. Enhancing Container Control Performance ΓòÉΓòÉΓòÉ
  12219.  
  12220. The following offers information about fine-tuning a container to enhance its 
  12221. performance and effectiveness: 
  12222.  
  12223. o Positioning container items 
  12224. o Specifying deltas for large amounts of data 
  12225. o Direct editing of text in a container 
  12226. o Specifying container titles 
  12227. o Specifying fonts and colors 
  12228. o Drawing container items and painting backgrounds 
  12229. o Filtering container items 
  12230. o Optimizing container memory usage 
  12231. o Sharing records among multiple containers. 
  12232.  
  12233.  
  12234. ΓòÉΓòÉΓòÉ 18.4.1. Positioning Container Items ΓòÉΓòÉΓòÉ
  12235.  
  12236. Container items are positioned in the icon view according to workspace 
  12237. coordinates. 
  12238.  
  12239. The workspace is a two-dimensional Cartesian coordinate system.  The user can 
  12240. see a portion of the workspace in the work area, which is the scrollable 
  12241. viewing area of the container that is defined by the size of the container 
  12242. window.  The work area is logically scrollable within the workspace. 
  12243.  
  12244. The following figure shows the x- and y-axes of the workspace with a container 
  12245. window and its work area superimposed.  (This figure is not drawn to scale.) 
  12246.  
  12247.  
  12248. ΓòÉΓòÉΓòÉ 18.4.1.1. Scrollable Workspace Areas ΓòÉΓòÉΓòÉ
  12249.  
  12250. The following figure shows the scrollable area of the workspace, and thus the 
  12251. container. 
  12252.  
  12253. Workspace X- and Y-Axes 
  12254.  
  12255. This area is indicated by the solid black line that runs even with: 
  12256.  
  12257. o The top and bottom edges, respectively, of the topmost and bottommost 
  12258.   container items 
  12259.  
  12260. o The left and right edges, respectively, of the leftmost and rightmost 
  12261.   container items. 
  12262.  
  12263. The scrollable workspace area, then, is defined by the minimum and maximum x- 
  12264. and y-coordinates of the items in the container.  That is, the work area of the 
  12265. container window can be scrolled only within the workspace and only as far as 
  12266. is necessary to see the topmost, bottommost, leftmost, and rightmost container 
  12267. items. 
  12268.  
  12269. The following figure further illustrates a bounded workspace.  In this example, 
  12270. the topmost and bottommost container items limit the workspace. 
  12271.  
  12272. In the following figure, the work area has been scrolled so that all elements 
  12273. are not within the work area.  The work area could be scrolled to the left so 
  12274. that it would include the leftmost element, or scrolled down and to the right 
  12275. to include the rightmost element, but it could not be scrolled any farther in 
  12276. either direction. 
  12277.  
  12278.  
  12279. ΓòÉΓòÉΓòÉ 18.4.1.2. Workspace and Work Area Origins ΓòÉΓòÉΓòÉ
  12280.  
  12281. When the container is created, the work area and workspace share the same 
  12282. origin, (0,0), as represented in the previous figure. If the application 
  12283. requires that the work area and the workspace have different origins, the 
  12284. application can use the ptlOrigin field of the CNRINFO data structure and the 
  12285. CM_SETCNRINFO message to set the origin of the work area.  The application 
  12286. could use the CM_QUERYCNRINFO and CM_SETCNRINFO messages to obtain the origin 
  12287. when the user ends the application, and reset it when the user restarts the 
  12288. application. 
  12289.  
  12290. Container items are located in reference to the workspace origin.  There is a 
  12291. visual shift as the work area is scrolled; but because the work area moves over 
  12292. a fixed workspace, the coordinates of the container items do not change. 
  12293.  
  12294. Workspace Bounds 
  12295.  
  12296.  
  12297. ΓòÉΓòÉΓòÉ 18.4.2. Specifying Deltas for Large Amounts of Data ΓòÉΓòÉΓòÉ
  12298.  
  12299. The container control can accommodate large amounts of data with an 
  12300. application-defined delta.  The delta is an application-defined threshold, or 
  12301. number of container items, from either end of the list.  The application is 
  12302. responsible for specifying the delta value in the CNRINFO data structure's 
  12303. cDelta field.  It also is responsible for setting the delta value with the 
  12304. CMA_DELTA attribute of the CM_SETCNRINFO message's ulCnrInfoFl parameter. Refer 
  12305. to the OS/2 2.0 Programming Reference for description of CM_SETCNRINFO message. 
  12306.  
  12307. The container control monitors its place in the list of container items when 
  12308. the user is scrolling through it.  When the user scrolls to the delta from 
  12309. either end of the list, the container control sends a CN_QUERYDELTA 
  12310. notification code to the application as a request for more container items in 
  12311. the list. 
  12312.  
  12313. The application is responsible for managing the records in the container.  When 
  12314. the application receives the CN_QUERYDELTA notification code, the application 
  12315. is responsible for removing and inserting container records by using the 
  12316. CM_REMOVERECORD message and the CM_INSERTRECORD message respectively. 
  12317.  
  12318. Note: 
  12319.  
  12320. The delta concept is intended for applications with large amounts of data, or 
  12321. several thousand records.  Applications with smaller amounts of data are not 
  12322. required to use the delta function.  The default delta value is 0. 
  12323.  
  12324. The delta function is not available in the icon view because it is intended for 
  12325. data displayed in a linear format. 
  12326.  
  12327.  
  12328. ΓòÉΓòÉΓòÉ 18.4.3. Direct Editing of Text in a Container ΓòÉΓòÉΓòÉ
  12329.  
  12330. Direct editing of text is supported for any text field in a container, 
  12331. including the container title, column headings, and container items.  If a text 
  12332. field, such as the text field beneath an icon in the icon view, has no text and 
  12333. is not read-only, a user can place text in that field by editing the field 
  12334. directly. The font specified for the container by the application is used for 
  12335. the edited text. 
  12336.  
  12337. Direct editing is supported only for text data.  Therefore, if the data type in 
  12338. the details view is other than CFA_STRING, a user cannot edit it.  CFA_STRING 
  12339. is an attribute of the FIELDINFO data structure's flData field. 
  12340.  
  12341. You can prevent a user from editing any of the text in a container window by 
  12342. setting the CCS_READONLY style bit when a container is created.  If you do not 
  12343. set this style bit, the user can edit any of the text in a container window 
  12344. unless you set the following read-only attributes: CA_TITLEREADONLY, 
  12345. CRA_RECORDREADONLY, CFA_FIREADONLY, and CFA_FITITLEREADONLY.  If a read-only 
  12346. attribute is set, a user's attempts to edit container text directly are 
  12347. ignored. See the description of the CCS_READONLY style bit in the OS/2 2.0 
  12348. Programming Reference for more information about these attributes. 
  12349.  
  12350. A user can edit container text directly by doing either of the following: 
  12351.  
  12352. o Moving the pointer to an editable text field, holding down the Alt key, and 
  12353.   clicking the select button 
  12354. o Sending a CM_OPENEDIT message to the container control. 
  12355.  
  12356.   The application can assign a key or menu choice to this message so that the 
  12357.   keyboard can be used to edit container text directly. 
  12358.  
  12359. The container control responds by using the WM_CONTROL message to send the 
  12360. CN_BEGINEDIT notification code to the application. A window that contains a 
  12361. multiple-line entry (MLE) field opens to show that container text can be edited 
  12362. directly. 
  12363.  
  12364. The editing actions supported by MLEs, such as Cut, Copy, and Paste, are also 
  12365. supported by the container control.  These actions can be performed using 
  12366. system-defined shortcut keys. The actions and shortcut keys are defined in the 
  12367. SAA CUA Advanced Interface Design Reference. 
  12368.  
  12369. If the user enters a text string that is longer than the text field, the text 
  12370. string scrolls.  Also, if multiple lines of text are wanted, a user can press 
  12371. the Enter key and type on the following line whenever another line is needed. 
  12372.  
  12373. A user can end the direct editing of container text and save the changes by 
  12374. doing either of the following: 
  12375.  
  12376. o Moving the pointer outside the MLE and pressing the select button 
  12377. o Sending a CM_CLOSEEDIT message to the container control. 
  12378.  
  12379.   The application can assign a key or menu choice to this message so that the 
  12380.   keyboard can be used to end the direct editing of container text. 
  12381.  
  12382. The container responds by sending the WM_CONTROL message to the application 
  12383. again, but this time with the CN_REALLOCPSZ notification code.  The application 
  12384. can allocate more memory on receipt of the CN_REALLOCPSZ notification code, if 
  12385. necessary. If the application returns TRUE, the container control copies the 
  12386. new text to the application's text string.  If the application returns FALSE, 
  12387. the text change in the MLE is disregarded.  The container then sends the 
  12388. WM_CONTROL message to the application again, this time with the CN_ENDEDIT 
  12389. notification code.  The MLE field is removed from the screen, leaving only the 
  12390. text string. 
  12391.  
  12392. A user can end the direct editing of container text without saving any changes 
  12393. to the text in numerous ways, including the following: 
  12394.  
  12395. o Pressing the Esc key 
  12396. o Dragging the container item that is being edited 
  12397. o Pressing the Alt key and the select button before the direct editing of 
  12398.   container text has ended 
  12399. o Scrolling the container window. 
  12400.  
  12401. The CN_ENDEDIT notification code is sent to the application in each of these 
  12402. cases. 
  12403.  
  12404.  
  12405. ΓòÉΓòÉΓòÉ 18.4.4. Specifying Container Titles ΓòÉΓòÉΓòÉ
  12406.  
  12407. The container control can have a non-scrollable title that consists of one or 
  12408. more lines of text.  The container control does not limit the number of lines 
  12409. or the number of characters in each line.  If specified, this title is the 
  12410. first line or lines of the container control.  The text of the title is 
  12411. determined by the application and can be used to identify the container or to 
  12412. contain status information. The following figure shows an example of a 
  12413. container title. 
  12414.  
  12415. Non-Flowed Text View with Container Title 
  12416.  
  12417. The CA_CONTAINERTITLE attribute must be set to include a title in a container 
  12418. window.  The default is no container title. 
  12419.  
  12420. Split Details View with Container Title 
  12421.  
  12422. If you do not want the user to be able to edit the container title directly, 
  12423. you can set the CA_TITLEREADONLY attribute. The default is that the container 
  12424. title can be edited. See Direct Editing of Text in a Container for more 
  12425. information about editing container text directly. 
  12426.  
  12427. The CA_TITLESEPARATOR attribute must be set in order to include a separator 
  12428. line in a container window.  The default is no separator line. 
  12429.  
  12430. The container titles in both figures are centered.  This is the default. 
  12431. However, the CA_TITLECENTER, CA_TITLELEFT, or CA_TITLERIGHT attribute can be 
  12432. used to specify whether a container title is to be centered, left-justified, or 
  12433. right-justified, respectively. 
  12434.  
  12435. All the container attributes described here are attributes of the CNRINFO data 
  12436. structure's flWindowAttr field. 
  12437.  
  12438.  
  12439. ΓòÉΓòÉΓòÉ 18.4.5. Specifying Fonts and Colors ΓòÉΓòÉΓòÉ
  12440.  
  12441. A different font can be specified for each view.  The same font is used for the 
  12442. text within each view.  Text color can be configured from the system control 
  12443. panel.  The application can override the system-defined font and colors by 
  12444. using the WinSetPresParam function. 
  12445.  
  12446. The font and color can be changed for the text in all views. However, font and 
  12447. color cannot be changed for text in individual columns in the details view. 
  12448. Therefore, all text in the details view, including the container title, 
  12449. columns, and column headings, has the same font and color. 
  12450.  
  12451.  
  12452. ΓòÉΓòÉΓòÉ 18.4.6. Drawing Container Items and Painting Backgrounds ΓòÉΓòÉΓòÉ
  12453.  
  12454. The container control enables your application to paint the container's 
  12455. background, draw the container items, or both. If the CA_OWNERPAINTBACKGROUND 
  12456. attribute is set, the container control sends the CM_PAINTBACKGROUND message to 
  12457. itself. Your application can control background painting by subclassing the 
  12458. container control and intercepting the CM_PAINTBACKGROUND message. 
  12459. CA_OWNERPAINTBACKGROUND is an attribute of the CNRINFO data structure's 
  12460. flWindowAttr field. 
  12461.  
  12462. To support ownerdraw, the drawing of container items by the application, the 
  12463. container control provides the CA_OWNERDRAW attribute of the CNRINFO data 
  12464. structure's flWindowAttr field.  If this attribute is set and the application 
  12465. processes the WM_DRAWITEM window message, the application is responsible for 
  12466. drawing each container item, including the types of emphasis. 
  12467.  
  12468. In addition, the container control supports ownerdraw for each column in the 
  12469. details view.  This support is indicated by the CFA_OWNER attribute, which is 
  12470. specified in the FIELDINFO data structure's flData field. 
  12471.  
  12472. If the CA_OWNERDRAW attribute or CFA_OWNER attribute is set, the container 
  12473. control sends the application a WM_DRAWITEM message with a pointer to an 
  12474. OWNERITEM data structure as the owneritem parameter. Refer to the OS/2 2.0 
  12475. Programming Reference for a description of the OWNERITEM data structure fields 
  12476. as they apply to the container control. 
  12477.  
  12478.  
  12479. ΓòÉΓòÉΓòÉ 18.4.7. Filtering Container Items ΓòÉΓòÉΓòÉ
  12480.  
  12481. If the CRA_FILTERED attribute is set for a container item, that item is not 
  12482. displayed.  Therefore, filtering can be used to hide container items. 
  12483. CRA_FILTERED is an attribute of the RECORDCORE data structure's flRecordAttr 
  12484. field. 
  12485.  
  12486.  
  12487. ΓòÉΓòÉΓòÉ 18.4.8. Optimizing Container Memory Usage ΓòÉΓòÉΓòÉ
  12488.  
  12489. The container control provides an option to enable you to develop applications 
  12490. that minimize the amount of memory used for each container record.  This is 
  12491. done by specifying the CCS_MINIRECORDCORE style bit when the container is 
  12492. created, which causes a smaller version of the RECORDCORE data structure, 
  12493. MINIRECORDCORE, to be used.  The following table shows the differences between 
  12494. these two data structures. 
  12495.  
  12496. Differences between RECORDCORE and MINIRECORDCORE 
  12497.  
  12498. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12499. ΓöéRECORDCORE                    ΓöéMINIRECORDCORE                Γöé
  12500. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12501. ΓöéUp to eight image handles can ΓöéOnly one image handle can be  Γöé
  12502. Γöébe specified for each record. Γöéspecified for each record.    Γöé
  12503. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12504. Γöé                              ΓöéNote:  This image must be an  Γöé
  12505. Γöé                              Γöéicon.                         Γöé
  12506. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12507. ΓöéUp to four text strings can beΓöéOnly one text string can be   Γöé
  12508. Γöéspecified for each record.    Γöéspecified for each record.    Γöé
  12509. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12510.  
  12511.  
  12512. ΓòÉΓòÉΓòÉ 18.4.8.1. Allocating Memory for Container Records When Using MINIRECORDCORE ΓòÉΓòÉΓòÉ
  12513.  
  12514. The sample code in the following figure shows how to allocate memory for one 
  12515. container record when the MINIRECORDCORE data structure is used.  A pointer to 
  12516. the MINIRECORDCORE structure is returned. 
  12517.  
  12518.  
  12519. Sample Code for Allocating Memory for Smaller Container Records
  12520.  
  12521. HWND        hwndCnr;           /* Container window handle             */
  12522. PRECORDCORE pRecord;           /* Pointer to RECORDCORE structure     */
  12523. ULONG       nRecords = 1;      /* 1 record to be allocated            */
  12524.  
  12525. pRecord =
  12526.   (PMINIRECORDCORE)WinSendMsg(
  12527.     hwndCnr,                   /* Container window handle             */
  12528.     CM_ALLOCRECORD,            /* Message for allocating the record   */
  12529.     NULL,                      /* No additional memory                */
  12530.     (MPARAM)nRecords);         /* Number of records to be allocated   */
  12531.  
  12532.  
  12533. ΓòÉΓòÉΓòÉ 18.4.8.2. Sharing Records Among Multiple Containers ΓòÉΓòÉΓòÉ
  12534.  
  12535. The container control enables the application to share records that are 
  12536. allocated among multiple containers in the same process.  That is, records can 
  12537. be allocated once and then inserted into many containers in the same process. 
  12538. Only one copy of each record is in memory, but the container provides the 
  12539. flexibility for the records to appear as though they are independent of one 
  12540. another. 
  12541.  
  12542. When a record is inserted into the container, the flRecordAttr and ptlIcon 
  12543. fields of the record structure are saved internally.  The values in these 
  12544. fields cause the record attributes for all views and the icon position for the 
  12545. icon view to be associated with the specific container into which the record is 
  12546. inserted.  If the same record is inserted into multiple containers, the 
  12547. attributes and icon location of each record are maintained separately.  The 
  12548. application uses the CM_QUERYRECORDINFO message to retrieve the current values 
  12549. of these two fields for a particular record in a specific container. 
  12550.  
  12551.  
  12552. ΓòÉΓòÉΓòÉ 18.4.8.3. Invalidating Records Shared by Multiple Containers ΓòÉΓòÉΓòÉ
  12553.  
  12554. When a record is invalidated by an application, the flRecordAttr and ptlIcon 
  12555. fields are saved internally, just as when a record is inserted.  Therefore, use 
  12556. the CM_QUERYRECORDINFO message to acquire the current data for each record that 
  12557. is being invalidated. After querying the current data, you can change any of 
  12558. this data before invalidating its record. 
  12559.  
  12560.  
  12561. ΓòÉΓòÉΓòÉ 18.4.8.4. Freeing Records Shared by Multiple Containers ΓòÉΓòÉΓòÉ
  12562.  
  12563. When an application attempts to free a record in an open container, the record 
  12564. is freed only if it is not being used in any other open container.  The methods 
  12565. of freeing records in an open container are to use the CM_FREERECORD message, 
  12566. or use the CM_REMOVERECORD message and specify the CMA_FREE attribute. 
  12567.  
  12568.  
  12569. ΓòÉΓòÉΓòÉ 18.5. Summary ΓòÉΓòÉΓòÉ
  12570.  
  12571. Following are tables that describe the OS/2 container control structures, 
  12572. notification codes, notification messages, and window messages: 
  12573.  
  12574. Container Control Structures 
  12575.  
  12576. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12577. ΓöéStructure name          ΓöéDescription                         Γöé
  12578. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12579. ΓöéCDATE                   ΓöéContains date information for a dataΓöé
  12580. Γöé                        Γöéelement in the details view of the  Γöé
  12581. Γöé                        Γöécontainer.                          Γöé
  12582. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12583. ΓöéCNRDRAGINFO             ΓöéContains information about a direct Γöé
  12584. Γöé                        Γöémanipulation event occurring over   Γöé
  12585. Γöé                        Γöéthe container.                      Γöé
  12586. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12587. ΓöéCNRDRAGINIT             ΓöéContains information about a direct Γöé
  12588. Γöé                        Γöémanipulation event that was         Γöé
  12589. Γöé                        Γöéinitiated in a container.           Γöé
  12590. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12591. ΓöéCNRDRAWITEMINFO         ΓöéContains information about the item Γöé
  12592. Γöé                        Γöébeing drawn in the container.       Γöé
  12593. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12594. ΓöéCNREDITDATA             ΓöéContains information about the      Γöé
  12595. Γöé                        Γöédirect editing of container text.   Γöé
  12596. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12597. ΓöéCNRINFO                 ΓöéContains information about the      Γöé
  12598. Γöé                        Γöécontainer.                          Γöé
  12599. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12600. ΓöéCTIME                   ΓöéContains time information for a dataΓöé
  12601. Γöé                        Γöéelement in the details view of the  Γöé
  12602. Γöé                        Γöécontainer.                          Γöé
  12603. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12604. ΓöéFIELDINFO               ΓöéContains information about column   Γöé
  12605. Γöé                        Γöédata in the details view of the     Γöé
  12606. Γöé                        Γöécontainer.                          Γöé
  12607. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12608. ΓöéFIELDINFOINSERT         ΓöéContains information about the      Γöé
  12609. Γöé                        ΓöéFIELDINFO structure or structures   Γöé
  12610. Γöé                        Γöéthat are being inserted into the    Γöé
  12611. Γöé                        Γöécontainer.                          Γöé
  12612. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12613. ΓöéMINIRECORDCORE          ΓöéContains information for container  Γöé
  12614. Γöé                        Γöérecords that are smaller than those Γöé
  12615. Γöé                        Γöédefined by the RECORDCORE structure.Γöé
  12616. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12617. ΓöéNOTIFYDELTA             ΓöéContains information about the      Γöé
  12618. Γöé                        Γöéplacement of delta information for  Γöé
  12619. Γöé                        Γöéthe container.                      Γöé
  12620. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12621. ΓöéNOTIFYRECORDEMPHASIS    ΓöéContains information about the      Γöé
  12622. Γöé                        Γöéemphasis applied to a container     Γöé
  12623. Γöé                        Γöérecord.                             Γöé
  12624. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12625. ΓöéNOTIFYRECORDENTER       ΓöéContains information about the inputΓöé
  12626. Γöé                        Γöédevice being used with the          Γöé
  12627. Γöé                        Γöécontainer.                          Γöé
  12628. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12629. ΓöéNOTIFYSCROLL            ΓöéContains information about scrollingΓöé
  12630. Γöé                        Γöéthe container window.               Γöé
  12631. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12632. ΓöéOWNERBACKGROUND         ΓöéContains information about painting Γöé
  12633. Γöé                        Γöéthe container window's background.  Γöé
  12634. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12635. ΓöéQUERYRECFROMRECT        ΓöéContains information about a        Γöé
  12636. Γöé                        Γöécontainer record that is bounded by Γöé
  12637. Γöé                        Γöéa specified rectangle.              Γöé
  12638. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12639. ΓöéQUERYRECORDRECT         ΓöéContains information about the      Γöé
  12640. Γöé                        Γöérectangle that bounds a specified   Γöé
  12641. Γöé                        Γöécontainer record.                   Γöé
  12642. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12643. ΓöéRECORDCORE              ΓöéContains information for container  Γöé
  12644. Γöé                        Γöérecords.                            Γöé
  12645. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12646. ΓöéRECORDINSERT            ΓöéContains information about the      Γöé
  12647. Γöé                        ΓöéRECORDCORE structure or structures  Γöé
  12648. Γöé                        Γöéthat are being inserted into the    Γöé
  12649. Γöé                        Γöécontainer.                          Γöé
  12650. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12651. ΓöéSEARCHSTRING            ΓöéContains information about the      Γöé
  12652. Γöé                        Γöécontainer text string that is the   Γöé
  12653. Γöé                        Γöéobject of the search.               Γöé
  12654. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12655. ΓöéTREEITEMDESC            ΓöéContains icons and bit maps used to Γöé
  12656. Γöé                        Γöérepresent the state of an expanded  Γöé
  12657. Γöé                        Γöéor collapsed parent item in the treeΓöé
  12658. Γöé                        Γöéname view.                          Γöé
  12659. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12660.  
  12661. Container Control Notification Codes 
  12662.  
  12663. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12664. ΓöéCode name               ΓöéDescription                         Γöé
  12665. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12666. ΓöéCN_BEGINEDIT            ΓöéSent when container text is about toΓöé
  12667. Γöé                        Γöébe edited.                          Γöé
  12668. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12669. ΓöéCN_COLLAPSETREE         ΓöéSent when a parent item is collapsedΓöé
  12670. Γöé                        Γöéin the tree view.                   Γöé
  12671. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12672. ΓöéCN_CONTEXTMENU          ΓöéSent when the container receives a  Γöé
  12673. Γöé                        ΓöéWM_CONTEXTMENU message.             Γöé
  12674. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12675. ΓöéCN_DRAGAFTER            ΓöéSent when the container receives a  Γöé
  12676. Γöé                        ΓöéDM_DRAGOVER message.                Γöé
  12677. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12678. ΓöéCN_DRAGLEAVE            ΓöéSent when the container receives a  Γöé
  12679. Γöé                        ΓöéDM_DRAGLEAVE message.               Γöé
  12680. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12681. ΓöéCN_DRAGOVER             ΓöéSent when the container receives a  Γöé
  12682. Γöé                        ΓöéDM_DRAGOVER message.                Γöé
  12683. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12684. ΓöéCN_DROP                 ΓöéSent when the container receives a  Γöé
  12685. Γöé                        ΓöéDM_DROP message.                    Γöé
  12686. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12687. ΓöéCN_DROPHELP             ΓöéSent when the container receives a  Γöé
  12688. Γöé                        ΓöéDM_DROPHELP message.                Γöé
  12689. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12690. ΓöéCN_EMPHASIS             ΓöéSent when the attributes of a       Γöé
  12691. Γöé                        Γöécontainer record change.            Γöé
  12692. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12693. ΓöéCN_ENDEDIT              ΓöéSent when direct editing of the     Γöé
  12694. Γöé                        Γöécontainer text ends.                Γöé
  12695. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12696. ΓöéCN_ENTER                ΓöéSent either when the Enter key is   Γöé
  12697. Γöé                        Γöépressed while the container window  Γöé
  12698. Γöé                        Γöéhas the focus, or when the select   Γöé
  12699. Γöé                        Γöébutton is double-clicked while the  Γöé
  12700. Γöé                        Γöépointer is over the container       Γöé
  12701. Γöé                        Γöéwindow.                             Γöé
  12702. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12703. ΓöéCN_EXPANDTREE           ΓöéSent when the container expands a   Γöé
  12704. Γöé                        Γöéparent item in the tree view.       Γöé
  12705. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12706. ΓöéCN_HELP                 ΓöéSent when the container receives a  Γöé
  12707. Γöé                        ΓöéWM_HELP message.                    Γöé
  12708. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12709. ΓöéCN_INITDRAG             ΓöéSent when the drag button is pressedΓöé
  12710. Γöé                        Γöéand the pointer is moved while over Γöé
  12711. Γöé                        Γöéthe container control.              Γöé
  12712. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12713. ΓöéCN_KILLFOCUS            ΓöéSent when the container is losing   Γöé
  12714. Γöé                        Γöéthe focus.                          Γöé
  12715. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12716. ΓöéCN_QUERYDELTA           ΓöéSent to query for more data when theΓöé
  12717. Γöé                        Γöéuser scrolls to a preset delta      Γöé
  12718. Γöé                        Γöévalue.                              Γöé
  12719. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12720. ΓöéCN_REALLOCPSZ           ΓöéSent when container text is edited  Γöé
  12721. Γöé                        Γöé(before CN_ENDEDIT is sent).        Γöé
  12722. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12723. ΓöéCN_SCROLL               ΓöéSent when the container window      Γöé
  12724. Γöé                        Γöéscrolls.                            Γöé
  12725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12726. ΓöéCN_SETFOCUS             ΓöéSent when the container receives theΓöé
  12727. Γöé                        Γöéfocus.                              Γöé
  12728. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12729.  
  12730. Container Control Notification Messages 
  12731.  
  12732. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12733. ΓöéMessage                 ΓöéDescription                         Γöé
  12734. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12735. ΓöéWM_CONTROL              ΓöéOccurs when the container control   Γöé
  12736. Γöé                        Γöéhas a significant event to notify toΓöé
  12737. Γöé                        Γöéits owner.                          Γöé
  12738. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12739. ΓöéWM_CONTROLPOINTER       ΓöéSent to the container control's     Γöé
  12740. Γöé                        Γöéowner window when the pointing      Γöé
  12741. Γöé                        Γöédevice pointer moves over the       Γöé
  12742. Γöé                        Γöécontainer window, allowing the ownerΓöé
  12743. Γöé                        Γöéto set the pointing device pointer. Γöé
  12744. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12745. ΓöéWM_DRAWITEM             ΓöéSent to the owner of the container  Γöé
  12746. Γöé                        Γöécontrol each time an item is to be  Γöé
  12747. Γöé                        Γöédrawn.                              Γöé
  12748. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12749.  
  12750. Container Control Window Messages 
  12751.  
  12752. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  12753. ΓöéMessage                       ΓöéDescription                   Γöé
  12754. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12755. ΓöéCM_ALLOCDETAILFIELDINFO       ΓöéAllocates memory for one or   Γöé
  12756. Γöé                              Γöémore FIELDINFO structures.    Γöé
  12757. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12758. ΓöéCM_ALLOCRECORD                ΓöéAllocates memory for one or   Γöé
  12759. Γöé                              Γöémore RECORDCORE structures.   Γöé
  12760. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12761. ΓöéCM_ARRANGE                    ΓöéArranges the container recordsΓöé
  12762. Γöé                              Γöéin the icon view.             Γöé
  12763. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12764. ΓöéCM_CLOSEEDIT                  ΓöéCloses the window containing  Γöé
  12765. Γöé                              Γöéthe multiple-line entry (MLE) Γöé
  12766. Γöé                              Γöéfield used to edit container  Γöé
  12767. Γöé                              Γöétext directly.                Γöé
  12768. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12769. ΓöéCM_COLLAPSETREE               ΓöéCauses one parent item in the Γöé
  12770. Γöé                              Γöétree view to be collapsed.    Γöé
  12771. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12772. ΓöéCM_ERASERECORD                ΓöéErases the source record from Γöé
  12773. Γöé                              Γöéthe current view when a move  Γöé
  12774. Γöé                              Γöéoccurs as a result of direct  Γöé
  12775. Γöé                              Γöémanipulation.                 Γöé
  12776. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12777. ΓöéCM_EXPANDTREE                 ΓöéCauses one parent item in the Γöé
  12778. Γöé                              Γöétree view to be expanded.     Γöé
  12779. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12780. ΓöéCM_FILTER                     ΓöéFilters the contents of a     Γöé
  12781. Γöé                              Γöécontainer so that a subset of Γöé
  12782. Γöé                              Γöéthe container items can be    Γöé
  12783. Γöé                              Γöéviewed.                       Γöé
  12784. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12785. ΓöéCM_FREEDETAILFIELDINFO        ΓöéFrees the memory associated   Γöé
  12786. Γöé                              Γöéwith one or more FIELDINFO    Γöé
  12787. Γöé                              Γöéstructures.                   Γöé
  12788. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12789. ΓöéCM_FREERECORD                 ΓöéFrees the memory associated   Γöé
  12790. Γöé                              Γöéwith one or more RECORDCORE   Γöé
  12791. Γöé                              Γöéstructures.                   Γöé
  12792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12793. ΓöéCM_HORZSCROLLSPLITWINDOW      ΓöéScrolls a split window in the Γöé
  12794. Γöé                              Γöésplit details view.           Γöé
  12795. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12796. ΓöéCM_INSERTDETAILFIELDINFO      ΓöéInserts one or more FIELDINFO Γöé
  12797. Γöé                              Γöéstructures into a container   Γöé
  12798. Γöé                              Γöécontrol.                      Γöé
  12799. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12800. ΓöéCM_INSERTRECORD               ΓöéInserts one or more RECORDCOREΓöé
  12801. Γöé                              Γöéstructures into a container   Γöé
  12802. Γöé                              Γöécontrol.                      Γöé
  12803. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12804. ΓöéCM_INVALIDATEDETAILFIELDINFO  ΓöéNotifies the container controlΓöé
  12805. Γöé                              Γöéthat any or all FIELDINFO     Γöé
  12806. Γöé                              Γöéstructures are not valid and  Γöé
  12807. Γöé                              Γöéthat the view must be         Γöé
  12808. Γöé                              Γöérefreshed.                    Γöé
  12809. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12810. ΓöéCM_INVALIDATERECORD           ΓöéNotifies the container controlΓöé
  12811. Γöé                              Γöéthat any or all RECORDCORE    Γöé
  12812. Γöé                              Γöéstructures are not valid and  Γöé
  12813. Γöé                              Γöémust be refreshed.            Γöé
  12814. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12815. ΓöéCM_OPENEDIT                   ΓöéOpens the window that containsΓöé
  12816. Γöé                              Γöéthe multiple-line entry (MLE) Γöé
  12817. Γöé                              Γöéfield used to edit container  Γöé
  12818. Γöé                              Γöétext directly.                Γöé
  12819. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12820. ΓöéCM_PAINTBACKGROUND            ΓöéInforms an application when a Γöé
  12821. Γöé                              Γöécontainer's background is     Γöé
  12822. Γöé                              Γöépainted if the                Γöé
  12823. Γöé                              ΓöéCA_OWNERPAINTBACKGROUND       Γöé
  12824. Γöé                              Γöéattribute of the CNRINFO data Γöé
  12825. Γöé                              Γöéstructure is specified.       Γöé
  12826. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12827. ΓöéCM_QUERYCNRINFO               ΓöéReturns the container's       Γöé
  12828. Γöé                              ΓöéCNRINFO structure.            Γöé
  12829. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12830. ΓöéCM_QUERYDETAILFIELDINFO       ΓöéReturns a pointer to the      Γöé
  12831. Γöé                              Γöérequested FIELDINFO structure.Γöé
  12832. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12833. ΓöéCM_QUERYDRAGIMAGE             ΓöéReturns a handle to the icon  Γöé
  12834. Γöé                              Γöéor bit map for the record in  Γöé
  12835. Γöé                              Γöéthe current view.             Γöé
  12836. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12837. ΓöéCM_QUERYRECORD                ΓöéReturns a pointer to the      Γöé
  12838. Γöé                              Γöérequested RECORDCORE          Γöé
  12839. Γöé                              Γöéstructure.                    Γöé
  12840. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12841. ΓöéCM_QUERYRECORDEMPHASIS        ΓöéQueries for a container recordΓöé
  12842. Γöé                              Γöéwith the specified emphasis   Γöé
  12843. Γöé                              Γöéattributes.                   Γöé
  12844. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12845. ΓöéCM_QUERYRECORDFROMRECT        ΓöéQueries for a container recordΓöé
  12846. Γöé                              Γöéthat is bounded by the        Γöé
  12847. Γöé                              Γöéspecified rectangle.          Γöé
  12848. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12849. ΓöéCM_QUERYRECORDINFO            ΓöéUpdates the specified records Γöé
  12850. Γöé                              Γöéwith the current information  Γöé
  12851. Γöé                              Γöéfor the container.            Γöé
  12852. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12853. ΓöéCM_QUERYRECORDRECT            ΓöéReturns the rectangle of the  Γöé
  12854. Γöé                              Γöéspecified container record,   Γöé
  12855. Γöé                              Γöérelative to the container     Γöé
  12856. Γöé                              Γöéwindow origin.                Γöé
  12857. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12858. ΓöéCM_QUERYVIEWPORTRECT          ΓöéReturns a rectangle that      Γöé
  12859. Γöé                              Γöécontains the coordinates of   Γöé
  12860. Γöé                              Γöéthe container's work area.    Γöé
  12861. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12862. ΓöéCM_REMOVEDETAILFIELDINFO      ΓöéRemoves one, multiple, or all Γöé
  12863. Γöé                              ΓöéFIELDINFO structures from the Γöé
  12864. Γöé                              Γöécontainer control.            Γöé
  12865. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12866. ΓöéCM_REMOVERECORD               ΓöéRemoves one, multiple, or all Γöé
  12867. Γöé                              ΓöéRECORDCORE structures from theΓöé
  12868. Γöé                              Γöécontainer control.            Γöé
  12869. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12870. ΓöéCM_SCROLLWINDOW               ΓöéScrolls an entire container   Γöé
  12871. Γöé                              Γöéwindow.                       Γöé
  12872. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12873. ΓöéCM_SEARCHSTRING               ΓöéReturns the pointer to a      Γöé
  12874. Γöé                              Γöécontainer record whose text   Γöé
  12875. Γöé                              Γöématches the string.           Γöé
  12876. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12877. ΓöéCM_SETCNRINFO                 ΓöéSets or changes the data for  Γöé
  12878. Γöé                              Γöéthe container control.        Γöé
  12879. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12880. ΓöéCM_SETRECORDEMPHASIS          ΓöéSets the emphasis attributes  Γöé
  12881. Γöé                              Γöéof the specified container    Γöé
  12882. Γöé                              Γöérecord.                       Γöé
  12883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12884. ΓöéCM_SORTRECORD                 ΓöéSorts the container records inΓöé
  12885. Γöé                              Γöéthe container control.        Γöé
  12886. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  12887. ΓöéWM_PRESPARAMCHANGED           ΓöéSent when a presentation      Γöé
  12888. Γöé                              Γöéparameter is set or removed   Γöé
  12889. Γöé                              Γöédynamically from a window     Γöé
  12890. Γöé                              Γöéinstance.                     Γöé
  12891. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  12892.  
  12893.  
  12894. ΓòÉΓòÉΓòÉ 19. Notebook Controls ΓòÉΓòÉΓòÉ
  12895.  
  12896. A notebook control (WC_NOTEBOOK window class) is a visual component that 
  12897. organizes information on individual pages so that a user can find and display 
  12898. that information quickly and easily.  This chapter explains how to use notebook 
  12899. controls in PM applications. 
  12900.  
  12901.  
  12902. ΓòÉΓòÉΓòÉ 19.1. About Notebook Controls ΓòÉΓòÉΓòÉ
  12903.  
  12904. This notebook control component simulates a real notebook, but improves on it 
  12905. by overcoming a notebook's natural limitations. A user can select and display 
  12906. pages by using a pointing device or the keyboard. 
  12907.  
  12908. Notebook Example 
  12909.  
  12910. The notebook can be customized to meet varying application requirements, while 
  12911. providing a user interface component that can be used easily to develop 
  12912. products that conform to the Common User Access (CUA) user interface 
  12913. guidelines.  The application can specify different colors, sizes, and 
  12914. orientations for its notebooks, but the underlying function of the control 
  12915. remains the same.  For a complete description of CUA notebooks, refer to the 
  12916. SAA CUA Guide to User Interface Design and the SAA CUA Advanced Interface 
  12917. Design Reference. 
  12918.  
  12919.  
  12920. ΓòÉΓòÉΓòÉ 19.1.1. Notebook Creation ΓòÉΓòÉΓòÉ
  12921.  
  12922. You create a notebook by using the WC_NOTEBOOK window class name in the 
  12923. ClassName parameter of the WinCreateWindow function. The following figure shows 
  12924. the creation of the notebook. The style set in the ulNotebookStyles variable 
  12925. (the BKS_* values) specifies that the notebook is to be created with a solid 
  12926. binding and the back pages intersecting at the bottom right corner, major tabs 
  12927. placed on the right edge, tab type square, tab text centered, and status text 
  12928. left-justified. These are the default settings and are given here only to show 
  12929. how notebook styles are set. 
  12930.  
  12931.  
  12932. Sample Code for Creating a Notebook
  12933.  
  12934. HWND  hwndNotebook;            /* Notebook window handle              */
  12935. ULONG ulNotebookStyles;        /* Notebook window styles              */
  12936. HMODULE hmod;                  /* Notebook DLL module handle          */
  12937.  
  12938. /**********************************************************************/
  12939. /* Set the BKS_style flags to customize the notebook.                 */
  12940. /**********************************************************************/
  12941. ulNotebookStyles =
  12942.   BKS_SOLIDBIND     |          /* Use solid binding.                  */
  12943.   BKS_BACKPAGESBR   |          /* Set back pages to intersect at the  */
  12944.                                /* bottom right corner.                */
  12945.   BKS_MAJORTABRIGHT |          /* Position major tabs on right side.  */
  12946.   BKS_SQUARETABS    |          /* Make the tabs square.               */
  12947.   BKS_TABTEXTCENTER |          /* Center tab text.                    */
  12948.   BKS_STATUSTEXTLEFT;          /* Align status line text left.        */
  12949.  
  12950. /**********************************************************************/
  12951. /* Create the notebook control window.                                */
  12952. /**********************************************************************/
  12953. hwndNotebook =
  12954.   WinCreateWindow(
  12955.     hwndParent,                /* Parent window handle                */
  12956.     WC_NOTEBOOK,               /* Notebook window class               */
  12957.     NULL,                      /* No window text                      */
  12958.     ulNotebookStyles,          /* Notebook window styles              */
  12959.  
  12960.     x, y, cx, xy               /* Origin and size                     */
  12961.     hwndOwner,                 /* Owner window handle                 */
  12962.     HWND_TOP,                  /* Sibling window handle               */
  12963.     ID_BOOK,                   /* Notebook window ID                  */
  12964.     NULL,                      /* No control data                     */
  12965.     NULL;                      /* No presentation parameters          */
  12966.  
  12967. /**********************************************************************/
  12968. /* Make the notebook control visible.                                 */
  12969. /**********************************************************************/
  12970. WinShowWindow(
  12971.   hwndNotebook,                /* Notebook window handle              */
  12972.   TRUE);                       /* Make the window visible.            */
  12973.  
  12974.  
  12975. ΓòÉΓòÉΓòÉ 19.1.2. Understanding the Default Notebook Style ΓòÉΓòÉΓòÉ
  12976.  
  12977. As specified in the preceding sample code, the following figure shows how the 
  12978. default notebook control looks when it is created. 
  12979.  
  12980. Default Notebook Style 
  12981.  
  12982. The notebook control resembles a real notebook in its general appearance.  For 
  12983. example, as the previous figure shows, the notebook has a binding that, along 
  12984. with recessed pages on the right and bottom edges, gives the notebook a 
  12985. three-dimensional appearance.  The default binding is solid and is placed on 
  12986. the left side.  This binding is used if no style bit is specified or if the 
  12987. BKS_SOLIDBIND style bit is specified. 
  12988.  
  12989. In the bottom right corner of the notebook in the previous figure are the page 
  12990. buttons. These buttons are for bringing one page of the notebook into view at a 
  12991. time.  They are a standard component that is automatically provided with every 
  12992. notebook.  However, the application can change the default width and height of 
  12993. the page buttons by using the BKM_SETDIMENSIONS message. 
  12994.  
  12995. Selecting the forward page button (the arrow pointing to the right) causes the 
  12996. next page to be displayed; while selecting the backward page button (the arrow 
  12997. pointing to the left) causes the previous page to be displayed. In the previous 
  12998. figure, the page buttons are displayed with unavailable-state emphasis because 
  12999. no pages have been inserted in the notebook yet.  Therefore, in this example, 
  13000. selecting either page button would not bring a page into view. 
  13001.  
  13002. To the left of the page buttons in the default notebook style setting is the 
  13003. status line, which enables the application to provide information to the user 
  13004. about the page currently displayed.  The notebook does not supply any default 
  13005. text for the status line.  The application is responsible for associating a 
  13006. text string with the status line of each page on which a text string is to be 
  13007. displayed.  The procedure for associating a text string with a status line is 
  13008. described in Inserting Notebook Pages. Text displayed in the status line is 
  13009. left-justified by default. This setting is specified by the BKS_STATUSTEXTLEFT 
  13010. style bit. See Notebook Control Styles for information about other style bits 
  13011. that can be set for the notebook. 
  13012.  
  13013. The page buttons always are located in the corner where the recessed edges of 
  13014. the notebook intersect.  These recessed edges are called the back pages.  The 
  13015. default notebook's back pages intersect in the bottom right corner, which means 
  13016. the recessed pages are on the bottom and right edges. This setting is specified 
  13017. by the BKS_BACKPAGESBR style bit. 
  13018.  
  13019. The back pages are important because their intersection determines where the 
  13020. major tabs can be placed, which in turn determines the placement of the binding 
  13021. and the minor tabs.  Major and minor tabs are used to organize related pages 
  13022. into sections; minor tabs define subsections within major tab sections.  The 
  13023. content of each section has a common theme, which is represented to the user by 
  13024. a tabbed divider, similar to a tabbed page in a notebook. 
  13025.  
  13026. In the figure, the BKS_MAJORTABRIGHT style bit specifies that major tabs, if 
  13027. used, are to be placed on the right side of the notebook.  This is the default 
  13028. major tab placement when the back pages intersect at the bottom right corner of 
  13029. the notebook. The binding is located on the left, because it is always located 
  13030. on the opposite side of the notebook from the major tabs. 
  13031.  
  13032. The default notebook has no major tabs, even though the BKS_MAJORTABRIGHT style 
  13033. bit was specified, because major tab attributes, if desired, can be specified 
  13034. only at the time a page is inserted in the notebook.  This is done by 
  13035. specifying the BKA_MAJOR attribute in the BKM_INSERTPAGE message. 
  13036.  
  13037. Similarly, minor tabs are specified using the BKA_MINOR attribute.  Minor tabs 
  13038. always are placed perpendicular to the major tabs, based on the intersection of 
  13039. the back pages and the major tab placement.  Only one major or minor tab 
  13040. attribute can be specified for each notebook page.  Minor tabs are displayed 
  13041. only if the associated major tab page is selected or if the notebook has no 
  13042. major tab pages. The following figure is an example of a notebook for which 
  13043. both major and minor tab attributes were specified. 
  13044.  
  13045. Default Style and Placement of Major and Minor Tabs 
  13046.  
  13047. The default shape of the tabs used on notebook divider pages is square. This 
  13048. setting is specified by the BKS_SQUARETABS style bit.  As with the page 
  13049. buttons, the application can change the default width and height of the major 
  13050. and minor tabs by using the BKM_SETDIMENSIONS message. 
  13051.  
  13052. A notebook tab can contain either text or a bit map.  Text is placed on a tab 
  13053. by using the BKM_TABTEXTCENTER style bit.  A bit map is placed on a tab by 
  13054. using the BKM_SETTABBITMAP message.  A bit map cannot be positioned on a tab 
  13055. because the bit map stretches to fill the rectangular area of the tab; 
  13056. therefore, no style bit is used. 
  13057.  
  13058. The following paragraphs provide details about changing notebook style 
  13059. settings, along with additional information about the effect of the back pages 
  13060. intersection on notebook style. 
  13061.  
  13062.  
  13063. ΓòÉΓòÉΓòÉ 19.1.3. Notebook Control Styles ΓòÉΓòÉΓòÉ
  13064.  
  13065. The notebook control provides style bits so that your application can specify 
  13066. or change the default style settings described in Understanding the Default 
  13067. Notebook Style.  One style bit from each of the following groups can be 
  13068. specified: 
  13069.  
  13070. o Type of binding 
  13071.  
  13072.    BKS_SOLIDBIND             Solid (default). 
  13073.    BKS_SPIRALBIND            Spiral. 
  13074.  
  13075. o Intersection of back pages 
  13076.  
  13077.    BKS_BACKPAGESBR           Bottom right corner (default). 
  13078.    BKS_BACKPAGESBL           Bottom left corner. 
  13079.    BKS_BACKPAGESTR           Top right corner. 
  13080.    BKS_BACKPAGESTL           Top left corner. 
  13081.  
  13082. o Location of major tabs 
  13083.  
  13084.    BKS_MAJORTABRIGHT         Right edge (default). 
  13085.    BKS_MAJORTABLEFT          Left edge. 
  13086.    BKS_MAJORTABTOP           Top edge. 
  13087.    BKS_MAJORTABBOTTOM        Bottom edge. 
  13088.  
  13089. o Shape of tabs 
  13090.  
  13091.    BKS_SQUARETABS            Square (default). 
  13092.    BKS_ROUNDEDTABS           Rounded. 
  13093.    BKS_POLYGONTABS           Polygonal. 
  13094.  
  13095. o Alignment of text associated with tabs 
  13096.  
  13097.    BKS_TABTEXTCENTER         Centered (default). 
  13098.    BKS_TABTEXTLEFT           Left-justified. 
  13099.    BKS_TABTEXTRIGHT          Right-justified. 
  13100.  
  13101. o Alignment of status line text. 
  13102.  
  13103.    BKS_STATUSTEXTLEFT        Left-justified (default). 
  13104.    BKS_STATUSTEXTRIGHT       Right-justified. 
  13105.    BKS_STATUSTEXTCENTER      Centered. 
  13106.  
  13107. If you specify more than one style bit, you must use an OR operator (|) to 
  13108. combine them.  See the OS/2 2.0 Programming Reference for definitions of the 
  13109. notebook style bits. 
  13110.  
  13111. Two styles are provided for the notebook binding:  solid and spiral.  The 
  13112. notebook is displayed with a solid binding by default, but the application can 
  13113. specify BKS_SPIRALBIND to display a spiral binding. 
  13114.  
  13115. The most important of the style bits are those that determine the corner at 
  13116. which the back pages intersect and those that indicate the side where the major 
  13117. tabs are to be placed.  For example, if the application specifies the back 
  13118. pages intersection at the bottom right corner (BKS_BACKPAGESBR, the default), 
  13119. the major tabs can be placed on either the bottom edge (BKS_MAJORTABBOTTOM) or 
  13120. the right edge (BKS_MAJORTABRIGHT) of the notebook. 
  13121.  
  13122. In this situation, if the application specifies that major tabs are to be 
  13123. placed on the left or top edges of the notebook, the notebook control places 
  13124. them on the right edge anyway-the default placement for back pages intersecting 
  13125. at the bottom right corner. 
  13126.  
  13127. The placement of the minor tabs and binding depends entirely on the placement 
  13128. of the back pages and major tabs respectively.  The binding always is located 
  13129. on the side of the notebook opposite the side where the major tabs are.  The 
  13130. minor tabs always are located on the recessed page side that has no major tabs. 
  13131. The following table describes the available notebook window style settings. 
  13132.  
  13133. Notebook Window Style Settings 
  13134.  
  13135. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13136. ΓöéBack Pages            ΓöéMajor Tabs       ΓöéMinor Tabs   ΓöéBinding Γöé
  13137. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13138. ΓöéBottom right (default)ΓöéBottom           ΓöéRight        ΓöéTop     Γöé
  13139. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13140. ΓöéBottom right (default)ΓöéRight (default)  ΓöéBottom       ΓöéLeft    Γöé
  13141. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13142. ΓöéBottom left           ΓöéBottom (default) ΓöéLeft         ΓöéTop     Γöé
  13143. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13144. ΓöéBottom left           ΓöéLeft             ΓöéBottom       ΓöéRight   Γöé
  13145. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13146. ΓöéTop right             ΓöéTop (default)    ΓöéRight        ΓöéBottom  Γöé
  13147. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13148. ΓöéTop right             ΓöéRight            ΓöéTop          ΓöéLeft    Γöé
  13149. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13150. ΓöéTop left              ΓöéTop              ΓöéLeft         ΓöéBottom  Γöé
  13151. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13152. ΓöéTop left              ΓöéLeft (default)   ΓöéTop          ΓöéRight   Γöé
  13153. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  13154.  
  13155. The shape of the tabs can be square, rounded, or polygonal.  The tab text can 
  13156. be drawn left-justified, right justified, or centered.  Once set, these styles 
  13157. apply to the major and minor tabs for all the pages in the notebook.  Text is 
  13158. associated with a tab page by using the BKM_SETTABTEXT message.  Notebook tab 
  13159. text is centered by default or by specifying the BKS_TABTEXTCENTER style when 
  13160. creating the notebook window. 
  13161.  
  13162. The application can associate status line text with each inserted notebook 
  13163. page.  The status text is drawn left-justified by default, but also can be 
  13164. drawn centered or right-justified.  The same status text justification applies 
  13165. to all pages in the notebook. The location of the back pages intersection and 
  13166. the major tabs has no effect on the specification of the tab shape and status 
  13167. line position.  These style bits can be set for the entire notebook. 
  13168.  
  13169. The following figure shows some sample code for setting the notebook style to 
  13170. spiral binding, back pages that intersect at the bottom left corner, major tabs 
  13171. on the bottom edge, rounded tabs, tab text left justified, and status line text 
  13172. centered. 
  13173.  
  13174.  
  13175. Sample Code for Changing the Notebook Style
  13176.  
  13177. /**********************************************************************/
  13178. /* Query for the existing notebook window style settings              */
  13179. /**********************************************************************/
  13180. ulNotebookStyles = WinQueryWindowULong(
  13181.   hwndNotebook,                /* Notebook window handle              */
  13182.   QWL_STYLE );                 /* Set notebook style                  */
  13183.  
  13184. /**********************************************************************/
  13185. /* Reset notebook window style flags, leaving window flags unchanged. */
  13186. /**********************************************************************/
  13187. ulNotebookStyles &= 0xFFFF0000;
  13188.  
  13189. /**********************************************************************/
  13190. /* Set up the new notebook window style flags                         */
  13191. /**********************************************************************/
  13192. ulNotebookStyles |=
  13193.   BKS_SPIRALBIND     |         /* Use spiral binding.                 */
  13194.   BKS_BACKPAGESBL    |         /* Set back pages to intersect at the  */
  13195.                                /* bottom left corner.                 */
  13196.   BKS_MAJORTABBOTTOM |         /* Position major tabs on bottom edge. */
  13197.   BKS_ROUNDEDTABS    |         /* Make tabs rounded.                  */
  13198.   BKS_TABTEXTLEFT    |         /* Make tab text left justified.       */
  13199.   BKS_STATUSTEXTCENTER;        /* Center status text.                 */
  13200.  
  13201. /**********************************************************************/
  13202. /* Set the new notebook style.                                        */
  13203. /**********************************************************************/
  13204. WinSetWindowULong(
  13205.   hwndNotebook,                /* Notebook window handle              */
  13206.   QWL_STYLE,                   /* Window style                        */
  13207.   ulNotebookStyles);           /* Set notebook style.                 */
  13208. /**********************************************************************/
  13209. /* Invalidate to force a repaint.                                     */
  13210. /**********************************************************************/
  13211. WinInvalidateRectl(
  13212.   hwndNotebook,                /* Notebook window handle              */
  13213.   NULL,                        /* Invalidate entire window,           */
  13214.   TRUE);                       /* including children.                 */
  13215.  
  13216. The following figure shows how the notebook appears when these style bits are 
  13217. set.  This figure assumes that pages have been inserted in the notebook with 
  13218. major and minor tab attributes. 
  13219.  
  13220. Notebook with Style Settings Changed 
  13221.  
  13222.  
  13223. ΓòÉΓòÉΓòÉ 19.2. Working with Notebook Pages and Windows ΓòÉΓòÉΓòÉ
  13224.  
  13225. The following sections tell you how to insert information in, create and 
  13226. associate windows for, and remove information from a notebook. 
  13227.  
  13228.  
  13229. ΓòÉΓòÉΓòÉ 19.2.1. Inserting Notebook Pages ΓòÉΓòÉΓòÉ
  13230.  
  13231. After a notebook is created, pages can be inserted in the notebook by using the 
  13232. BKM_INSERTPAGE message.  BKM_INSERTPAGE provides several attributes that can 
  13233. affect the inserted pages.  When inserting pages into either a new notebook or 
  13234. an existing one, carefully consider how the user will expect those pages to be 
  13235. organized. 
  13236.  
  13237. The two attributes that have the most impact on how notebook pages are 
  13238. organized are BKA_MAJOR and BKA_MINOR, which specify major and minor tabs 
  13239. respectively.  Major tab pages define the beginning of major sections in the 
  13240. notebook, while minor tab pages define the beginning of subsections within a 
  13241. major section.  Major sections should begin with a page that has a BKA_MAJOR 
  13242. attribute.  Within major sections, information can be organized into minor 
  13243. sections, each of which should begin with a page that has a BKA_MINOR 
  13244. attribute. 
  13245.  
  13246. For an existing notebook, the underlying hierarchy, if one exists, must be 
  13247. observed when inserting new pages, to provide efficient organization and 
  13248. navigation of the information in the notebook.  For example, if the notebook 
  13249. has minor sections but no major sections, you could confuse the user if you 
  13250. inserted a page with a major tab attribute between related minor sections or at 
  13251. the end of the notebook. 
  13252.  
  13253. If you insert pages without specifying tab attributes, those pages become part 
  13254. of the section in which they are inserted.  For example, if page 7 of your 
  13255. notebook has a minor tab, and you insert a new page 8 without specifying a tab 
  13256. attribute, page 8 becomes part of the section that begins with the minor tab on 
  13257. page 7. 
  13258.  
  13259. Since tab pages are not mandatory, the application can create a notebook that 
  13260. contains no major or minor tab pages.  That style would be similar to that of a 
  13261. composition notebook. 
  13262.  
  13263. Another group of attributes that can affect the organization of pages being 
  13264. inserted into a notebook consists of BKA_LAST, BKA_FIRST, BKA_NEXT, and 
  13265. BKA_PREV.  These attributes cause pages to be inserted at the end, at the 
  13266. beginning, after a specified page, and before a specified page of a notebook, 
  13267. respectively. 
  13268.  
  13269. Each page has an optional status line that can be used to display information 
  13270. for the user.  To include this status line, the application must specify the 
  13271. BKA_STATUSTEXTON attribute when inserting the page.  If the application inserts 
  13272. the page without specifying this attribute, the status line is not available 
  13273. for that page. 
  13274.  
  13275. To display text on the status line of the specified page, the application must 
  13276. use the BKM_SETSTATUSLINETEXT message to associate a text string with the page. 
  13277. A separate message must be sent for each page that is to display status line 
  13278. text.  If the application does not send a BKM_SETSTATUSLINETEXT message for a 
  13279. page, no text is displayed in the status line of that page.  The application 
  13280. can send this message to the notebook at any time to change the status line 
  13281. text.  The status line can be cleared by setting the text to NULL. 
  13282.  
  13283. The following figure shows how to insert a page in a notebook, where the 
  13284. inserted page has a major tab attribute, the status line is available, and the 
  13285. page is inserted after the last page in the notebook.  This sample code also 
  13286. shows how to associate a text string with the status line of the inserted page. 
  13287.  
  13288.  
  13289. Sample Code for Inserting a Notebook Page
  13290.  
  13291. HWND  hwndNotebook;            /* Notebook window handle              */
  13292. ULONG ulPageId;                /* Page identifier                     */
  13293.  
  13294. /**********************************************************************/
  13295. /* Insert a new page into a notebook                                  */
  13296. /**********************************************************************/
  13297. ulPageId = (ULONG) WinSendMsg(
  13298.   hwndNotebook,                /* Notebook window handle              */
  13299.   BKM_INSERTPAGE,              /* Message for inserting a page        */
  13300.   (MPARAM)NULL,                /* NULL for page ID                    */
  13301.  
  13302.   MPFROM2SHORT(
  13303.     BKA_MAJOR |                /* Insert page with a major tab        */
  13304.                                /* attribute                           */
  13305.     BKA_STATUSTEXTON),         /* Make status line text visible       */
  13306.     BKA_LAST));                /* Insert this page at end of notebook */
  13307.  
  13308. /**********************************************************************/
  13309. /* Set the status line text.                                          */
  13310. /**********************************************************************/
  13311. WinSendMsg(
  13312.   hwndNotebook,                /* Notebook window handle              */
  13313.   BKM_SETSTATUSLINETEXT,       /* Message for setting status line     */
  13314.                                /* text                                */
  13315.   (MPARAM)ulPageId,            /* ID of page to receive status line   */
  13316.                                /* text                                */
  13317.   MPFROMP("Page 1 of 2");      /* Text string to put on status line   */
  13318.  
  13319.  
  13320. ΓòÉΓòÉΓòÉ 19.2.2. Associating Application Page Windows with Notebook Pages ΓòÉΓòÉΓòÉ
  13321.  
  13322. After a page is inserted into a notebook, you must facilitate the display of 
  13323. information for this page when it is brought to the top of the book.  The 
  13324. notebook provides a top page area in which the application can display windows 
  13325. or dialogs for the topmost page.  For each inserted page, the application must 
  13326. associate the handle of a window or dialog that is to be invalidated when the 
  13327. page is brought to the top of the book.  The application can associate the same 
  13328. handle with different pages if desired. 
  13329.  
  13330. The application must send a BKM_SETPAGEWINDOWHWND message to the notebook order 
  13331. to associate the application page window or dialog handle with the notebook 
  13332. page being inserted.  Once done, the notebook invalidates this window or dialog 
  13333. whenever the notebook page is brought to the top of the book.  If no 
  13334. application page window handle is specified for an inserted page, no 
  13335. invalidation can be done by the notebook for that page.  However, the 
  13336. application will receive a BKN_PAGESELECTED notification code when a new page 
  13337. is brought to the top of the notebook, at which time the application can 
  13338. invalidate the page. 
  13339.  
  13340.  
  13341. ΓòÉΓòÉΓòÉ 19.2.2.1. Associating a Window or Dialog with a Notebook Page ΓòÉΓòÉΓòÉ
  13342.  
  13343. The following sections describe how to associate either a window handle or a 
  13344. dialog handle with an inserted page. 
  13345.  
  13346.  
  13347. ΓòÉΓòÉΓòÉ 19.2.2.1.1. Associating a Window with a Notebook Page ΓòÉΓòÉΓòÉ
  13348.  
  13349.  
  13350. A calendar example is used to show how a page can be implemented as a window. 
  13351. The following figure shows a calendar that is divided into four years (major 
  13352. tabs).  Within each year are months (minor tabs,) grouped into quarters.  The 
  13353. top page has a window associated with it.  The window paint processing displays 
  13354. the days for the currently selected month and year. 
  13355.  
  13356. Calendar Inserted into an Application Page Window 
  13357.  
  13358. The sample code in the following figure shows how the window procedure for the 
  13359. calendar is registered with the application.  Also, it shows how the window is 
  13360. created and associated with the notebook page.  The example ends by showing the 
  13361. window procedure for the associated window. 
  13362.  
  13363.  
  13364. SampleCodeforAssociatingaWindowwithaNotebookPage
  13365.  
  13366. /********************************************************************/
  13367. /* Registration of window procedure for calendar.                   */
  13368. /********************************************************************/
  13369. WinRegisterClass(hab,               /* Register a page window class */
  13370.                  "Calendar Page",   /* Class name                   */
  13371.                  PageWndProc,       /* Window procedure             */
  13372.                  CS_SIZEREDRAW,     /* Class style                  */
  13373.                  0);                /* No extra bytes reserved      */
  13374.  
  13375. /********************************************************************/
  13376. /* Create the window.                                               */
  13377. /********************************************************************/
  13378. hwndPage = WinCreateWindow(hwndNotebook,       /* Parent            */
  13379.                            "Calendar Page",    /* Class             */
  13380.                            NULL,               /* Title text        */
  13381.                            0L,                 /* Style             */
  13382.                            0, 0, 0, 0,         /* Origin and size   */
  13383.  
  13384.                            hwndNotebook,       /* Owner             */
  13385.                            HWND_TOP,           /* Z-order           */
  13386.                            ID_WIN_CALENDAR_PAGE,   /* ID            */
  13387.                            NULL,               /* Control data      */
  13388.                            NULL);              /* Pres params       */
  13389.  
  13390. /********************************************************************/
  13391. /* Associate window with the inserted notebook page.                */
  13392. /********************************************************************/
  13393. WinSendMsg(hwndBook,
  13394.            BKM_SETPAGEWINDOWHWND,
  13395.            MPFROMLONG(ulPageId),
  13396.            MPFROMHWND(hwndPage));
  13397.  
  13398. /********************************************************************/
  13399. /* Window procedure.                                                */
  13400. /********************************************************************/
  13401. MRESULT EXPENTRY PageWndProc(HWND hwnd,USHORT msg,MPARAM mp1,
  13402.                              MPARAM mp2)
  13403. {
  13404.  
  13405. HPS hps;
  13406.  
  13407. switch (msg)
  13408. {
  13409.  
  13410.   /******************************************************************/
  13411.   /* WM_CREATE is sent when the window is created.                  */
  13412.   /******************************************************************/
  13413.   case  WM_CREATE :
  13414.     /****************************************************************/
  13415.     /* Place window initialization code here                        */
  13416.     /****************************************************************/
  13417.     break;
  13418.  
  13419.   case  WM_PAINT :
  13420.     /****************************************************************/
  13421.     /* Draw the calendar for the current selected year and month    */
  13422.     /****************************************************************/
  13423.     hps = WinBeginPaint(hwnd, NULL, NULL);
  13424.     drawMonthCalendar(hps, windowSize, currDate.year, currDate.month);
  13425.     WinEndPaint(hps);
  13426.     break;
  13427.  
  13428.  
  13429.   default:
  13430.     return (WinDefWindowProc(hwnd, msg, mp1, mp2));
  13431.     break;
  13432. }
  13433.  
  13434. return (FALSE);
  13435. }
  13436.  
  13437.  
  13438. ΓòÉΓòÉΓòÉ 19.2.2.1.2. Associating a Dialog with a Notebook Page ΓòÉΓòÉΓòÉ
  13439.  
  13440.  
  13441. To illustrate the notebook implemented as a dialog, a properties notebook is 
  13442. used.  In this example, the various objects whose properties can be changed or 
  13443. updated are displayed as major tabs.  Included are sections that represent a 
  13444. folder, a printer, and a display.  The printer object is currently selected. 
  13445. Within the printer object, the user can choose to "View" or "Update" the 
  13446. printer settings.  The topmost page is a printer dialog from which the user can 
  13447. update the printer name, type, and device information. 
  13448.  
  13449. Dialog Used As an Application Page Window 
  13450.  
  13451. The sample code in the following figure shows how the printer dialog is created 
  13452. and associated with a notebook page. The example ends by showing the dialog 
  13453. procedure for the associated dialog. 
  13454.  
  13455.  
  13456. Sample Code for Associating a Dialog with a Notebook Page
  13457.  
  13458. SEL          sel = NULL;
  13459. PDLGTEMPLATE pDlgt;
  13460.  
  13461. /******************************************************************/
  13462. /* Create a dialog.                                               */
  13463. /******************************************************************/
  13464. DosGetResource(NULL,RT_DIALOG,ID_DLG_PRINTDRV,&sel);
  13465. pDlgt = MAKEP(sel,0);
  13466. hwndPage = WinCreateDlg(HWND_DESKTOP,     /* Parent window handle */
  13467.                         hwndBook,         /* Owner window handle  */
  13468.                         fnwpPrint,        /* Dialog procedure     */
  13469.                                           /* address              */
  13470.                         pDlgt,            /* Dialog structure     */
  13471.                                           /* address              */
  13472.                         NULL);            /* Application data     */
  13473.  
  13474. /********************************************************************/
  13475. /* Associate dialog with the inserted notebook page.                */
  13476. /********************************************************************/
  13477. WinSendMsg(hwndBook,
  13478.            BKM_SETPAGEWINDOWHWND,
  13479.            MPFROMLONG(ulPageId),
  13480.            MPFROMHWND(hwndPage));
  13481.  
  13482. /********************************************************************/
  13483. /* Dialog procedure                                                 */
  13484. /********************************************************************/
  13485. MRESULT EXPENTRY fnwpPrint(HWND hwndDlg, USHORT msg, MPARAM mp1,
  13486.                            MPARAM mp2)
  13487. {
  13488.   switch (msg)
  13489.   {
  13490.     case WM_INITDLG:
  13491.  
  13492.       /**************************************************************/
  13493.       /* Place dialog initialization code here.                     */
  13494.       /**************************************************************/
  13495.       break;
  13496.  
  13497.     case WM_COMMAND:
  13498.       return ((MRESULT) FALSE);
  13499.       break;
  13500.  
  13501.     default:
  13502.       return WinDefDlgProc (hwndDlg,msg,mp1,mp2);
  13503.   }
  13504.   return WinDefDlgProc (hwndDlg,msg,mp1,mp2);
  13505. }
  13506.  
  13507.  
  13508. ΓòÉΓòÉΓòÉ 19.2.3. Deleting Notebook Pages ΓòÉΓòÉΓòÉ
  13509.  
  13510. The BKM_DELETEPAGE message is used to delete one or more pages from the 
  13511. notebook.  The application can delete one page (BKA_SINGLE attribute), all 
  13512. pages within a major or minor tab section (BKA_TAB attribute), or all of the 
  13513. pages in the notebook (BKA_ALL attribute). The default, if no attributes are 
  13514. specified, is to delete no pages.  The following example shows how the 
  13515. BKM_QUERYPAGEID message is used to get the ID of the top page and how the 
  13516. BKM_DELETEPAGE message is then used to delete that page. 
  13517.  
  13518.  
  13519. Sample Code for Deleting a Notebook Page
  13520.  
  13521. /**********************************************************************/
  13522. /* Set the range of pages to be deleted.                              */
  13523. /**********************************************************************/
  13524. usDeleteFlag = BKA_SINGLE      /* Set attribute to delete a single    */
  13525.                                /* page.                               */
  13526.  
  13527. /**********************************************************************/
  13528. /* Get the ID of the notebook's top page.                             */
  13529. /**********************************************************************/
  13530. ulPageId = (ULONG) WinSendMsg(
  13531.   hwndNotebook,                /* Notebook window handle              */
  13532.   BKM_QUERYPAGEID,             /* Message to query a page ID          */
  13533.   NULL,                        /* NULL for page ID                    */
  13534.   (MPARAM)BKA_TOP);            /* Get ID of top page                  */
  13535.  
  13536. /**********************************************************************/
  13537. /* Delete the notebook's top page.                                    */
  13538. /**********************************************************************/
  13539. WinSendMsg(
  13540.   hwndNotebook,                /* Notebook window handle              */
  13541.   BKM_DELETEPAGE,              /* Message to delete the page          */
  13542.   MPFROMLONG(ulPageId),        /* ID of page to be deleted            */
  13543.   (MPARAM)usDeleteFlag);       /* Range of pages to be deleted        */
  13544.  
  13545.  
  13546. ΓòÉΓòÉΓòÉ 19.3. Graphical User Interface Support ΓòÉΓòÉΓòÉ
  13547.  
  13548. The following describes the support for graphical user interfaces (GUIs) 
  13549. provided by the notebook control.  Except where noted, this support conforms to 
  13550. the guidelines in the SAA CUA Advanced Interface Design Reference. 
  13551.  
  13552. The GUI support provided by the notebook control consists of: 
  13553.  
  13554. o Notebook navigation techniques 
  13555. o Tailoring notebook colors. 
  13556.  
  13557.  
  13558. ΓòÉΓòÉΓòÉ 19.3.1. Notebook Navigation Techniques ΓòÉΓòÉΓòÉ
  13559.  
  13560. The notebook control supports the use of a pointing device and the keyboard for 
  13561. displaying notebook pages and tabs, and for moving the selection cursor from 
  13562. the notebook tabs to the application window and the other way around. The 
  13563. following describes this support. 
  13564.  
  13565. Note:  If more than one notebook window is open, displaying a page or tab in 
  13566.        one notebook window has no effect on the pages or tabs displayed in any 
  13567.        other notebook window. 
  13568.  
  13569.  
  13570. ΓòÉΓòÉΓòÉ 19.3.1.1. Pointing Device Support ΓòÉΓòÉΓòÉ
  13571.  
  13572. A user can use a pointing device to display notebook pages or tabs by selecting 
  13573. the notebook components described in the following list.  The SAA CUA Advanced 
  13574. Guide to User Interface Design defines mouse button 1 (the select button) to be 
  13575. used for selecting these components.  This definition also applies to the same 
  13576. button on any other pointing device a user might have. 
  13577.  
  13578. o Selecting tabs using a pointing device 
  13579.  
  13580.   A tab can be selected to bring a page that has a major or minor tab attribute 
  13581.   to the top of the notebook.  The selection cursor, a dotted outline, is drawn 
  13582.   inside the tab's border to indicate the selected tab.  In addition, the 
  13583.   selected tab is given the same background color as the notebook page area. 
  13584.   The color of the other tabs is specified in the BKM_SETNOTEBOOKCOLORS 
  13585.   message.  This helps the user distinguish the selected tab from the other 
  13586.   tabs if different colors are used. 
  13587.  
  13588.   Since all the tabs are mutually exclusive, only one of them can be selected 
  13589.   at a time.  Therefore, the only type of selection supported by the notebook 
  13590.   control is single selection.  This selection type conforms to the guidelines 
  13591.   in the SAA CUA Advanced Interface Design Reference. Refer to that book for 
  13592.   detailed information about single selection. 
  13593.  
  13594.   If the user moves the pointing device to a place in the notebook page window 
  13595.   that can accept a cursor, such as an entry field, check box, or radio button, 
  13596.   and presses the select button, the selection cursor is removed from the tab 
  13597.   it is on and is displayed in the notebook page window.  the selection cursor 
  13598.   never can be displayed both on a tab and in the notebook page window at the 
  13599.   same time. 
  13600.  
  13601. o Selecting page buttons using a pointing device 
  13602.  
  13603.   A forward or backward page button can be selected to display the next or 
  13604.   previous page, respectively, one at a time.  The arrow pointing to the right 
  13605.   is the forward page button, and the arrow pointing to the left is the 
  13606.   backward page button.  When the selection of a page button brings a page that 
  13607.   has a major or minor tab to the top of the notebook, the selection cursor is 
  13608.   drawn inside that tab's border. 
  13609.  
  13610. o Selecting tab scroll buttons using a pointing device 
  13611.  
  13612.   A user can decrease the size of a notebook window so that some of the 
  13613.   available notebook tabs cannot be displayed.  When this happens, the notebook 
  13614.   control automatically draws tab scroll buttons at the corners of the notebook 
  13615.   side or sides to notify the user that more tabs are available. 
  13616.  
  13617.   Tab scroll buttons have another purpose: to give the user the means to scroll 
  13618.   into view, one at a time, the tabs that are not displayed.  The user does 
  13619.   this by selecting a forward or backward tab scroll button, which causes the 
  13620.   next tab to scroll into view, but does not change the location of the 
  13621.   selection cursor.  Once the tab is in view, the user can display that tab's 
  13622.   page by selecting the tab. 
  13623.  
  13624.   A maximum of four tab scroll buttons can be displayed:  two for the major tab 
  13625.   side and two for the minor tab side. The following figure is an example of a 
  13626.   notebook with two of its tab scroll buttons displayed on the bottom left and 
  13627.   bottom right corners of the minor tab side. 
  13628.  
  13629.   Notebook with Tab Scroll Buttons Displayed 
  13630.  
  13631.   In this example, only three minor tabs are displayed because the notebook is 
  13632.   not wide enough to display more.  Here, the user can display a previous minor 
  13633.   tab by selecting the backward tab scroll button or a following minor by 
  13634.   selecting the forward tab scroll button. 
  13635.  
  13636.   When the first tab in the notebook is displayed, the backward tab scroll 
  13637.   button is deactivated.  Unavailable-state emphasis is applied to it to show 
  13638.   that no more tabs can be scrolled into view by using the backward tab scroll 
  13639.   button.  Unavailable-state emphasis is applied to the forward tab scroll 
  13640.   button if the last tab in the notebook is displayed. 
  13641.  
  13642.  
  13643. ΓòÉΓòÉΓòÉ 19.3.1.2. Keyboard Support ΓòÉΓòÉΓòÉ
  13644.  
  13645.  
  13646. A user can display notebook pages and tabs by using the following keyboard 
  13647. selection techniques. 
  13648.  
  13649. o Selecting tabs using mnemonic selection 
  13650.  
  13651.   One keyboard method of displaying notebook pages is mnemonic selection. 
  13652.   Mnemonics are underlined characters in the text of a tab that cause the tab's 
  13653.   page to be selected.  Coding a tilde (~) before a text character in the 
  13654.   BKM_SETTABTEXT message causes that character to be underlined and activates 
  13655.   it as a mnemonic-selection character. 
  13656.  
  13657.   A user performs mnemonic selection by pressing a character key that 
  13658.   corresponds to an underlined character.  When this happens, the tab that 
  13659.   contains the underlined character is selected, and that tab's page is brought 
  13660.   to the top of the notebook. 
  13661.  
  13662.   Note:  Mnemonic selection is not case sensitive, so the user can type the 
  13663.   underscored letter in either uppercase or lowercase. 
  13664.  
  13665. o Selecting tabs using the keyboard 
  13666.  
  13667.   Another method of displaying a notebook page is to use the Enter key or the 
  13668.   spacebar to select a page with a major or minor tab.  The selection cursor, 
  13669.   described earlier in this section, indicates that a tab can be selected by 
  13670.   using either of these keys.  When selected, the tab's associated page is 
  13671.   brought to the top of the notebook, and the selected tab is given the same 
  13672.   background color as the notebook page area.  The other tabs have their color 
  13673.   specified in the BKM_SETNOTEBOKKCOLORS message.  This helps the user 
  13674.   distinguish the selected tab from the other tabs if different colors are 
  13675.   used. 
  13676.  
  13677. o Moving the selection cursor from tab to tab using the keyboard 
  13678.  
  13679.   The selection cursor can be moved from tab to tab by using the Up, Down, 
  13680.   Left, and Right Arrow keys.  Pressing either the Up or Right Arrow key moves 
  13681.   the selection cursor up on a vertical row of tabs or to the right on a 
  13682.   horizontal row of tabs.  Pressing the Down or Left Arrow keys moves the 
  13683.   selection cursor down on a vertical row of tabs or to the left on a 
  13684.   horizontal row of tabs.  The page associated with the tab to which the 
  13685.   selection cursor is moved is not brought to the top of the notebook unless 
  13686.   the user selects the tab. 
  13687.  
  13688.   If the selection cursor is located on a tab that is not in view, pressing one 
  13689.   of these keys moves the selection cursor and positions the tab the selection 
  13690.   cursor is moved to in the center of the row of tabs. 
  13691.  
  13692. o Moving the selection cursor between tab positions and controls 
  13693.  
  13694.   Pressing the Tab key moves the selection cursor to the next tab position or 
  13695.   control.  Pressing the Shift+Tab key combination moves the selection cursor 
  13696.   to the previous tab position or control.  Pressing Ctrl+Tab moves the 
  13697.   selection cursor to the next control. 
  13698.  
  13699. o Displaying tabs using the keyboard 
  13700.  
  13701.   When the tab scroll buttons are displayed, the Up, Down, Left, and Right 
  13702.   Arrow keys can be used to scroll tabs into view.  For example, suppose the 
  13703.   back pages intersect at the bottom right corner and the selection cursor is 
  13704.   on the last visible tab on the right side of the notebook.  In this case, 
  13705.   pressing either the Down or Right Arrow keys causes the next tab to scroll 
  13706.   into view and moves the selection cursor to that tab.  The page associated 
  13707.   with the tab the selection cursor is moved to is not brought up to the top of 
  13708.   the notebook unless the user selects the tab. 
  13709.  
  13710. o Turning notebook pages using the keyboard 
  13711.  
  13712.   The PgUp and PgDn keys can be used to display the previous or next page, 
  13713.   respectively, one page at a time.  This is similar to using a pointing 
  13714.   device's select button to select the page buttons.  The difference is that, 
  13715.   unlike the select button, the PgUp and PgDn keys are typematic, which means 
  13716.   the notebook's pages keep turning while these keys are pressed. 
  13717.  
  13718.   If the application's primary window has the focus, the PgUp and PgDn keys 
  13719.   must be used in combination with the Alt key.  The application sends a 
  13720.   message to the notebook to turn to the previous or next page.  The current 
  13721.   top page is used as the page from which to turn. 
  13722.  
  13723.   If the notebook window has the focus, the PgUp and PgDn keys can be used 
  13724.   alone or in combination with the Alt key. 
  13725.  
  13726. o Switching the focus between the notebook window and the application's primary 
  13727.   window 
  13728.  
  13729.   The Alt+Up Arrow key combination switches the focus from the application's 
  13730.   primary window to the notebook window.  The Alt+Down Arrow key combination 
  13731.   does the opposite, switching the focus from the notebook window to the 
  13732.   application's primary window. 
  13733.  
  13734.   If the selection cursor is not in view when the focus switches from the 
  13735.   notebook window to the application's primary window, it will not be in view 
  13736.   if the focus switches back to the notebook window.  For example, the 
  13737.   selection cursor may be located on a tab that the user scrolls out of view by 
  13738.   selecting a tab scroll button.  If the user then presses the Alt+Down key 
  13739.   combination, the selection cursor appears in the application's primary 
  13740.   window.  If the user then presses the Alt+Up Arrow key combination, the 
  13741.   selection cursor returns to its last location-the tab that was not in view. 
  13742.  
  13743. o Automatic scrolling to the first or last notebook page 
  13744.  
  13745.   The Home key can be used to bring the first page of the notebook to the top. 
  13746.   Conversely, the End key brings the last page to the top of the notebook. 
  13747.  
  13748. These selection techniques conform to the descriptions in the SAA CUA Advanced 
  13749. Guide to User Interface Design.  Refer to that book for a complete description 
  13750. of the keyboard interface model. 
  13751.  
  13752.  
  13753. ΓòÉΓòÉΓòÉ 19.3.2. Tailoring Notebook Colors ΓòÉΓòÉΓòÉ
  13754.  
  13755. The application can change the color of any part of the notebook.  The colors 
  13756. of some parts can be changed by specifying a presentation parameter attribute 
  13757. or attributes in the WinSetPresParam function.  Other colors can be changed by 
  13758. specifying a notebook attribute or attributes in the BKM_SETNOTEBOOKCOLORS 
  13759. message.  The following sections define which parts of the notebook can have 
  13760. their colors changed by each of these two methods. 
  13761.  
  13762.  
  13763. ΓòÉΓòÉΓòÉ 19.3.2.1. Changing Colors Using WinSetPresParam ΓòÉΓòÉΓòÉ
  13764.  
  13765. The WinSetPresParam function is used to change the color of the notebook 
  13766. outline and window background, the selection cursor, and the status line text. 
  13767. The following list shows the mapping between the various notebook parts and 
  13768. their associated presentation parameter attributes. 
  13769.  
  13770. Notebook outline PP_BORDERCOLOR or PP_BORDERCOLORINDEX. This color is set 
  13771.     initially to SYSCLR_WINDOWFRAME. 
  13772.  
  13773. Notebook window background PP_BACKGROUNDCOLOR or PP_BACKGROUNDCOLORINDEX. This 
  13774.     color is set initially to SYSCLR_FIELDBACKGROUND. 
  13775.  
  13776. Selection cursor PP_HILITEBACKGROUNDCOLOR or PP_HILITEBACKGROUNDCOLORINDEX. 
  13777.     This color is set initially to SYSCLR_HILITEBACKGROUND. 
  13778.  
  13779. Status line text PP_FOREGROUNDCOLOR or PP_FOREGROUNDCOLORINDEX. This color is 
  13780.     initially set to SYSCLR_WINDOWTEXT. 
  13781.  
  13782. If a presentation parameter attribute is set, all parts of the notebook that 
  13783. are mapped to this color are changed. The following figure shows how to change 
  13784. the color of the notebook outline. 
  13785.  
  13786.  
  13787. Sample Code for Changing the Color of the Notebook Outline
  13788.  
  13789. usColorLen = 4;                /* Set number of bytes to be passed in */
  13790.                                /* usColorIdx for color index table    */
  13791.                                /* value.                              */
  13792. ulColorIdx = 3;                /* Set color index table value to be   */
  13793.                                /* assigned.                           */
  13794.  
  13795. /**********************************************************************/
  13796. /* Set the notebook outline color.                                    */
  13797. /**********************************************************************/
  13798. WinSetPresParam(
  13799.   hwndNotebook,                /* Notebook window handle              */
  13800.   PP_BORDERCOLOR,              /* Border color attribute              */
  13801.   usColorLen,                  /* Number of bytes in color index      */
  13802.                                /* table value                         */
  13803.   &ulColorIdx);                /* Color index table value             */
  13804.  
  13805.  
  13806. ΓòÉΓòÉΓòÉ 19.3.2.2. Changing Colors Using BKM_SETNOTEBOOKCOLORS ΓòÉΓòÉΓòÉ
  13807.  
  13808. The BKM_SETNOTEBOOKCOLORS message is used to change the color of the major tab 
  13809. background and text, the minor tab background and text, and the notebook page 
  13810. background.  The following list shows the mapping between the various notebook 
  13811. parts and their associated notebook attributes. 
  13812.  
  13813. Major tab background BKA_BACKGROUNDMAJORCOLORINDEX or BKA_BACKGROUNDMAJORCOLOR. 
  13814.     This color is set initially to SYSCLR_PAGEBACKGROUND. The currently 
  13815.     selected major tab will have the same background color as the page 
  13816.     background. 
  13817.  
  13818. Major tab text BKA_FOREGROUNDMAJORCOLORINDEX or BKA_FOREGROUNDMAJORCOLOR. This 
  13819.     color is set initially to SYSCLR_WINDOWTEXT. 
  13820.  
  13821. Minor tab background BKA_BACKGROUNDMINORCOLORINDEX or BKA_BACKGROUNDMINORCOLOR. 
  13822.     This color is set initially to SYSCLR_PAGEBACKGROUND. The currently 
  13823.     selected minor tab will have the same background color as the page 
  13824.     background. 
  13825.  
  13826. Minor tab text BKA_FOREGROUNDMINORCOLORINDEX or BKA_FOREGROUNDMINORCOLOR. This 
  13827.     color is set initially to SYSCLR_WINDOWTEXT. 
  13828.  
  13829. Notebook page background BKA_BACKGROUNDPAGECOLORINDEX or 
  13830.     BKA_BACKGROUNDPAGECOLOR. This color is set initially to 
  13831.     SYSCLR_PAGEBACKGROUND. 
  13832.  
  13833. If a notebook attribute is set, all parts of the notebook that are mapped to 
  13834. this color are changed. The following figure shows how to change the color of 
  13835. the major tab background. 
  13836.  
  13837.  
  13838. Sample Code for Changing the Color of the Major Tab Background
  13839.  
  13840. ulColorIdx = SYSCLR_WINDOW;                    /* Color index value   */
  13841. ulColorRegion = BKA_BACKGROUNDMAJORCOLORINDEX; /* Major tab background*/
  13842.  
  13843. WinSendMsg(hwndBook,
  13844.            BKM_SETNOTEBOOKCOLORS,
  13845.            MPFROMLONG(ulColorIdx),
  13846.            MPFROMLONG(ulColorRegion));
  13847.  
  13848.  
  13849. ΓòÉΓòÉΓòÉ 19.4. Enhancing Notebook Control Performance and Effectiveness ΓòÉΓòÉΓòÉ
  13850.  
  13851. This section provides the following information to enable you to fine-tune a 
  13852. notebook control: 
  13853.  
  13854. o How to dynamically resize and scroll 
  13855. o How to paint and position tabs 
  13856.  
  13857.  
  13858. ΓòÉΓòÉΓòÉ 19.4.1. Dynamic Resizing and Scrolling ΓòÉΓòÉΓòÉ
  13859.  
  13860. The notebook control supports dynamic resizing by recalculating the size of the 
  13861. notebook's parts when either the user or the application changes the size of 
  13862. any of those parts.  A BKN_NEWPAGESIZE notification code is sent from the 
  13863. notebook to the application whenever the notebook's size changes. 
  13864.  
  13865. The notebook handles the sizing and positioning of each application page window 
  13866. if the BKA_AUTOPAGESIZE attribute is specified for the inserted notebook page. 
  13867. Otherwise, the application must handle this when it receives the 
  13868. BKN_NEWPAGESIZE notification code from the notebook. 
  13869.  
  13870. If the size of the notebook window is decreased so that the page window is not 
  13871. large enough to display all the information the page contains, the information 
  13872. in the page window is clipped.  If scroll bars are desired to enable the 
  13873. clipped information to be scrolled into view, they must be provided by the 
  13874. application. 
  13875.  
  13876. Tab scroll buttons are automatically displayed if the size of the notebook is 
  13877. decreased so that all the major or minor tabs cannot be displayed.  For 
  13878. example, a notebook has major tabs on the right side, but the height of the 
  13879. notebook does not allow all the tabs to be displayed.  In this case, tab scroll 
  13880. buttons are displayed on the upper- and lower-right corners of the notebook. 
  13881.  
  13882.  
  13883. ΓòÉΓòÉΓòÉ 19.4.2. Tab Painting and Positioning ΓòÉΓòÉΓòÉ
  13884.  
  13885. The tab pages provide a method for organizing the information in a notebook so 
  13886. that the user easily can see and navigate to that information.  As described in 
  13887. Notebook Control Styles, when a page is inserted with a major or minor tab 
  13888. attribute, the notebook displays a tab for that page, based on the orientation 
  13889. of the notebook.  The contents of the tab can be painted either by the notebook 
  13890. control or the application. 
  13891.  
  13892. If the notebook control is to paint the tabs, the application must associate a 
  13893. text string or bit map with the page whose tab is to be drawn.  This is done by 
  13894. sending the BKM_SETTABTEXT or BKS_SETTABBITMAP messages to the notebook control 
  13895. for the specified page.  If neither of these messages is sent for an inserted 
  13896. page with a major or minor tab attribute, the application must draw the 
  13897. contents of the tab, through ownerdraw.  The application receives a WM_DRAWITEM 
  13898. message whenever a tab page that has no text or bit map associated with it is 
  13899. to be drawn.  The application can either draw the tab contents or return FALSE, 
  13900. in which case the notebook control fills the tab with the tab background color. 
  13901.  
  13902. Positioning Tabs in Relation to the Top Tab: 
  13903. There are seven page edges that define the back pages.  The page attribute 
  13904. (BKA_MAJOR or BKS_MINOR) and the topmost page determine how the tabs are 
  13905. positioned.  In most cases, the tabs must be drawn when their position changes. 
  13906. For example, this can happen when a page with a tab attribute is brought to the 
  13907. top of the notebook. 
  13908.  
  13909. The new top major or minor tab will appear attached to the top page. The other 
  13910. tabs will appear as described in the following list. This information is 
  13911. provided to help you understand the relationship between the top tab and the 
  13912. other tabs so that you can organize the information you put into a notebook 
  13913. appropriately. The application has no control over tab positioning. 
  13914.  
  13915. o When the top page is a major tab page: 
  13916.  
  13917.    - Any major tabs prior to the top major tab are aligned on the last page of 
  13918.      the notebook. 
  13919.  
  13920.    - Any major tabs after the top major tab are incrementally cascaded from the 
  13921.      topmost edge to the last page. 
  13922.  
  13923.    - If the top major tab has minor tabs, no major tab is drawn on the page 
  13924.      edge that immediately follows the top tab page.  Instead, any major tabs 
  13925.      that follow the top tab are incrementally cascaded beginning on the second 
  13926.      page edge down from the top tab.  This is done to account for the minor 
  13927.      tabs that are positioned between the top major tab and the major tab that 
  13928.      follows it on the perpendicular notebook edge. 
  13929.  
  13930.      The minor tabs are all positioned on the third page edge from the top, 
  13931.      thus giving the appearance of being between the top major tab and the next 
  13932.      major tab. 
  13933.  
  13934. o When the top page is a minor tab page: 
  13935.  
  13936.    - Any minor tabs prior to the top minor tab are positioned on the third page 
  13937.      edge from the top of the notebook. 
  13938.  
  13939.    - Any minor tabs after the top minor tab are incrementally cascaded up to 
  13940.      the third page edge from the top. 
  13941.  
  13942.  
  13943. ΓòÉΓòÉΓòÉ 19.5. Summary ΓòÉΓòÉΓòÉ
  13944.  
  13945. Following are the OS/2 structures, notification codes, notification messages, 
  13946. and window messages used with the notebook control: 
  13947.  
  13948. Notebook Control Structures 
  13949.  
  13950. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13951. ΓöéStructure Name          ΓöéDescription                         Γöé
  13952. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13953. ΓöéBOOKTEXT                ΓöéContains text strings for notebook  Γöé
  13954. Γöé                        Γöéstatus lines and tabs.              Γöé
  13955. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13956. ΓöéDELETENOTIFY            ΓöéContains information about the page Γöé
  13957. Γöé                        Γöébeing deleted from a notebook.      Γöé
  13958. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13959. ΓöéPAGESELECTNOTIFY        ΓöéContains information about the page Γöé
  13960. Γöé                        Γöébeing selected in a notebook.       Γöé
  13961. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  13962.  
  13963. Notebook Control Notification Codes 
  13964.  
  13965. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13966. ΓöéCode Name               ΓöéDescription                         Γöé
  13967. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13968. ΓöéBKN_HELP                ΓöéIndicates that the notebook control Γöé
  13969. Γöé                        Γöéhas received a WM_HELP message.     Γöé
  13970. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13971. ΓöéBKN_NEWPAGESIZE         ΓöéIndicates that the dimensions of theΓöé
  13972. Γöé                        Γöénotebook page window have changed.  Γöé
  13973. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13974. ΓöéBKN_PAGEDELETED         ΓöéIndicates that a page has been      Γöé
  13975. Γöé                        Γöédeleted from the notebook.          Γöé
  13976. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13977. ΓöéBKN_PAGESELECTED        ΓöéIndicates that a new page has been  Γöé
  13978. Γöé                        Γöébrought to the top of the notebook. Γöé
  13979. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  13980.  
  13981. Notebook Control Notification Messages 
  13982.  
  13983. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13984. ΓöéMessage                 ΓöéDescription                         Γöé
  13985. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13986. ΓöéWM_CONTROL              ΓöéOccurs when a control has a         Γöé
  13987. Γöé                        Γöésignificant event to notify to its  Γöé
  13988. Γöé                        Γöéowner.                              Γöé
  13989. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13990. ΓöéWM_CONTROLPOINTER       ΓöéSent to the notebook control's ownerΓöé
  13991. Γöé                        Γöéwindow when the pointing device     Γöé
  13992. Γöé                        Γöépointer moves over the notebook     Γöé
  13993. Γöé                        Γöécontrol window, enabling the owner  Γöé
  13994. Γöé                        Γöéto set the pointing device pointer. Γöé
  13995. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13996. ΓöéWM_DRAWITEM             ΓöéSent to the owner of the notebook   Γöé
  13997. Γöé                        Γöécontrol each time an item is to be  Γöé
  13998. Γöé                        Γöédrawn.                              Γöé
  13999. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14000.  
  14001. Notebook Control Window Messages 
  14002.  
  14003. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14004. ΓöéMessage                       ΓöéDescription                   Γöé
  14005. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14006. ΓöéBKM_CALCPAGERECT              ΓöéCalculates a window rectangle Γöé
  14007. Γöé                              Γöéfrom a notebook rectangle or aΓöé
  14008. Γöé                              Γöénotebook rectangle from a     Γöé
  14009. Γöé                              Γöéwindow rectangle, depending onΓöé
  14010. Γöé                              Γöéthe setting of the fPage      Γöé
  14011. Γöé                              Γöéparameter.                    Γöé
  14012. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14013. ΓöéBKM_DELETEPAGE                ΓöéDeletes the specified page or Γöé
  14014. Γöé                              Γöépages from the notebook data  Γöé
  14015. Γöé                              Γöélist.                         Γöé
  14016. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14017. ΓöéBKM_INSERTPAGE                ΓöéInserts the specified page    Γöé
  14018. Γöé                              Γöéinto the notebook data list.  Γöé
  14019. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14020. ΓöéBKM_INVALIDATETABS            ΓöéRepaints all the tabs in the  Γöé
  14021. Γöé                              Γöénotebook.                     Γöé
  14022. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14023. ΓöéBKM_QUERYPAGECOUNT            ΓöéQueries the number of pages.  Γöé
  14024. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14025. ΓöéBKM_QUERYPAGEDATA             ΓöéQueries the 4 bytes of        Γöé
  14026. Γöé                              Γöéapplication-reserved storage  Γöé
  14027. Γöé                              Γöéassociated with the specified Γöé
  14028. Γöé                              Γöépage.                         Γöé
  14029. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14030. ΓöéBKM_QUERYPAGEID               ΓöéQueries the page identifier   Γöé
  14031. Γöé                              Γöéfor the specified page.       Γöé
  14032. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14033. ΓöéBKM_QUERYPAGESTYLE            ΓöéQueries the style that was setΓöé
  14034. Γöé                              Γöéwhen the specified page was   Γöé
  14035. Γöé                              Γöéinserted.                     Γöé
  14036. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14037. ΓöéBKM_QUERYPAGEWINDOWHWND       ΓöéQueries the notebook page     Γöé
  14038. Γöé                              Γöéwindow handle associated with Γöé
  14039. Γöé                              Γöéthe specified page.           Γöé
  14040. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14041. ΓöéBKM_QUERYSTATUSLINETEXT       ΓöéQueries the status line text, Γöé
  14042. Γöé                              Γöétext size, or both, for the   Γöé
  14043. Γöé                              Γöéspecified page.               Γöé
  14044. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14045. ΓöéBKM_QUERYTABBITMAP            ΓöéQueries the bit-map handle    Γöé
  14046. Γöé                              Γöéassociated with the specified Γöé
  14047. Γöé                              Γöépage.                         Γöé
  14048. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14049. ΓöéBKM_QUERYTABTEXT              ΓöéQueries the text, text size,  Γöé
  14050. Γöé                              Γöéor both, for the specified    Γöé
  14051. Γöé                              Γöépage.                         Γöé
  14052. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14053. ΓöéBKM_SETDIMENSIONS             ΓöéSets the height and width for Γöé
  14054. Γöé                              Γöéthe major tabs, minor tabs, orΓöé
  14055. Γöé                              Γöépage buttons.                 Γöé
  14056. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14057. ΓöéBKM_SETNOTEBOOKCOLORS         ΓöéSets the colors for the major Γöé
  14058. Γöé                              Γöétab text and background, minorΓöé
  14059. Γöé                              Γöétab text and background, and  Γöé
  14060. Γöé                              Γöénotebook page background.     Γöé
  14061. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14062. ΓöéBKM_SETPAGEDATA               ΓöéSets the 4 bytes of           Γöé
  14063. Γöé                              Γöéapplication-reserved storage  Γöé
  14064. Γöé                              Γöéassociated with the specific  Γöé
  14065. Γöé                              Γöépage.                         Γöé
  14066. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14067. ΓöéBKM_SETPAGEWINDOWHWND         ΓöéAssociates a notebook page    Γöé
  14068. Γöé                              Γöéwindow handle with the        Γöé
  14069. Γöé                              Γöéspecified notebook page.      Γöé
  14070. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14071. ΓöéBKM_SETSTATUSLINETEXT         ΓöéAssociates a text string with Γöé
  14072. Γöé                              Γöéthe status line on the        Γöé
  14073. Γöé                              Γöéspecified page.               Γöé
  14074. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14075. ΓöéBKM_SETTABBITMAP              ΓöéAssociates a bit-map handle   Γöé
  14076. Γöé                              Γöéwith the specified page.      Γöé
  14077. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14078. ΓöéBKM_SETTABTEXT                ΓöéAssociates a text string with Γöé
  14079. Γöé                              Γöéthe specified page.           Γöé
  14080. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14081. ΓöéBKM_TURNTOPAGE                ΓöéBrings the specified page to  Γöé
  14082. Γöé                              Γöéthe top of the notebook.      Γöé
  14083. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14084. ΓöéWM_CHAR                       ΓöéOccurs when the user presses aΓöé
  14085. Γöé                              Γöékey.                          Γöé
  14086. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14087. ΓöéWM_PRESPARAMCHANGED           ΓöéOccurs when a presentation    Γöé
  14088. Γöé                              Γöéparameter is set or removed   Γöé
  14089. Γöé                              Γöédynamically from a window     Γöé
  14090. Γöé                              Γöéinstance.                     Γöé
  14091. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14092. ΓöéWM_SIZE                       ΓöéOccurs when the size of the   Γöé
  14093. Γöé                              Γöénotebook window changes.      Γöé
  14094. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14095.  
  14096.  
  14097. ΓòÉΓòÉΓòÉ 20. Slider Controls ΓòÉΓòÉΓòÉ
  14098.  
  14099. A slider control (WC_SLIDER window class) is a visual component that enables a 
  14100. user to set, display, or modify a value by moving the slider arm along the 
  14101. slider shaft.  This chapter explains how you can use slider controls in your PM 
  14102. applications. 
  14103.  
  14104.  
  14105. ΓòÉΓòÉΓòÉ 20.1. About Slider Controls ΓòÉΓòÉΓòÉ
  14106.  
  14107. The following figure is an example of a slider used to set a decibel value. 
  14108.  
  14109. Sample Slider 
  14110.  
  14111. The slider arm shows the value currently set by its position on the slider 
  14112. shaft. The user selects slider values by changing the location of the slider 
  14113. arm. 
  14114.  
  14115. A tick mark indicates an incremental value in a slider scale.  A detent, 
  14116. similar to a tick mark, also represents a value on the scale; however, a detent 
  14117. can be placed anywhere along the slider scale, instead of only in specific 
  14118. increments, and can be selected. 
  14119.  
  14120. Typically, sliders are used to easily set values that have familiar increments, 
  14121. such as feet, inches, degrees, decibels, and so forth.  They also can be used 
  14122. for other purposes when immediate feedback is required, such as to blend colors 
  14123. or show a task's percentage of completion.  For example, an application might 
  14124. let a user mix and match color shades by moving a slider arm, or a read-only 
  14125. slider could show how much of a task is complete by filling in the slider shaft 
  14126. as the task progresses.  These are just a few examples of the many ways in 
  14127. which sliders can be used. 
  14128.  
  14129. The appearance of and user interaction for a slider is similar to that of a 
  14130. scroll bar.  However, these two controls are not interchangeable because each 
  14131. has a unique purpose.  A scroll bar scrolls information into view that is 
  14132. outside a window's work area, while the slider is used to set, display, or 
  14133. modify that information, whether it is in or out of the work area. 
  14134.  
  14135. The slider can be customized to meet varying application requirements, while 
  14136. providing a user interface component that can be used easily to develop 
  14137. products that conform to the Common User Access (CUA) user interface 
  14138. guidelines.  The application can specify different scales, sizes, and 
  14139. orientations for its sliders, but the underlying function of the control 
  14140. remains the same.  For a complete description of CUA sliders, refer to the SAA 
  14141. CUA Guide to User Interface Design and the SAA CUA Advanced Interface Design 
  14142. Reference. 
  14143.  
  14144.  
  14145. ΓòÉΓòÉΓòÉ 20.2. Creating a Slider ΓòÉΓòÉΓòÉ
  14146.  
  14147. Before the slider is created, a temporary SLDCDATA data structure is allocated, 
  14148. and variables are specified for the slider control window handle and slider 
  14149. style.  The SLDCDATA data structure is allocated so that the scale increments 
  14150. and spacing of the slider can be specified.  Refer to the OS/2 Programming 
  14151. Reference for more information about the SLDCDATA data structure. 
  14152.  
  14153. The slider style variable enables the application to specify style bits, SLS_* 
  14154. values, that are used to customize the slider.  Refer to the OS/2 Programming 
  14155. Reference for the definitions of these values. 
  14156.  
  14157. You create a slider by using the WC_SLIDER window class name in the ClassName 
  14158. parameter of the WinCreateWindow function call.  The handle of the slider 
  14159. control window is returned in the slider window variable. 
  14160.  
  14161. After the slider is created, but before it is made visible, the application can 
  14162. set other slider control characteristics, such as: 
  14163.  
  14164. o Size and placement of tick marks 
  14165. o Text above one or more tick marks 
  14166. o One or more detents 
  14167. o Initial slider arm position. 
  14168.  
  14169. The settings in the preceding list are just a few that an application can 
  14170. specify and are the ones shown in the following sample code for creating a 
  14171. slider.  Slider control messages are used to specify these settings.  A 
  14172. detailed description of the messages is available in the OS/2 2.0 Programming 
  14173. Reference. 
  14174.  
  14175. The main components of the slider are labeled. 
  14176.  
  14177.  
  14178. Sample Code for Creating a Slider
  14179.  
  14180. SLDCDATA sldcData;             /* SLDCDATA data structure             */
  14181. CHAR     szTickText[5];        /* Text strings variable               */
  14182. USHORT   idx;                  /* Counter for setting text strings    */
  14183. HWND     hwndSlider;           /* Slider window handle                */
  14184. ULONG    ulSliderStyle;        /* Slider styles                       */
  14185.  
  14186. /**********************************************************************/
  14187. /* Initialize the parameters in the data structure.                   */
  14188. /**********************************************************************/
  14189. sldcData.cbSize = sizeof(SLDCDATA); /* Size of SLDCDATA structure     */
  14190. sldcData.usScale1Increments = 6;    /* Number of increments           */
  14191. sldcData.usScale1Spacing = 0;       /* Use 0 to have slider calculate */
  14192.                                     /* spacing                        */
  14193.  
  14194. /**********************************************************************/
  14195. /* Set the SLS_* style flags to the default values, plus slider       */
  14196. /* buttons right.                                                     */
  14197. /**********************************************************************/
  14198. ulSliderStyle = SLS_HORIZONTAL |    /* Slider is horizontal           */
  14199.                 SLS_CENTER |        /* Slider shaft centered in       */
  14200.                                     /* slider window                  */
  14201.                 SLS_HOMELEFT |      /* Home position is left edge of  */
  14202.                                     /* slider                         */
  14203.                 SLS_PRIMARYSCALE1 | /* Scale is displayed above       */
  14204.                                     /* slider shaft                   */
  14205.                 SLS_BUTTONSRIGHT;   /* Slider buttons at right end of */
  14206.                                     /* slider                         */
  14207.  
  14208. /**********************************************************************/
  14209. /* Create the slider control window.  The handle of the window is     */
  14210. /* returned in hwndSlider.                                            */
  14211. /**********************************************************************/
  14212. hwndSlider = WinCreateWindow(
  14213.                hwndClient,     /* Parent window handle                */
  14214.                WC_SLIDER,      /* Slider window class name            */
  14215.                (PSZ)NULL,      /* No window text                      */
  14216.                ulSliderStyle,  /* Slider styles variable              */
  14217.                (SHORT)10,      /* X coordinate                        */
  14218.                (SHORT)10,      /* Y coordinate                        */
  14219.                (SHORT)150,     /* Window width                        */
  14220.                (SHORT)80,      /* Window height                       */
  14221.                hwndClient,     /* Owner window handle                 */
  14222.                HWND_TOP,       /* Sibling window handle               */
  14223.                ID_SLIDER,      /* Slider control window ID            */
  14224.                &sldcData,      /* Control data structure              */
  14225.                (PVOID)NULL);   /* No presentation parameters          */
  14226.  
  14227. /**********************************************************************/
  14228. /* Set tick marks at several places on the slider shaft using the     */
  14229. /* primary scale.                                                     */
  14230. /**********************************************************************/
  14231. WinSendMsg(hwndSlider,           /* Slider window handle              */
  14232.            SLM_SETTICKSIZE,      /* Message for setting tick mark size*/
  14233.            MPFROM2SHORT(
  14234.              SMA_SETALLTICKS,    /* Attribute for setting all tick    */
  14235.                                  /* marks to the same size            */
  14236.              6),                 /* Draw tick marks 6 pixels long     */
  14237.            NULL);                /* Reserved value                    */
  14238.  
  14239. /**********************************************************************/
  14240. /* Set text above the tick marks.                                     */
  14241. /**********************************************************************/
  14242. for (idx = 0; idx <= 5; idx++)     /* Count from 0 to 5               */
  14243. {
  14244.   itoa( 10*idx, szTickText, 10 );  /* Set text at increments of 10    */
  14245.  
  14246.   WinSendMsg(hwndSlider,           /* Slider window handle            */
  14247.            SLM_SETSCALETEXT,       /* Message for setting text on a   */
  14248.                                    /* slider scale                    */
  14249.            MPFROMSHORT(idx),       /* Text string counter             */
  14250.            MPFROMPSZ(szTickText)); /* Text to put on slider scale     */
  14251. }
  14252.  
  14253. /**********************************************************************/
  14254. /* Set detents between two of the tick marks on the slider shaft.     */
  14255. /**********************************************************************/
  14256. WinSendMsg(hwndSlider,         /* Slider window handle                */
  14257.            SLM_ADDDETENT,      /* Message for adding detents to a     */
  14258.                                /* slider scale                        */
  14259.            MPFROMSHORT(5),     /* Put a detent 5 pixels from home     */
  14260.            NULL);              /* Reserved value                      */
  14261.  
  14262. WinSendMsg(hwndSlider,         /* Slider window handle                */
  14263.            SLM_ADDDETENT,      /* Message for adding detents to a     */
  14264.                                /* slider scale                        */
  14265.            MPFROMSHORT(25),    /* Put a detent 25 pixels from home    */
  14266.            NULL);              /* Reserved value                      */
  14267.  
  14268. /**********************************************************************/
  14269. /* Set the slider arm position to the 1st increment on the scale.     */
  14270. /**********************************************************************/
  14271. WinSendMsg(hwndSlider,                /* Slider window handle         */
  14272.            SLM_SETSLIDERINFO,         /* Message for setting slider   */
  14273.                                       /* attributes                   */
  14274.            MPFROM2SHORT(
  14275.              SMA_SLIDERARMPOSITION,   /* Modify slider arm position   */
  14276.              SMA_INCREMENTVALUE),     /* Use an increment value       */
  14277.            MPFROMSHORT(1);            /* Value to use is 1st          */
  14278.                                       /* increment                    */
  14279.  
  14280. /**********************************************************************/
  14281. /* Since all items have been set, make the control visible.           */
  14282. /**********************************************************************/
  14283. WinShowWindow(hwndSlider,      /* Slider window handle                */
  14284.               TRUE);           /* Make the window visible             */
  14285.  
  14286.  
  14287. ΓòÉΓòÉΓòÉ 20.3. Retrieving Data for Selected Slider Values ΓòÉΓòÉΓòÉ
  14288.  
  14289. To retrieve data represented by a slider value, specify a variable for the 
  14290. current position of the slider arm.  Then, use the SLM_QUERYSLIDERINFO message 
  14291. to retrieve information about the current slider arm position in increment 
  14292. coordinates.  The code fragment in the following figure shows how to retrieve 
  14293. data for a selected slider value. 
  14294.  
  14295.  
  14296. Retrieving a Slider Value
  14297.  
  14298. ULONG  ulValue;                /* Variable in which to store current  */
  14299.                                /* slider arm position                 */
  14300.  
  14301. /**********************************************************************/
  14302. /* Get the information about the current slider arm position in       */
  14303. /* incremental coordinates.                                           */
  14304. /**********************************************************************/
  14305. ulValue = (ULONG)WinSendMsg(
  14306.   hwndSlider,                  /* Slider window handle                */
  14307.   SLM_QUERYSLIDERINFO,         /* Message for querying slider         */
  14308.                                /* attributes                          */
  14309.   MPFROM2SHORT(
  14310.     SMA_SLIDERARMPOSITION,     /* Get increment at which slider arm   */
  14311.     SMA_INCREMENTVALUE),       /* is located                          */
  14312.   NULL);                       /* Reserved value                      */
  14313.  
  14314.  
  14315. ΓòÉΓòÉΓòÉ 20.4. Graphical User Interface Support for Sliders ΓòÉΓòÉΓòÉ
  14316.  
  14317. This section describes the support the slider control provides for graphical 
  14318. user interfaces (GUIs).  Except where noted, this support conforms to the 
  14319. guidelines in the SAA CUA Advanced Interface Design Reference. 
  14320.  
  14321. Since slider values all are mutually exclusive, only one of them can be 
  14322. selected at a time.  Therefore, the only type of selection supported by the 
  14323. slider control is single selection. 
  14324.  
  14325. Note:  If more than one slider window is open, selecting values in one slider 
  14326.        window has no effect on the values selected in any other slider window. 
  14327.        A black square is drawn in the center of the slider arm to show which 
  14328.        slider control window has the focus. 
  14329.  
  14330. An initial value is selected when the slider control first is displayed.  If 
  14331. the application does not provide the initial selection, using the 
  14332. SLM_SETSLIDERINFO message to position the slider arm, the value at the home 
  14333. position is selected automatically.  The home position is the end of the slider 
  14334. that contains the lowest value on the scale. 
  14335.  
  14336. The slider control supports the use of pointing devices and the keyboard for 
  14337. selecting values. 
  14338.  
  14339.  
  14340. ΓòÉΓòÉΓòÉ 20.4.1. Pointing Device Support ΓòÉΓòÉΓòÉ
  14341.  
  14342. A user can select slider values with a pointing device.  On a mouse, the SAA 
  14343. CUA Guide to User Interface Design defines button 1 (the select button) as the 
  14344. button for selecting values, and button 2 (the drag button) for dragging the 
  14345. slider arm to a value.  These definitions also apply to the same buttons on any 
  14346. other pointing device, such as a joystick. 
  14347.  
  14348. The select button and drag button can be used in conjunction with the following 
  14349. slider components to select slider values: 
  14350.  
  14351. o Slider arm 
  14352.  
  14353.   Moving the pointer over the slider arm, then pressing and holding the select 
  14354.   or drag buttons while moving the pointer, causes the slider arm to move in 
  14355.   the direction the pointer is moving.  When the button is released, the value 
  14356.   closest to the slider arm position becomes the selected value. 
  14357.  
  14358. o Slider shaft 
  14359.  
  14360.   Clicking the select button when the pointer is over the slider shaft causes 
  14361.   the slider arm to move one increment in the direction of the pointer. 
  14362.   Increments are determined by the initial values passed for the primary scale 
  14363.   specified (SLS_PRIMARYSCALE1 or SLS_PRIMARYSCALE2) when the slider is 
  14364.   created. 
  14365.  
  14366.   Clicking the drag button when the pointer is over the slider shaft causes the 
  14367.   slider arm to move to the pointer's location. 
  14368.  
  14369. o Slider buttons 
  14370.  
  14371.   Clicking the select button when the pointer is over a slider button causes 
  14372.   the slider arm to move one increment in the direction the arrow on the slider 
  14373.   button is pointing. 
  14374.  
  14375.   Slider buttons are optional.  If used, two slider buttons are available to 
  14376.   the user.  The arrows on top of the slider buttons point to opposite ends of 
  14377.   the slider.  Both slider buttons are positioned at the same end of the 
  14378.   slider. 
  14379.  
  14380.   Slider buttons are enabled by specifying the appropriate SLS_* value when the 
  14381.   slider control window is created.  For horizontal sliders, you can specify 
  14382.   either SLS_BUTTONSLEFT or SLS_BUTTONSRIGHT.  For vertical sliders, you can 
  14383.   specify either SLS_BUTTONSBOTTOM or SLS_BUTTONSTOP. The default is no slider 
  14384.   buttons.  If more than one of these style bits is specified, no slider 
  14385.   buttons are enabled. 
  14386.  
  14387. o Detents 
  14388.  
  14389.   A detent is similar to a tick mark on a slider scale because it represents a 
  14390.   value on the scale.  However, unlike a tick mark, a detent can be placed 
  14391.   anywhere along the slider scale instead of in specific increments. 
  14392.  
  14393.   A detent can be selected by moving the pointer over it and pressing the 
  14394.   select button on the pointing device.  When this happens, the slider arm 
  14395.   moves to the position on the slider shaft indicated by the detent. 
  14396.  
  14397.  
  14398. ΓòÉΓòÉΓòÉ 20.4.2. Keyboard Support ΓòÉΓòÉΓòÉ
  14399.  
  14400. A user can select a value by using the navigation keys to move the slider arm 
  14401. to the value or by typing a value in an entry field, if one is provided by the 
  14402. application, to change the slider arm position.  The following list describes 
  14403. these methods of selecting slider values. 
  14404.  
  14405. o Values can be selected using the Up, Down, Left, and Right Arrow keys to move 
  14406.   the slider arm one increment at a time.  The Up and Down Arrow keys are 
  14407.   enabled for vertical sliders, and the Right and Left Arrow keys are enabled 
  14408.   for horizontal sliders.  If no tick mark exists on the scale in the requested 
  14409.   direction, the slider arm does not move. 
  14410.  
  14411.   If an Arrow key is pressed in conjunction with the Shift key, the slider arm 
  14412.   moves to the next detent instead of the next tick mark.  If no detent exists 
  14413.   on the scale in the requested direction, the slider arm does not move. 
  14414.  
  14415. o The Home and End keys can be used to select the lowest and highest values, 
  14416.   respectively, in the scale.  If the Ctrl key is pressed in combination with 
  14417.   the Home or End keys, the result is the same as pressing only the Home or End 
  14418.   keys. 
  14419.  
  14420. o The application can provide an optional entry field for the slider control. 
  14421.   The entry field is a separate control, but it can work in conjunction with 
  14422.   the slider control. 
  14423.  
  14424.   If the application provides an entry field for the slider control window, it 
  14425.   must be implemented as follows: 
  14426.  
  14427.    - The user must be allowed to type a value into the entry field. 
  14428.  
  14429.    - If the typed value is within the range of the slider scale, the slider arm 
  14430.      moves to that value as soon as the value is typed. 
  14431.  
  14432.    - No other action, such as pressing the Enter key, is required. 
  14433.  
  14434. These selection techniques conform to the descriptions in the SAA CUA Guide to 
  14435. User Interface Design. 
  14436.  
  14437.  
  14438. ΓòÉΓòÉΓòÉ 20.5. Summary ΓòÉΓòÉΓòÉ
  14439.  
  14440. Following are tables that describe the OS/2 functions, structure, notification 
  14441. codes, notification messages, and window messages used with the slider control. 
  14442.  
  14443. Slider Control Functions 
  14444.  
  14445. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14446. ΓöéFunction Name           ΓöéDescription                         Γöé
  14447. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14448. ΓöéWinCreateWindow         ΓöéCreates a window.                   Γöé
  14449. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14450. ΓöéWinSendMsg              ΓöéSends a message with identity Msgid Γöé
  14451. Γöé                        Γöéto hwnd.                            Γöé
  14452. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14453. ΓöéWinShowWindow           ΓöéSets the visibility state of a      Γöé
  14454. Γöé                        Γöéwindow.                             Γöé
  14455. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14456.  
  14457. Slider Control Structure 
  14458.  
  14459. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14460. ΓöéStructure Name          ΓöéDescription                         Γöé
  14461. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14462. ΓöéSLDCDATA                ΓöéSlider control data structure.      Γöé
  14463. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14464.  
  14465. Slider Control Notification Codes 
  14466.  
  14467. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14468. ΓöéCode Name                     ΓöéDescription                   Γöé
  14469. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14470. ΓöéSLN_CHANGE                    ΓöéSent when the slider arm      Γöé
  14471. Γöé                              Γöéposition has changed.         Γöé
  14472. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14473. ΓöéSLN_KILLFOCUS                 ΓöéSent when the slider control  Γöé
  14474. Γöé                              Γöéis losing the focus.          Γöé
  14475. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14476. ΓöéSLN_SETFOCUS                  ΓöéSent when the slider control  Γöé
  14477. Γöé                              Γöéis receiving the focus.       Γöé
  14478. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14479. ΓöéSLN_SLIDERTRACK               ΓöéSent when the slider arm is   Γöé
  14480. Γöé                              Γöébeing dragged, but it has not Γöé
  14481. Γöé                              Γöébeen released.                Γöé
  14482. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14483.  
  14484. Slider Control Notification Messages 
  14485.  
  14486. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14487. ΓöéMessage                 ΓöéDescription                         Γöé
  14488. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14489. ΓöéWM_CONTROL              ΓöéOccurs when the slider control has aΓöé
  14490. Γöé                        Γöésignificant event to notify to its  Γöé
  14491. Γöé                        Γöéowner.                              Γöé
  14492. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14493. ΓöéWM_CONTROLPOINTER       ΓöéSent to the owner window of the     Γöé
  14494. Γöé                        Γöéslider control when the pointing    Γöé
  14495. Γöé                        Γöédevice pointer moves over the sliderΓöé
  14496. Γöé                        Γöécontrol window, enabling the owner  Γöé
  14497. Γöé                        Γöéwindow to set the pointer.          Γöé
  14498. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14499. ΓöéWM_DRAWITEM             ΓöéSent to the owner of the slider     Γöé
  14500. Γöé                        Γöécontrol each time an item is to be  Γöé
  14501. Γöé                        Γöédrawn.                              Γöé
  14502. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14503.  
  14504. Slider Control Window Messages 
  14505.  
  14506. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14507. ΓöéMessage                 ΓöéDescription                         Γöé
  14508. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14509. ΓöéSLM_ADDDETENT           ΓöéPlaces a detent along the slider    Γöé
  14510. Γöé                        Γöéshaft at the position specified on  Γöé
  14511. Γöé                        Γöéthe primary scale.                  Γöé
  14512. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14513. ΓöéSLM_QUERYDETENTPOS      ΓöéQueries for the current position of Γöé
  14514. Γöé                        Γöéa detent.                           Γöé
  14515. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14516. ΓöéSLM_QUERYSCALETEXT      ΓöéQueries for the text associated withΓöé
  14517. Γöé                        Γöéa tick mark for the primary scale   Γöé
  14518. Γöé                        Γöéand copies that text into a buffer. Γöé
  14519. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14520. ΓöéSLM_QUERYSLIDERINFO     ΓöéQueries the current position or     Γöé
  14521. Γöé                        Γöédimensions of a key component of theΓöé
  14522. Γöé                        Γöéslider.                             Γöé
  14523. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14524. ΓöéSLM_QUERYTICKPOS        ΓöéQueries for the current position of Γöé
  14525. Γöé                        Γöéa tick mark for the primary scale.  Γöé
  14526. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14527. ΓöéSLM_QUERYTICKSIZE       ΓöéQueries for the size of a tick mark Γöé
  14528. Γöé                        Γöéfor the primary scale.              Γöé
  14529. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14530. ΓöéSLM_REMOVEDETENT        ΓöéRemoves a previously specified      Γöé
  14531. Γöé                        Γöédetent.                             Γöé
  14532. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14533. ΓöéSLM_SETSCALETEXT        ΓöéSets text above a tick mark for the Γöé
  14534. Γöé                        Γöéprimary scale.                      Γöé
  14535. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14536. ΓöéSLM_SETSLIDERINFO       ΓöéSets the current position or        Γöé
  14537. Γöé                        Γöédimensions of a key component of theΓöé
  14538. Γöé                        Γöéslider.                             Γöé
  14539. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14540. ΓöéSLM_SETTICKSIZE         ΓöéSets the size of a tick mark for theΓöé
  14541. Γöé                        Γöéprimary scale.                      Γöé
  14542. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14543. ΓöéWM_CHAR                 ΓöéOccurs when the user presses a key. Γöé
  14544. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14545. ΓöéWM_PRESPARAMCHANGED     ΓöéSent when a presentation parameter  Γöé
  14546. Γöé                        Γöéis set or removed dynamically from aΓöé
  14547. Γöé                        Γöéwindow instance.                    Γöé
  14548. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14549. ΓöéWM_QUERYWINDOWPARAMS    ΓöéOccurs when an application queries  Γöé
  14550. Γöé                        Γöéthe window parameters.              Γöé
  14551. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14552. ΓöéWM_SETWINDOWPARAMS      ΓöéOccurs when an application sets or  Γöé
  14553. Γöé                        Γöéchanges the window parameters.      Γöé
  14554. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14555.  
  14556.  
  14557. ΓòÉΓòÉΓòÉ 21. Value Set Controls ΓòÉΓòÉΓòÉ
  14558.  
  14559. A value set control (WC_VALUESET window class), like a radio button,  is a 
  14560. visual component that enables a user to select one choice from a group of 
  14561. mutually exclusive choices.  However, unlike radio buttons, a value set can use 
  14562. graphic images (bit maps or icons), as well as colors, text, and numbers, to 
  14563. represent the items a user can select.  This chapter presents the basics about 
  14564. value set controls and tells you how to create and use them in PM applications. 
  14565.  
  14566.  
  14567. ΓòÉΓòÉΓòÉ 21.1. About Value Sets ΓòÉΓòÉΓòÉ
  14568.  
  14569. Even though text is supported, the purpose of a value set control is to display 
  14570. choices as graphic images for faster selection. The user can see the selections 
  14571. instead of having to take time to read descriptions of the choices. Using 
  14572. graphic images in a value set also lets you conserve space on the display 
  14573. screen. For example, if you want to let a user choose from a variety of 
  14574. patterns, you can present those patterns as value set choices, as shown in the 
  14575. following figure, instead of providing a list of radio buttons with a 
  14576. description of each pattern. 
  14577.  
  14578. Sample Value Set If long strings of data are to be displayed as choices, radio 
  14579. buttons should be used.  However, for small sets of numeric or textual 
  14580. information, you can use either a value set or radio buttons. 
  14581.  
  14582. The value set is customizable to meet varying application requirements, while 
  14583. providing a user interface component that can be used easily to develop 
  14584. products that conform to the Common User Access (CUA) user interface 
  14585. guidelines.  The application can specify different types of items, sizes, and 
  14586. orientations for its value sets, but the underlying function of the control 
  14587. remains the same.  For a complete description of CUA value sets, refer to the 
  14588. SAA CUA Guide to User Interface Design and the SAA CUA Advanced Interface 
  14589. Design Reference. 
  14590.  
  14591.  
  14592. ΓòÉΓòÉΓòÉ 21.1.1. Creating and Using Value Set Controls ΓòÉΓòÉΓòÉ
  14593.  
  14594. This section provides information that will enable you to create and use a 
  14595. value set control effectively. 
  14596.  
  14597.  
  14598. ΓòÉΓòÉΓòÉ 21.1.1.1. Creating a Value Set ΓòÉΓòÉΓòÉ
  14599.  
  14600. You create a value set by using the WC_VALUESET window class name in the 
  14601. ClassName parameter of the WinCreateWindow function call. 
  14602.  
  14603. Before the value set is created, a temporary VSCDATA data structure is 
  14604. allocated so that the number of rows and columns of the value set can be 
  14605. specified.  Refer to the OS/2 2.0 Programming Reference for more information 
  14606. about the VSCDATA data structure. 
  14607.  
  14608. Also, VS_* values are specified in the ulValueSetStyle variable so that the 
  14609. value set can be customized.  Refer to the OS/2 2.0 Programming Reference for 
  14610. descriptions of the value set control styles that can be specified. The sample 
  14611. code in the following figure shows the creation of a value set. 
  14612.  
  14613.  
  14614. Sample Code for Creating a Value Set
  14615.  
  14616. VSCDATA vscData;               /* VSCDATA data structure              */
  14617. HWND    hwndValueSet;          /* Value set window handle             */
  14618. ULONG   ulValueSetStyle;       /* Value set style variable            */
  14619.  
  14620. /**********************************************************************/
  14621. /* Initialize the parameters in the data structure.                   */
  14622. /**********************************************************************/
  14623. vscData.cbSize =               /* Size of value set equals size of    */
  14624.   sizeof(VSCDATA);             /* VSCDATA                             */
  14625. vscData.usRowCount = 1;        /* 1 row in the value set              */
  14626. vscData.usColumnCount = 3;     /* 3 columns in the value set          */
  14627.  
  14628. /**********************************************************************/
  14629. /* Set the VS_* style flags to customize the value set.               */
  14630. /**********************************************************************/
  14631. ulValueSetStyle =
  14632.   VS_RGB |                     /* Use colors for items.               */
  14633.   VS_ITEMBORDER |              /* Put border around each value        */
  14634.                                /* set item.                           */
  14635.   VS_BORDER;                   /* Put border around the entire        */
  14636.                                /* value set.                          */
  14637.  
  14638. /**********************************************************************/
  14639. /* Create the value set control window.  The handle of the window is  */
  14640. /* returned in hwndValueSet.                                          */
  14641. /**********************************************************************/
  14642. hwndValueSet = WinCreateWindow(
  14643.                  hwndClient,      /* Parent window handle             */
  14644.                  WC_VALUESET,     /* Value set class name             */
  14645.                  (PSZ)NULL,       /* No window text                   */
  14646.                  ulValueSetStyle, /* Value set styles                 */
  14647.                  (SHORT)10,       /* X coordinate                     */
  14648.                  (SHORT)10,       /* Y coordinate                     */
  14649.                  (SHORT)300,      /* Window width                     */
  14650.                  (SHORT)200,      /* Window height                    */
  14651.                  hwndClient,      /* Owner window handle              */
  14652.                  HWND_TOP,        /* Z-order position                 */
  14653.                  ID_VALUESET,     /* Value set window ID              */
  14654.                  &vscData,        /* Control data structure           */
  14655.                  (PVOID)NULL);    /* No presentation parameters       */
  14656.  
  14657. /**********************************************************************/
  14658. /* Set the color value for each item in each row and column.          */
  14659. /**********************************************************************/
  14660. WinSendMsg(hwndValueSet,            /* Value set window handle        */
  14661.            VM_SETITEM,              /* Message for setting items      */
  14662.            MPFROM2SHORT(1,1),       /* Set item in row 1, column 1    */
  14663.            MPFROMLONG(0x00FF0000)); /* to the color red.              */
  14664.  
  14665. WinSendMsg(hwndValueSet,            /* Value set window handle        */
  14666.            VM_SETITEM,              /* Message for setting items      */
  14667.            MPFROM2SHORT(1,2),       /* Set item in row 1, column 2    */
  14668.            MPFROMLONG(0x0000FF00)); /* to the color green.            */
  14669.  
  14670. WinSendMsg(hwndValueSet,            /* Value set window handle        */
  14671.            VM_SETITEM,              /* Message for setting items      */
  14672.            MPFROM2SHORT(1,3),       /* Set item in row 1, column 3    */
  14673.            MPFROMLONG(0x000000FF)); /* to the color blue.             */
  14674.  
  14675. /**********************************************************************/
  14676. /* Set the default selection.                                         */
  14677. /**********************************************************************/
  14678. WinSendMsg(hwndValueSet,            /* Value set window handle        */
  14679.            VM_SELECTITEM,           /* Message for selecting items    */
  14680.            MPFROM2SHORT(1,2),       /* Item in row 1, column 2        */
  14681.            NULL);                   /* Reserved value                 */
  14682.  
  14683. /**********************************************************************/
  14684. /* Since all items have been set in the control, make the control     */
  14685. /* visible.                                                           */
  14686. /**********************************************************************/
  14687. WinShowWindow(hwndValueSet,    /* Value set window handle             */
  14688.               TRUE);           /* Make the window visible             */
  14689.  
  14690.  
  14691. ΓòÉΓòÉΓòÉ 21.1.1.2. Retrieving Data for Selected Value Set Items ΓòÉΓòÉΓòÉ
  14692.  
  14693. The next step is to be able to retrieve the data represented by a value set 
  14694. item.  To do this, variables are specified for combined row and column index 
  14695. values, item attributes, and item information.  Then the VM_QUERYSELECTEDITEM, 
  14696. VM_QUERYITEMATTR, and VM_QUERYITEM messages are used to retrieve the index 
  14697. values, attributes, and data.  Refer to the descriptions of these messages in 
  14698. the OS/2 2.0 Programming Reference for more information. The sample code in the 
  14699. following figure shows how data for selected value set items is retrieved. 
  14700.  
  14701.  
  14702. Sample Code for Retrieving Data for Value Set Items
  14703.  
  14704. ULONG  ulIdx;                  /* Combined row and column index value */
  14705. USHORT usItemAttr;             /* Item attributes                     */
  14706. ULONG  ulItemData;             /* Item data                           */
  14707.  
  14708. /**********************************************************************/
  14709. /* Get the row and column index values of the item selected by the    */
  14710. /* user.  These values are returned in the ulIdx parameter.           */
  14711. /**********************************************************************/
  14712. ulIdx = (ULONG)WinSendMsg(
  14713.   hwndValueSet,                /* Value set window handle             */
  14714.   VM_QUERYSELECTEDITEM,        /* Message for querying the selected   */
  14715.                                /* item                                */
  14716.   NULL, NULL);                 /* Reserved values                     */
  14717.  
  14718. /**********************************************************************/
  14719. /* Determine the type of item that was selected. This message is      */
  14720. /* only to determine how to interpret item data when a value set      */
  14721. /* contains different types of items.                                 */
  14722. /**********************************************************************/
  14723. usItemAttr = (USHORT)WinSendMsg(
  14724.   hwndValueSet,                /* Value set window handle             */
  14725.   VM_QUERYITEMATTR,            /* Message for querying item attribute */
  14726.   MPFROMLONG(ulIdx),           /* Row and column of selected item     */
  14727.   NULL);                       /* Reserved value                      */
  14728.  
  14729. /**********************************************************************/
  14730. /* Get the information about the selected (non-textual) item.  If you */
  14731. /* are dealing with text, you need to allocate a buffer for the text  */
  14732. /* string.                                                            */
  14733. /**********************************************************************/
  14734. ulItemData = (ULONG)WinSendMsg(
  14735.   hwndValueSet,                /* Value set window handle             */
  14736.   VM_QUERYITEM,                /* Message for querying an item        */
  14737.   MPFROMLONG(ulIdx),           /* Row and column of selected item     */
  14738.   NULL);                       /* Set to NULL because the item is not */
  14739.                                /* a text item.                        */
  14740.  
  14741.  
  14742. ΓòÉΓòÉΓòÉ 21.1.1.3. Arranging Value Set Items ΓòÉΓòÉΓòÉ
  14743.  
  14744. The application defines the arrangement of value set items; they can be 
  14745. arranged in one or more rows, columns, or both.  Items are placed from left to 
  14746. right in rows and from top to bottom in columns.  The application can change 
  14747. the number of rows and columns at any time. 
  14748.  
  14749. The number of items that can be displayed depends on the number of items that 
  14750. fit into the spaces provided by the defined rows and columns.  If the number of 
  14751. items exceeds the number of spaces, the excess items are not displayed. 
  14752.  
  14753. You can change the composition of a value set by specifying new items.  The new 
  14754. items either can be added to the value set or can replace existing items. 
  14755.  
  14756.  
  14757. ΓòÉΓòÉΓòÉ 21.2. Graphical User Interface Support ΓòÉΓòÉΓòÉ
  14758.  
  14759. This section describes the support the value set control provides for graphical 
  14760. user interfaces (GUIs).  Except where noted, this support conforms to the 
  14761. guidelines in the SAA CUA Advanced Interface Design Reference. 
  14762.  
  14763. The GUI support provided by the value set control consists of: 
  14764.  
  14765. o Navigating to and selecting value set items 
  14766. o Dynamic resizing. 
  14767.  
  14768.  
  14769. ΓòÉΓòÉΓòÉ 21.2.1. Navigating to and Selecting Value Set Items ΓòÉΓòÉΓòÉ
  14770.  
  14771. Since all value set items are mutually exclusive, only one of them can be 
  14772. selected at a time.  Therefore, the only type of selection supported by the 
  14773. value set control is single selection.  This selection type conforms to the 
  14774. guidelines in the SAA CUA Advanced Interface Design Reference.  Refer to that 
  14775. book for detailed information about single selection. 
  14776.  
  14777. Note:  If more than one value set window is open, navigating to and selecting 
  14778.        items in one value set window has no affect on the items displayed in 
  14779.        any other value set window. 
  14780.  
  14781. An initial choice is selected when the value set control is first displayed. 
  14782. If the application does not provide the initial selection by using the 
  14783. VM_SELECTITEM message, the choice in row 1, column 1 is selected automatically. 
  14784.  
  14785. The value set control supports the use of a pointing device, such as a mouse, 
  14786. and the keyboard for navigating to and selecting items, except for items that 
  14787. are dimmed on the screen.  This dimming of items is called unavailable-state 
  14788. emphasis and indicates that the items cannot be selected.  However, the 
  14789. selection cursor, a dotted outline that usually indicates that an item can be 
  14790. selected, can be moved to unavailable items so that a user can press F1 to 
  14791. determine why they cannot be selected.  The following sections describe the 
  14792. pointing device and keyboard support for the value set control. 
  14793.  
  14794.  
  14795. ΓòÉΓòÉΓòÉ 21.2.1.1. Pointing Device Support ΓòÉΓòÉΓòÉ
  14796.  
  14797. A user can use a pointing device to select value set items.  The SAA CUA Guide 
  14798. to User Interface Design defines mouse button 1, the select button, to be used 
  14799. for selecting items.  This definition also applies to the same button on any 
  14800. other pointing device. 
  14801.  
  14802. An item can be selected by moving the pointer of the pointing device to the 
  14803. item and clicking the select button.  When this happens, a black box is drawn 
  14804. around the item to show that it has been selected.  The black box is called 
  14805. selected-state emphasis.  In addition, the selection cursor is drawn inside the 
  14806. black box. 
  14807.  
  14808.  
  14809. ΓòÉΓòÉΓòÉ 21.2.1.2. Keyboard Support ΓòÉΓòÉΓòÉ
  14810.  
  14811. The value set control supports automatic selection, which means that an 
  14812. available item is selected when the selection cursor is moved to that item. 
  14813. The item is given selected-state emphasis as soon as the selection cursor is 
  14814. moved to it.  No further action, such as pressing the spacebar, is required. 
  14815. The same black box and dotted outline are used, for selected-state emphasis and 
  14816. the selection cursor respectively, as when an item is selected with a pointing 
  14817. device. 
  14818.  
  14819. A user can navigate to and select an item by using either the navigation keys 
  14820. or mnemonic selection to move the selection cursor to the item, as described in 
  14821. the following list: 
  14822.  
  14823. o Items can be selected using the Up, Down, Left, and Right Arrow keys to move 
  14824.   the selection cursor from one item to another. 
  14825.  
  14826. o The Home and End keys can be used to select the leftmost and rightmost items, 
  14827.   respectively, in the current row. If the Ctrl key is pressed in combination 
  14828.   with the Home or End key, the item in the top row and the leftmost column, or 
  14829.   the item in the bottom row and the rightmost column, respectively, is 
  14830.   selected. 
  14831.  
  14832.   Note:  The preceding description assumes that the current style of the value 
  14833.          set window is left-to-right.  However, if the VS_RIGHTTOLEFT style bit 
  14834.          is set, the directions described for the Home, End, Ctrl+Home, and 
  14835.          Ctrl+End keys in the preceding paragraph are reversed. 
  14836.  
  14837. o The PgUp key can be used to select the item in the top row that is directly 
  14838.   above the current position of the selection cursor.  The PgDn key can be used 
  14839.   to select the item in the bottom row that is directly below the current 
  14840.   position of the selection cursor.  If the space in the top or bottom row 
  14841.   directly above or below the current cursor position is blank, the cursor 
  14842.   moves to the blank space. 
  14843.  
  14844. o Another keyboard method of selecting items is mnemonic selection.  A user 
  14845.   performs mnemonic selection by pressing a character key that corresponds to 
  14846.   an underlined character.  Coding a tilde (~) before a text character in the 
  14847.   item causes that character to be underlined and activates it as a mnemonic 
  14848.   selection character.  When this happens, the selection cursor is moved to the 
  14849.   item that contains the underlined character, and that item is selected. 
  14850.  
  14851. These selection techniques conform to the descriptions in the SAA CUA Guide to 
  14852. User Interface Design.  Refer to the SAA CUA Guide to User Interface Design for 
  14853. a complete description of the keyboard interface model. 
  14854.  
  14855.  
  14856. ΓòÉΓòÉΓòÉ 21.2.2. Dynamic Resizing ΓòÉΓòÉΓòÉ
  14857.  
  14858. The value set control supports dynamic resizing if the application sends the 
  14859. WM_SIZE message to a value set window.  This means that the value set control 
  14860. automatically recalculates the size of the items when either the user or the 
  14861. application changes the size of the value set window. 
  14862.  
  14863. If the value set window's size is decreased so that the window is not large 
  14864. enough to display all of the items the value set contains, the items are 
  14865. clipped.  If scroll bars are desired to allow the clipped information to be 
  14866. scrolled into view, they must be provided by the application. 
  14867.  
  14868.  
  14869. ΓòÉΓòÉΓòÉ 21.3. Summary ΓòÉΓòÉΓòÉ
  14870.  
  14871. The following tables describe the OS/2 structures, functions, notification 
  14872. codes, notification messages, and window messages used with value set controls. 
  14873.  
  14874. Value Set Control Structures 
  14875.  
  14876. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14877. ΓöéStructure Name          ΓöéDescription                         Γöé
  14878. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14879. ΓöéVSCDATA                 ΓöéContains information about the valueΓöé
  14880. Γöé                        Γöéset control.                        Γöé
  14881. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14882. ΓöéVSDRAGINFO              ΓöéContains information about direct   Γöé
  14883. Γöé                        Γöémanipulation actions that occur overΓöé
  14884. Γöé                        Γöéthe value set control.              Γöé
  14885. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14886. ΓöéVSDRAGINIT              ΓöéContains information that is used toΓöé
  14887. Γöé                        Γöéinitialize a direct manipulation    Γöé
  14888. Γöé                        Γöéaction over the value set control.  Γöé
  14889. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14890. ΓöéVSTEXT                  ΓöéContains value set text.  Used only Γöé
  14891. Γöé                        Γöéwith the VM_QUERYITEM message.      Γöé
  14892. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14893.  
  14894. Value Set Control Functions 
  14895.  
  14896. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14897. ΓöéFunction Name           ΓöéDescription                         Γöé
  14898. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14899. ΓöéWinCreateWindow         ΓöéCreates a new window.               Γöé
  14900. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14901. ΓöéWinSendMsg              ΓöéSends a message to a window.        Γöé
  14902. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14903. ΓöéWinShowWindow           ΓöéSets the visibility state of a      Γöé
  14904. Γöé                        Γöéwindow                              Γöé
  14905. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14906.  
  14907. Value Set Control Notification Codes 
  14908.  
  14909. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14910. ΓöéCode Name               ΓöéDescription                         Γöé
  14911. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14912. ΓöéVN_DRAGLEAVE            ΓöéSent when the value set receives a  Γöé
  14913. Γöé                        ΓöéDM_DRAGLEAVE message.               Γöé
  14914. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14915. ΓöéVN_DRAGOVER             ΓöéSent when the value set receives a  Γöé
  14916. Γöé                        ΓöéDM_DRAGOVER message.                Γöé
  14917. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14918. ΓöéVN_DROP                 ΓöéSent when the value set receives a  Γöé
  14919. Γöé                        ΓöéDM_DROPHELP message.                Γöé
  14920. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14921. ΓöéVN_DROPHELP             ΓöéSent when the value set receives a  Γöé
  14922. Γöé                        ΓöéDM_DROPHELP message.                Γöé
  14923. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14924. ΓöéVN_ENTER                ΓöéSent when the user presses the EnterΓöé
  14925. Γöé                        Γöékey while the value set window has  Γöé
  14926. Γöé                        Γöéthe focus, or when the user         Γöé
  14927. Γöé                        Γöédouble-clicks the select button     Γöé
  14928. Γöé                        Γöéwhile the pointer is over an item inΓöé
  14929. Γöé                        Γöéthe value set.                      Γöé
  14930. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14931. ΓöéVN_HELP                 ΓöéSent when the value set receives a  Γöé
  14932. Γöé                        ΓöéWM_HELP message.                    Γöé
  14933. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14934. ΓöéVN_INITDRAG             ΓöéSent when the drag button is pressedΓöé
  14935. Γöé                        Γöéand the pointer is moved while over Γöé
  14936. Γöé                        Γöéthe value set control.              Γöé
  14937. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14938. ΓöéVN_KILLFOCUS            ΓöéSent when the value set loses the   Γöé
  14939. Γöé                        Γöéfocus.                              Γöé
  14940. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14941. ΓöéVN_SELECT               ΓöéSent when an item in the value set  Γöé
  14942. Γöé                        Γöéis selected and given selected-stateΓöé
  14943. Γöé                        Γöéemphasis.                           Γöé
  14944. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14945. ΓöéVN_SETFOCUS             ΓöéSent when the value set receives theΓöé
  14946. Γöé                        Γöéfocus.                              Γöé
  14947. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14948.  
  14949. Value Set Control Notification Messages 
  14950.  
  14951. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14952. ΓöéMessage                 ΓöéDescription                         Γöé
  14953. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14954. ΓöéWM_CONTROL              ΓöéOccurs when the value set control   Γöé
  14955. Γöé                        Γöéhas a significant event to notify toΓöé
  14956. Γöé                        Γöéits owner.                          Γöé
  14957. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14958. ΓöéWM_CONTROLPOINTER       ΓöéSent to the owner window of the     Γöé
  14959. Γöé                        Γöévalue set control when the pointing Γöé
  14960. Γöé                        Γöédevice pointer moves over the value Γöé
  14961. Γöé                        Γöéset control window, enabling the    Γöé
  14962. Γöé                        Γöépointer to be set.                  Γöé
  14963. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14964. ΓöéWM_DRAWITEM             ΓöéSent to the owner of the value set  Γöé
  14965. Γöé                        Γöécontrol each time an item is to be  Γöé
  14966. Γöé                        Γöédrawn.                              Γöé
  14967. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14968.  
  14969. Value Set Control Window Messages 
  14970.  
  14971. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14972. ΓöéMessage                       ΓöéDescription                   Γöé
  14973. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14974. ΓöéVM_QUERYITEM                  ΓöéQueries the contents of the   Γöé
  14975. Γöé                              Γöéitem indicated by the row and Γöé
  14976. Γöé                              Γöécolumn values.                Γöé
  14977. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14978. ΓöéVM_QUERYITEMATTR              ΓöéQueries the attributes of the Γöé
  14979. Γöé                              Γöéitem indicated by the row and Γöé
  14980. Γöé                              Γöécolumn values.                Γöé
  14981. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14982. ΓöéVM_QUERYMETRICS               ΓöéQueries the current size of   Γöé
  14983. Γöé                              Γöéeach value set item or the    Γöé
  14984. Γöé                              Γöéspacing between items.        Γöé
  14985. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14986. ΓöéVM_QUERYSELECTEDITEM          ΓöéQueries for the currently     Γöé
  14987. Γöé                              Γöéselected value set item       Γöé
  14988. Γöé                              Γöéindicated by the row and      Γöé
  14989. Γöé                              Γöécolumn values.                Γöé
  14990. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14991. ΓöéVM_SELECTITEM                 ΓöéSelects the value set item    Γöé
  14992. Γöé                              Γöéindicated by the row and      Γöé
  14993. Γöé                              Γöécolumn values.                Γöé
  14994. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14995. ΓöéVM_SETITEM                    ΓöéSpecifies the type of         Γöé
  14996. Γöé                              Γöéinformation that will be      Γöé
  14997. Γöé                              Γöécontained by a value set item.Γöé
  14998. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14999. ΓöéVM_SETITEMATTR                ΓöéSets the attributes of the    Γöé
  15000. Γöé                              Γöéitem indicated by the row and Γöé
  15001. Γöé                              Γöécolumn values.                Γöé
  15002. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15003. ΓöéVM_SETMETRICS                 ΓöéSets the size of each item in Γöé
  15004. Γöé                              Γöéthe value set control, the    Γöé
  15005. Γöé                              Γöéspacing between items, or     Γöé
  15006. Γöé                              Γöéboth.                         Γöé
  15007. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15008. ΓöéWM_CHAR                       ΓöéOccurs when the user presses aΓöé
  15009. Γöé                              Γöékey.                          Γöé
  15010. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15011. ΓöéWM_PRESPARAMCHANGED           ΓöéSent when a presentation      Γöé
  15012. Γöé                              Γöéparameter is set or removed   Γöé
  15013. Γöé                              Γöédynamically from a window     Γöé
  15014. Γöé                              Γöéinstance.                     Γöé
  15015. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15016. ΓöéWM_QUERYWINDOWPARAMS          ΓöéOccurs when an application    Γöé
  15017. Γöé                              Γöéqueries the window parameters.Γöé
  15018. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15019. ΓöéWM_SETWINDOWPARAMS            ΓöéOccurs when an application    Γöé
  15020. Γöé                              Γöésets or changes the window    Γöé
  15021. Γöé                              Γöéparameters.                   Γöé
  15022. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15023.  
  15024.  
  15025. ΓòÉΓòÉΓòÉ 22. Keyboard Accelerators ΓòÉΓòÉΓòÉ
  15026.  
  15027. A keyboard accelerator (shortcut key to the user) is a keystroke that generates 
  15028. a command message for an application.  This chapter describes how to use 
  15029. keyboard accelerators in your PM applications. 
  15030.  
  15031.  
  15032. ΓòÉΓòÉΓòÉ 22.1. About Keyboard Accelerators ΓòÉΓòÉΓòÉ
  15033.  
  15034. Using a keyboard accelerator has the same effect as choosing a menu item. 
  15035. While menus provide an easy way to learn an application's command set, 
  15036. accelerators provide quick access to those commands. 
  15037.  
  15038. Without accelerators, a user might generate commands by pressing the Alt key to 
  15039. access the menu bar, using the Arrow keys to select an item, then pressing the 
  15040. Enter key to choose the item.  In contrast, accelerators allow the user to 
  15041. generate commands with a single keystroke. The following figure shows examples 
  15042. of accelerators. 
  15043.  
  15044. Accelerators 
  15045.  
  15046. Like menu items, accelerators can generate WM_COMMAND, WM_HELP, and 
  15047. WM_SYSCOMMAND messages.  Although, normally, accelerators are used to generate 
  15048. existing commands as menu items, they also can send commands that have no 
  15049. menu-item equivalent. 
  15050.  
  15051.  
  15052. ΓòÉΓòÉΓòÉ 22.1.1. Accelerator Tables ΓòÉΓòÉΓòÉ
  15053.  
  15054. An accelerator table contains an array of accelerators.  Accelerator tables 
  15055. exist at two levels within the operating system: a single accelerator table for 
  15056. the system queue and individual accelerator tables for application windows. 
  15057. Accelerators in the system queue apply to all applications-for example, the F1 
  15058. key always generates a WM_HELP message.  Having accelerators for individual 
  15059. application windows ensures that an application can define its own accelerators 
  15060. without interfering with other applications.  An accelerator for an application 
  15061. window can override the accelerator in the system queue.  An application can 
  15062. modify both its own accelerator table and the system's accelerator table. 
  15063.  
  15064. The application can set and query the accelerator table for a specific window 
  15065. or for the entire system.  For example, an application can query the system 
  15066. accelerator table, copy it, modify the copied data structures; and then, use 
  15067. the modified copy to set the system accelerator table.  An application also can 
  15068. modify its window's accelerator table at run time to respond more appropriately 
  15069. to the current environment. 
  15070.  
  15071. Note:  An application that modifies any accelerator table other than its own 
  15072. should maintain the original accelerator table; and, before terminating, 
  15073. restore that table. 
  15074.  
  15075.  
  15076. ΓòÉΓòÉΓòÉ 22.1.2. Accelerator-Table Resources ΓòÉΓòÉΓòÉ
  15077.  
  15078. You can use accelerators in an application by creating an accelerator-table 
  15079. resource in a resource-definition file.  Then, when the application creates a 
  15080. standard frame window, the application can associate that window with the 
  15081. resource. 
  15082.  
  15083. As specified in a resource-definition file, an accelerator table consists of a 
  15084. list of accelerator items, each defining the keystroke that triggers the 
  15085. accelerator, the command the accelerator generates, and the accelerator's 
  15086. style.  The style specifies whether the keystroke is a virtual key, a 
  15087. character, or a scan code, and whether the generated message is WM_COMMAND, 
  15088. WM_SYSCOMMAND, or WM_HELP; WM_COMMAND is the default. 
  15089.  
  15090.  
  15091. ΓòÉΓòÉΓòÉ 22.1.3. Accelerator-Table Handles ΓòÉΓòÉΓòÉ
  15092.  
  15093. Applications that use accelerator tables refer to them with a 32-bit handle. 
  15094. An application using this handle, by default, can make most API function calls 
  15095. for accelerators without having to account for the internal structures that 
  15096. define the accelerator table.  When an application needs to dynamically create 
  15097. or change an accelerator table, it must use the ACCEL and ACCELTABLE data 
  15098. structures. 
  15099.  
  15100.  
  15101. ΓòÉΓòÉΓòÉ 22.1.4. Accelerator-Table Data Structures ΓòÉΓòÉΓòÉ
  15102.  
  15103. An accelerator table consists of individual accelerator items.  Each item in 
  15104. the table is represented by an ACCEL structure that defines the accelerator's 
  15105. style, keystroke, and command identifier.  Typically, an application defines 
  15106. these aspects of an accelerator in a resource-definition file, but the ACCEL 
  15107. structure also can be built in memory at run time. 
  15108.  
  15109. An accelerator table is represented by an ACCELTABLE structure that specifies 
  15110. the number of accelerator items in the table, the code page used for the 
  15111. keystrokes in the accelerator items, and an array of ACCEL structures (one for 
  15112. each item in the table).  Applications that use ACCELTABLE structures directly 
  15113. must allocate sufficient memory to hold all the items in the table. 
  15114.  
  15115.  
  15116. ΓòÉΓòÉΓòÉ 22.1.5. Accelerator-Item Styles ΓòÉΓòÉΓòÉ
  15117.  
  15118. An accelerator item has a style that determines what combination of keys 
  15119. produces the accelerator and what command message is generated by the 
  15120. accelerator.  An application can specify the following accelerator-item styles 
  15121. in the fs field of the ACCEL structure: 
  15122.  
  15123. Accelerator-Item Styles 
  15124.  
  15125. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15126. ΓöéStyle          ΓöéDescription                                  Γöé
  15127. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15128. ΓöéAF_ALT         ΓöéSpecifies that the user must hold down the   Γöé
  15129. Γöé               ΓöéAlt key while pressing the accelerator key.  Γöé
  15130. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15131. ΓöéAF_CHAR        ΓöéSpecifies that the keystroke is a character  Γöé
  15132. Γöé               Γöéthat is translated using the code page for   Γöé
  15133. Γöé               Γöéthe accelerator table. (This is the default  Γöé
  15134. Γöé               Γöéstyle.)                                      Γöé
  15135. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15136. ΓöéAF_CONTROL     ΓöéSpecifies that the user must hold down the   Γöé
  15137. Γöé               ΓöéCtrl key while pressing the accelerator key. Γöé
  15138. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15139. ΓöéAF_HELP        ΓöéSpecifies that the accelerator generates a   Γöé
  15140. Γöé               ΓöéWM_HELP message instead of a WM_COMMAND      Γöé
  15141. Γöé               Γöémessage.                                     Γöé
  15142. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15143. ΓöéAF_LONEKEY     ΓöéSpecifies that the user need not press       Γöé
  15144. Γöé               Γöéanother key while the accelerator key is     Γöé
  15145. Γöé               Γöédown.  Typically, this style is used with theΓöé
  15146. Γöé               ΓöéAlt key to specify that simply pressing and  Γöé
  15147. Γöé               Γöéreleasing that key triggers the accelerator. Γöé
  15148. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15149. ΓöéAF_SCANCODE    ΓöéSpecifies that the keystroke is an           Γöé
  15150. Γöé               Γöéuntranslated scan code from the keyboard.    Γöé
  15151. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15152. ΓöéAF_SHIFT       ΓöéSpecifies that the user must hold down the   Γöé
  15153. Γöé               ΓöéShift key when pressing the accelerator key. Γöé
  15154. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15155. ΓöéAF_SYSCOMMAND  ΓöéSpecifies that the accelerator generates a   Γöé
  15156. Γöé               ΓöéWM_SYSCOMMAND message instead of a WM_COMMANDΓöé
  15157. Γöé               Γöémessage.                                     Γöé
  15158. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15159. ΓöéVIRTUALKEY     ΓöéSpecifies that the keystroke is a virtual    Γöé
  15160. Γöé               Γöékey-for example, the F1 function key.        Γöé
  15161. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15162.  
  15163.  
  15164. ΓòÉΓòÉΓòÉ 22.2. Using Keyboard Accelerators ΓòÉΓòÉΓòÉ
  15165.  
  15166. This section explains how to perform the following tasks: 
  15167.  
  15168. o Create an accelerator-table resource. 
  15169. o Include an accelerator table in a frame window. 
  15170. o Modify an accelerator table. 
  15171.  
  15172.  
  15173. ΓòÉΓòÉΓòÉ 22.2.1. Creating an Accelerator-Table Resource ΓòÉΓòÉΓòÉ
  15174.  
  15175. The following code fragment shows a typical accelerator-table resource: 
  15176.  
  15177.  
  15178.     ACCELTABLE ID_ACCEL_RESOURCE
  15179.     BEGIN
  15180.         VK_ESC,    IDM_ED_UNDO,  AF_VIRTUALKEY | AF_SHIFT
  15181.         VK_DELETE, IDM_ED_CUT,   AF_VIRTUALKEY
  15182.         VK_F2,     IDM_ED_COPY,  AF_VIRTUALKEY
  15183.         VK_INSERT, IDM_ED_PASTE, AF_VIRTUALKEY
  15184.     END
  15185.  
  15186. This accelerator table has four accelerator items. The first one is triggered 
  15187. when the user presses Shift+Esc, which sends a WM_COMMAND message (the 
  15188. default). 
  15189.  
  15190. An accelerator table in a resource-definition file has an identifier 
  15191. (ID_ACCEL_RESOURCE in the previous example).  You can associate an 
  15192. accelerator-table resource with a standard frame window by specifying the 
  15193. table's resource identifier as the idResources parameter of the 
  15194. WinCreateStdWindow function. 
  15195.  
  15196. An application can load an accelerator table resource-definition file 
  15197. automatically when creating a standard frame window, or it can load the 
  15198. resource independently and associate it with a window or with the entire 
  15199. system. 
  15200.  
  15201.  
  15202. ΓòÉΓòÉΓòÉ 22.2.2. Including an Accelerator Table in a Frame Window ΓòÉΓòÉΓòÉ
  15203.  
  15204. You can add an accelerator table to a frame window either by using the 
  15205. WinSetAccelTable function or by defining an accelerator-table resource (as 
  15206. shown in the previous section) and creating a frame window with the 
  15207. FCF_ACCELTABLE frame style. The second method is shown in the following code 
  15208. fragment: 
  15209.  
  15210.  
  15211.     HWND  hwndFrame,hwndClient;
  15212.     CHAR  szClassName[]="MyClass";
  15213.     CHAR  szTitle[]="MyWindow";
  15214.  
  15215.     ULONG flControlStyle = FCF_SIZEBORDER | FCF_ACCELTABLE |
  15216.                            FCF_TITLEBAR   | FCF_MENU;
  15217.  
  15218.     hwndFrame = WinCreateStdWindow(HWND_DESKTOP,
  15219.         WS_VISIBLE,
  15220.         &flControlStyle,
  15221.         szClassName,
  15222.         szTitle,
  15223.         0,
  15224.         (HMODULE)NULL,
  15225.         ID_MENU_RESOURCE,
  15226.         &hwndClient);
  15227.  
  15228. Notice that if you set the flControlStyle parameter to the FCF_STANDARD flag, 
  15229. you must define an accelerator-table resource, because FCF_STANDARD includes 
  15230. the FCF_ACCELTABLE flag. 
  15231.  
  15232. If the window being created also has a menu, the menu resource and accelerator 
  15233. resource must have the same resource identifier; this is because the 
  15234. WinCreateStdWindow function has only one input parameter to specify the 
  15235. resource identifiers for menus, accelerator tables, and icons.  If an 
  15236. application creates an accelerator table resource-definition file; then, opens 
  15237. a standard frame window (as shown in the preceding example), the accelerator 
  15238. table is installed automatically in the window's message queue, and keyboard 
  15239. events are translated during the normal processing of events.  The application 
  15240. simply responds to WM_COMMAND, WM_SYSCOMMAND, and WM_HELP messages; it does not 
  15241. matter whether these messages come from a menu or an accelerator. 
  15242.  
  15243. An application also can add an accelerator table to a window by calling the 
  15244. WinSetAccelTable function with an accelerator-table handle and a frame-window 
  15245. handle.  The application can call either the WinLoadAccelTable function to 
  15246. retrieve an accelerator table from a resource file or the WinCreateAccelTable 
  15247. function to create an accelerator table from an accelerator-table data 
  15248. structure in memory. 
  15249.  
  15250.  
  15251. ΓòÉΓòÉΓòÉ 22.2.3. Modifying an Accelerator Table ΓòÉΓòÉΓòÉ
  15252.  
  15253. You can modify an accelerator table, for either your application windows or the 
  15254. system, by doing the following: 
  15255.  
  15256.  1. Retrieve the handle of the accelerator table. 
  15257.  
  15258.  2. Use that handle to copy the accelerator-table data to an 
  15259.     application-supplied buffer. 
  15260.  
  15261.  3. Change the data in the buffer. 
  15262.  
  15263.  4. Use the changed data to create a new accelerator table. 
  15264.  
  15265. Then you can use the new accelerator-table handle to set the accelerator table, 
  15266. as outlined in the following list: 
  15267.  
  15268.  1. Call WinQueryAccelTable to retrieve an accelerator-table handle. 
  15269.  
  15270.  2. Call WinCopyAccelTable with a NULL buffer handle to determine how many 
  15271.     bytes are in the table. 
  15272.  
  15273.  3. Allocate sufficient memory for the accelerator-table data. 
  15274.  
  15275.  4. Call WinCopyAccelTable, with a pointer to the allocated memory. 
  15276.  
  15277.  5. Modify the data in the buffer (assuming it has the form of an ACCELTABLE 
  15278.     structure). 
  15279.  
  15280.  6. Call WinCreateAccelTable, passing a pointer to the buffer with the modified 
  15281.     accelerator-table data. 
  15282.  
  15283.  7. Call WinSetAccelTable with the handle returned by WinCreateAccelTable. 
  15284.  
  15285.  
  15286. ΓòÉΓòÉΓòÉ 22.3. Summary ΓòÉΓòÉΓòÉ
  15287.  
  15288. Following are the OS/2 functions, structures, and messages used with 
  15289. accelerator tables: 
  15290.  
  15291. Accelerator-Table Functions 
  15292.  
  15293. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15294. ΓöéFunction name           ΓöéDescription                         Γöé
  15295. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15296. ΓöéWinCopyAccelTable       ΓöéUsed to get the accelerator table   Γöé
  15297. Γöé                        Γöécorresponding to an                 Γöé
  15298. Γöé                        Γöéaccelerator-table handle, or to     Γöé
  15299. Γöé                        Γöédetermine the size of the           Γöé
  15300. Γöé                        Γöéaccelerator-table data.             Γöé
  15301. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15302. ΓöéWinCreateAccelTable     ΓöéCreates an accelerator table from   Γöé
  15303. Γöé                        Γöéthe accelerator definitions in      Γöé
  15304. Γöé                        Γöémemory.                             Γöé
  15305. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15306. ΓöéWinDestroyAccelTable    ΓöéDestroys an accelerator table.      Γöé
  15307. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15308. ΓöéWinLoadAccelTable       ΓöéLoads an accelerator table.         Γöé
  15309. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15310. ΓöéWinQueryAccelTable      ΓöéQueries the window or queue         Γöé
  15311. Γöé                        Γöéaccelerator table.                  Γöé
  15312. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15313. ΓöéWinSetAccelTable        ΓöéSets the window-accelerator or      Γöé
  15314. Γöé                        Γöéqueue-accelerator table.            Γöé
  15315. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15316. ΓöéWinTranslateAccel       ΓöéTranslates a WM_CHAR message.       Γöé
  15317. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15318.  
  15319. Accelerator-Table Structures 
  15320.  
  15321. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15322. ΓöéStructure name          ΓöéDescription                         Γöé
  15323. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15324. ΓöéACCEL                   ΓöéAccelerator structure.              Γöé
  15325. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15326. ΓöéACCELTABLE              ΓöéAccelerator-table structure.        Γöé
  15327. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15328.  
  15329. Accelerator-Table Messages 
  15330.  
  15331. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15332. ΓöéMessage                 ΓöéDescription                         Γöé
  15333. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15334. ΓöéWM_QUERYACCELTABLE      ΓöéReturns the handle to a window's    Γöé
  15335. Γöé                        Γöéaccelerator table.                  Γöé
  15336. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15337. ΓöéWM_SETACCELTABLE        ΓöéEstablishes the window accelerator  Γöé
  15338. Γöé                        Γöétable to be used for translation    Γöé
  15339. Γöé                        Γöéwhen the window is active.          Γöé
  15340. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15341. ΓöéWM_TRANSLATEACCEL       ΓöéSent to the focus window when a     Γöé
  15342. Γöé                        ΓöéWM_CHAR message occurs.             Γöé
  15343. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15344.  
  15345.  
  15346. ΓòÉΓòÉΓòÉ 23. Dialog Windows ΓòÉΓòÉΓòÉ
  15347.  
  15348. Dialog windows (also called dialog boxes) provide a high-level method for 
  15349. applications to display and gather information.  This chapter describes the 
  15350. creation and use of dialog windows and message boxes in your PM applications. 
  15351.  
  15352. Note:  Dialog windows, dialog boxes, and message boxes all are secondary 
  15353.        windows to the user. 
  15354.  
  15355.  
  15356. ΓòÉΓòÉΓòÉ 23.1. About Dialog Windows ΓòÉΓòÉΓòÉ
  15357.  
  15358. A dialog window is a temporary window that contains one or more control windows 
  15359. and, typically, is used to display messages to and gather input from the user. 
  15360. An application usually destroys a dialog window immediately after using it. 
  15361.  
  15362. OS/2 contains many functions and messages that help manage the control windows 
  15363. that make up a dialog window, thus easing the burden of maintaining complex 
  15364. input and output systems. 
  15365.  
  15366.  
  15367. ΓòÉΓòÉΓòÉ 23.1.1. Modal and Modeless Dialog Windows ΓòÉΓòÉΓòÉ
  15368.  
  15369. Dialog windows can be modal or modeless.  A modal dialog window requires that 
  15370. the dialog window be dismissed before the user can activate other windows in 
  15371. the same application.  Generally, an application uses a modal dialog window to 
  15372. get essential information from the user before proceeding with an operation.  A 
  15373. modeless dialog window allows the user to activate other windows in the same 
  15374. application without dismissing the dialog window.  Both modal and modeless 
  15375. dialog windows allow the user to activate windows in another application before 
  15376. responding to the dialog window. 
  15377.  
  15378. Modal dialog windows are easier for an application to manage because they are 
  15379. created, perform their task, and are closed, all with a single function call. 
  15380.  
  15381. Modeless dialog windows require more attention from the application because 
  15382. they exist until explicitly dismissed.  Modeless dialog windows provide a more 
  15383. flexible interface, however, by allowing the user to move to other windows in 
  15384. the application before responding to the dialog window. 
  15385.  
  15386.  
  15387. ΓòÉΓòÉΓòÉ 23.1.2. Dialog Items ΓòÉΓòÉΓòÉ
  15388.  
  15389. A dialog item is a child window of the dialog window, which usually is a window 
  15390. of class WC_FRAME.  The operating system provides many predefined window 
  15391. classes, called control windows, that you can use as dialog items. The 
  15392. following figure is an example. 
  15393.  
  15394. Dialog Window with Control Windows Predefined control windows include static 
  15395. display boxes, text-entry fields, buttons, and list boxes.  You also can use 
  15396. customized window classes as dialog items. 
  15397.  
  15398. Dialog items are windows and, thus, can be manipulated by all window-management 
  15399. functions relating to size, position, and visibility.  Dialog items always are 
  15400. owned by the dialog frame window.  Most predefined control-window classes send 
  15401. notification messages to their owners when the user interacts with their 
  15402. control windows.  The dialog frame window receives these notification messages 
  15403. and passes them to the application through the application-defined dialog 
  15404. procedure. 
  15405.  
  15406.  
  15407. ΓòÉΓòÉΓòÉ 23.1.3. Dialog-Item Groups ΓòÉΓòÉΓòÉ
  15408.  
  15409. Items within a dialog window can be organized into dialog-item groups.  When 
  15410. items are arranged in a group, the user can move from one item to another in 
  15411. the same group by using the direction keys.  When the user presses a direction 
  15412. key, the focus will not shift to items in other groups within the dialog 
  15413. window. 
  15414.  
  15415. Arranging items in groups is useful for radio buttons and check boxes. 
  15416. Although some control types also can be displayed this way, entry-field 
  15417. controls cannot; they process direction keys themselves, as do MLE, value-set, 
  15418. container, slider, and notebook controls. 
  15419.  
  15420. The first item in a dialog-item group has the WS_GROUP window style.  All 
  15421. subsequent items in the dialog template are considered part of that group until 
  15422. another item is given the WS_GROUP style, which begins a new group. 
  15423.  
  15424. The WS_TABSTOP style often is used along with the WS_GROUP style.  WS_TABSTOP 
  15425. marks the items that can receive the focus when the user presses the Tab key. 
  15426. Each time the user presses the Tab key, the focus moves to the next item that 
  15427. has the WS_TABSTOP style.  Generally, the WS_GROUP and WS_TABSTOP styles are 
  15428. defined together for the first item of each group in the dialog template.  This 
  15429. makes it possible for a user to press the Tab key to move among groups of items 
  15430. and to use the direction keys to move among items in a group. 
  15431.  
  15432. The WS_TABSTOP style should not be used for radio buttons because the system 
  15433. automatically maintains a tab stop on any selected item in a radio-button 
  15434. group; therefore, when the Tab key is pressed in a group of radio buttons, the 
  15435. focus remains on the currently selected item. 
  15436.  
  15437. The WS_GROUP and WS_TABSTOP styles are also useful for preventing the user from 
  15438. moving to a particular button when using the keyboard.  For example, if the 
  15439. dialog window has OK and Cancel push buttons, they should be in the same group, 
  15440. with the OK push button as the first item in the group.  The user can press Tab 
  15441. to select the OK push button but not the Cancel push button.  To move to the 
  15442. Cancel button using the keyboard, the user first must press the Tab key to move 
  15443. to the OK push button, and then press a direction key to move the focus to the 
  15444. Cancel push button. 
  15445.  
  15446.  
  15447. ΓòÉΓòÉΓòÉ 23.1.4. Message Boxes ΓòÉΓòÉΓòÉ
  15448.  
  15449. Message boxes are dialog windows predefined by the system and used as a simple 
  15450. interface for applications, without the necessity of creating dialog-template 
  15451. resources or dialog procedures.  An application can call the WinMessageBox 
  15452. function and specify the type of message box and message text.  The system 
  15453. displays the message and waits for the user to dismiss the message box by 
  15454. selecting a button in the message box.  The system then returns a result code 
  15455. to the application, indicating which button the user selected. 
  15456.  
  15457. Message boxes are best for short notification messages that require a simple 
  15458. acknowledgment or choice by the user.  Applications do not specify a dialog 
  15459. procedure for message boxes so they cannot readily change the action of a 
  15460. message box.  However, there is no need to do so, since there are many 
  15461. predefined message-box styles. The following figure shows a sample message box. 
  15462.  
  15463. Example of a Message Box Message boxes are always modal-either 
  15464. application-modal or system-modal.  Application-modal (the default style) means 
  15465. that the user cannot activate another window in the current application before 
  15466. responding to the message box but can switch to another application before 
  15467. responding.  System-modal means that the user cannot activate another window in 
  15468. any application before responding to the message box.  A system-modal message 
  15469. box should be used only to display urgent error messages (running out of 
  15470. memory, for example). 
  15471.  
  15472.  
  15473. ΓòÉΓòÉΓòÉ 23.1.5. Dialog Data Structures ΓòÉΓòÉΓòÉ
  15474.  
  15475. Each item in a dialog window is described by a DLGTITEM data structure.  This 
  15476. structure is rarely accessed directly by an application, since system functions 
  15477. handle most of the manipulation of dialog items.  Applications that create 
  15478. dialog items that are not defined as part of a dialog-template resource must 
  15479. create dialog-window-item structures in memory. 
  15480.  
  15481. A dialog window can have many items, so applications can use another structure, 
  15482. DLGTEMPLATE, to define the items.  This structure consists of header 
  15483. information, followed by an array of dialog-window items.  Applications that 
  15484. create dialog windows without using dialog resources must create a dialog 
  15485. template in memory, and, then, call the WinCreateDlg function. 
  15486.  
  15487.  
  15488. ΓòÉΓòÉΓòÉ 23.1.6. Dialog Resources ΓòÉΓòÉΓòÉ
  15489.  
  15490. Most applications define dialog templates in resource files rather than 
  15491. constructing template data structures in memory at run time.  The dialog 
  15492. resource file defines the size and style of the dialog-window frame and 
  15493. specifies each dialog item. 
  15494.  
  15495. The dimensions and position of each dialog item are specified in dialog 
  15496. coordinates, which are based on the size of the system font.  A horizontal unit 
  15497. is one-fourth the average width of the characters in the system font; a 
  15498. vertical unit is one-eighth the average height of the characters in the system 
  15499. font.  The origin of the dialog template is the lower-left corner of the dialog 
  15500. window.  The operating system provides the WinMapDlgPoints function for 
  15501. converting dialog coordinates into window coordinates. 
  15502.  
  15503.  
  15504. ΓòÉΓòÉΓòÉ 23.2. Using Message Boxes and Dialog Windows ΓòÉΓòÉΓòÉ
  15505.  
  15506. The simplest dialog window is the message box.  Most message boxes present 
  15507. simple messages and offer the user one, two, or three responses (represented by 
  15508. buttons).  A message box is easy to use and is appropriate when an application 
  15509. requires a clearly defined response to a static message.  However, message 
  15510. boxes lack flexibility in size and placement on the screen and are limited in 
  15511. the choices they offer the user.  Applications that require more control over 
  15512. size, position, and content should use regular dialog windows instead of 
  15513. message boxes. 
  15514.  
  15515.  
  15516. ΓòÉΓòÉΓòÉ 23.2.1. Creating a Message Box ΓòÉΓòÉΓòÉ
  15517.  
  15518. There are three parts to a message box: the icon, the message, and buttons. 
  15519. Applications specify the icons and buttons by using message-box style 
  15520. constants.  Message text is specified by a null-terminated string. 
  15521.  
  15522. To create a message box, the application calls the WinMessageBox function, 
  15523. which displays the message box and processes user input until the user selects 
  15524. a button in the message box.  The WinMessageBox return value indicates which 
  15525. button the user selected. 
  15526.  
  15527. The following code fragment illustrates how to create a message box with a 
  15528. default Yes button, a No button, and a question-mark (?) icon. This example 
  15529. assumes that you have defined a string resource with the MY_MESSAGESTR_ID 
  15530. identifier in the resource file. 
  15531.  
  15532.  
  15533.     UCHAR  szMessageString[255];
  15534.     ULONG  ulResult;
  15535.  
  15536.     WinLoadString(hab, (HMODULE) NULL, MY_MESSAGESTR_ID,
  15537.         sizeof(szMessageString), szMessageString);
  15538.  
  15539.     ulResult = WinMessageBox(hwndFrame,  /* Parent    */
  15540.         hwndFrame,                       /* Owner     */
  15541.         szMessageString,                 /* Text      */
  15542.         (PSZ) NULL,                      /* caption   */
  15543.         MY_MESSAGEWIN,                   /* Window ID */
  15544.         MB_YESNO |
  15545.         MB_ICONQUESTION |
  15546.         MB_DEFBUTTON1);                  /* Style     */
  15547.  
  15548.      if (ulResult == MBID_YES) {
  15549.  
  15550.           /* Do yes case. */
  15551.  
  15552.      } else {
  15553.  
  15554.           /* Do no case.  */
  15555.      }
  15556.  
  15557. The WinMessageBox function returns predefined values indicating which button 
  15558. has been selected. These values are listed in the Presentation Manager 
  15559. Programming Reference. 
  15560.  
  15561. Notice that strings for message boxes should be defined as string resources to 
  15562. facilitate program translation for other countries.  However, there is danger 
  15563. in using string resources in message boxes that are called in low-memory 
  15564. situations; loading a string resource in such situations could result in severe 
  15565. memory problems and cause an application to fail.  One way to prevent this 
  15566. problem is to preload the string resource and make it nondiscardable so it will 
  15567. be available when the message box must be displayed. 
  15568.  
  15569.  
  15570. ΓòÉΓòÉΓòÉ 23.2.1.1. Creating a System-Modal Message Box ΓòÉΓòÉΓòÉ
  15571.  
  15572. There are two levels of modality for system-modal message boxes-soft modal and 
  15573. hard modal.  A soft-modal message box does not allow keystrokes or mouse input 
  15574. to reach any other window but does allow other messages, such as deactivation 
  15575. and timer messages, to reach other windows.  A hard-modal message box does not 
  15576. allow any messages to reach other windows.  A hard-model message box is 
  15577. appropriate for serious system warnings. 
  15578.  
  15579. To create a hard-modal message box, combine the MB_ICONHAND style with the 
  15580. MB_SYSTEMMODAL style.  To create a soft-modal message box, use the 
  15581. MB_SYSTEMMODAL style with any style other than MB_ICONHAND.  The MB_SYSTEMMODAL 
  15582. icon always is in memory and is available even in low-memory situations. 
  15583.  
  15584.  
  15585. ΓòÉΓòÉΓòÉ 23.2.2. Using a Dialog Window ΓòÉΓòÉΓòÉ
  15586.  
  15587. When using a dialog window, an application must load the dialog window, process 
  15588. user input, and destroy the dialog window when the user finishes the task.  The 
  15589. process for handling a dialog window varies, depending on whether the dialog 
  15590. window is modal or modeless. 
  15591.  
  15592.  
  15593. ΓòÉΓòÉΓòÉ 23.2.2.1. Creating a Dialog Template ΓòÉΓòÉΓòÉ
  15594.  
  15595. The following source-code fragment creates a dialog template.  Notice that the 
  15596. WS_GROUP and WS_TABSTOP style designations are given for the first item in each 
  15597. group. 
  15598.  
  15599.  
  15600.     DLGTEMPLATE IDD_ABOUT
  15601.     BEGIN
  15602.       DIALOG "", IDD_ABOUT2,
  15603.       10, 10, 150, 110, FS_DLGBORDER, 0
  15604.       BEGIN
  15605.         CONTROL "Attributes:",100,
  15606.           10, 30, 100, 70,
  15607.           WC_STATIC,
  15608.           SS_GROUPBOX | WS_VISIBLE
  15609.         CONTROL "Highlighted",101,
  15610.           20, 80, 58, 12,
  15611.           WC_BUTTON,
  15612.           WS_GROUP | WS_TABSTOP | BS_AUTOCHECKBOX | WS_VISIBLE
  15613.         CONTROL "Enabled",102,
  15614.           20, 60, 58, 12,
  15615.           WC_BUTTON,
  15616.           BS_AUTOCHECKBOX | WS_VISIBLE
  15617.         CONTROL "Checked",103,
  15618.           20, 40, 58, 12,
  15619.           WC_BUTTON,
  15620.           BS_AUTOCHECKBOX | WS_VISIBLE
  15621.         CONTROL "Okay", DID_OK,
  15622.           10, 10, 50, 14,
  15623.           WC_BUTTON,
  15624.           WS_GROUP | WS_TABSTOP | BS_PUSHBUTTON | BS_DEFAULT | WS_VISIBLE
  15625.         CONTROL "Cancel", DID_CANCEL,
  15626.           80, 10, 50, 14,
  15627.           WC_BUTTON,
  15628.           BS_PUSHBUTTON | WS_VISIBLE
  15629.       END
  15630.     END
  15631.  
  15632.  
  15633. ΓòÉΓòÉΓòÉ 23.2.2.2. Creating a Modal Dialog Window ΓòÉΓòÉΓòÉ
  15634.  
  15635. The easiest way to use a modal dialog window is to define a dialog template in 
  15636. the resource file (as in the preceding section), and then, call the WinDlgBox 
  15637. function, specifying the dialog-window resource identifier and a pointer to the 
  15638. dialog procedure.  WinDlgBox loads the dialog-window resource, displays the 
  15639. dialog window, and handles all user input until the user dismisses the dialog 
  15640. window.  The dialog procedure receives messages when the dialog window is 
  15641. created (WM_INITDLG) and other messages each time the user interacts with a 
  15642. dialog item (enters text in entry fields or selects a button, for example). 
  15643.  
  15644. You must specify both the parent and owner windows when loading a dialog window 
  15645. using the WinDlgBox function.  Generally, the parent window will be 
  15646. HWND_DESKTOP and the owner will be a client window in your application. 
  15647.  
  15648. Dialog windows typically contain buttons that send WM_COMMAND messages when 
  15649. selected by the user.  WM_COMMAND messages passed to the WinDefDlgProc function 
  15650. result in the WinDismissDlg function's being called, with the window identifier 
  15651. of the source button as the return code (from WinDismissDlg).  Dialog windows 
  15652. with either OK or Cancel as their only button can ignore WM_COMMAND messages, 
  15653. allowing them to be passed to WinDefDlgProc.  WinDefDlgProc calls WinDismissDlg 
  15654. to dismiss the dialog window and returns the DID_OK or DID_CANCEL code. 
  15655.  
  15656. Passing WM_COMMAND messages to WinDefDlgProc means that all button presses in 
  15657. the dialog window dismiss the dialog window.  If you want certain buttons to 
  15658. initiate operations without closing the dialog window, or if you want to 
  15659. perform some processing without closing the dialog window, handle the 
  15660. WM_COMMAND messages in the dialog procedure. 
  15661.  
  15662. If you handle WM_COMMAND messages in the dialog procedure, you must call 
  15663. WinDismissDlg to dismiss the dialog window.  Your dialog procedure passes the 
  15664. DID_OK code to WinDismissDlg if the user selects the OK button or the 
  15665. DID_CANCEL code if the user selects the Cancel button. 
  15666.  
  15667. When you call WinDismissDlg or pass the WM_COMMAND message to WinDefDlgProc, 
  15668. the dialog window is dismissed, and the WinDlgBox function returns the value 
  15669. passed to WinDismissDlg.  This return value identifies the button selected. 
  15670.  
  15671. An alternative to using WinDlgBox is to call the individual functions that 
  15672. duplicate its functionality, as shown in the following code fragment: 
  15673.  
  15674.     HWND  hwndDlg;
  15675.     ULONG ulResult;
  15676.  
  15677.     hwndDlg = WinLoadDlg(...);
  15678.     ulResult = WinProcessDlg(hwndDlg);
  15679.     WinDestroyWindow(hwndDlg);
  15680.  
  15681. After calling the WinProcessDlg function, your dialog procedure must call 
  15682. WinDismissDlg to dismiss the dialog window.  Although the dialog window is 
  15683. dismissed (hidden), it still exists.  You must call the WinDestroyWindow 
  15684. function to destroy a dialog window if it was loaded using the WinLoadDlg 
  15685. function.  WinDlgBox automatically destroys a dialog window before returning. 
  15686.  
  15687. If you want to manipulate individual items in a dialog window, or add a menu 
  15688. after loading the dialog window (but before calling WinProcessDlg), it is 
  15689. better to make individual calls rather than call WinDlgBox.  Individual calls 
  15690. also are useful for querying individual dialog items-to determine the contents 
  15691. of an entry-field control after a dialog window is closed but before it is 
  15692. destroyed, for example.  Destroying a dialog window also destroys any 
  15693. dialog-item control windows that are child windows of the dialog window. 
  15694.  
  15695.  
  15696. ΓòÉΓòÉΓòÉ 23.2.2.3. Creating a Modeless Dialog Window ΓòÉΓòÉΓòÉ
  15697.  
  15698. To use a modeless dialog window in an application, create a dialog template in 
  15699. the resource file, just as for a modal dialog window.  Modeless dialog windows 
  15700. share the screen equally with other frame windows.  It is a good idea to give 
  15701. modeless dialog windows a title bar so they can be moved around the screen. 
  15702. The following Resource Compiler source-code fragment shows a dialog template 
  15703. for a dialog window with a title bar, system menu, and minimize button. 
  15704.  
  15705.  
  15706.     DLGTEMPLATE IDD_SAMP
  15707.     BEGIN
  15708.         DIALOG "Modeless Dialog", IDD_SAMP, 80, 92, 126, 130,
  15709.             WS_VISIBLE | FS_DLGBORDER,
  15710.             FCF_TITLEBAR | FCF_SYSMENU | FCF_MINBUTTON
  15711.  
  15712.         BEGIN
  15713.  
  15714.         /* Put control-window definitions here. */
  15715.  
  15716.         END
  15717.     END
  15718.  
  15719. The application loads the dialog resource from the resource file using the 
  15720. WinLoadDlg function, receiving in return a window handle to the dialog window. 
  15721. The application treats the dialog window as if it were an ordinary window. 
  15722. Messages for the dialog window are dispatched through the event loop the 
  15723. application uses for its other windows.  In fact, an application can have a 
  15724. modeless dialog window as its only window. 
  15725.  
  15726. The resource for a modeless dialog window is like the resource used for a modal 
  15727. dialog window.  The difference between modal and modeless dialog windows is the 
  15728. way applications handle input to each.  For a modal dialog, the WinDlgBox and 
  15729. WinProcessDlg functions handle all user input to the dialog window, preventing 
  15730. access to other windows in the application.  For a modeless dialog window, the 
  15731. application does not call these functions, relying instead on a normal message 
  15732. loop to dispatch messages to the dialog procedure. 
  15733.  
  15734. The primary difference between a modeless dialog window and a standard frame 
  15735. window with child control windows is that, for a modeless dialog window, an 
  15736. application can define child windows for the dialog window in a dialog 
  15737. template, automating the process of creating the window and its child windows. 
  15738. The same effect can be achieved by creating a standard frame window, but then, 
  15739. the child control windows must be created individually. 
  15740.  
  15741. It is important that an application keep track of all open modeless dialog 
  15742. windows so that it can destroy all open windows before terminating. 
  15743.  
  15744.  
  15745. ΓòÉΓòÉΓòÉ 23.2.2.4. Initializing a Dialog Window ΓòÉΓòÉΓòÉ
  15746.  
  15747. Generally, an application defines a dialog template in its resource file and 
  15748. loads the dialog window by calling the WinLoadDlg function or the WinDlgBox 
  15749. function (which calls WinLoadDlg).  The dialog window is created as an 
  15750. invisible window unless the window style WS_VISIBLE is specified in the dialog 
  15751. template.  A WM_INITDLG message is sent to the dialog procedure before 
  15752. WinLoadDlg returns.  As each control defined in the template is created, the 
  15753. dialog procedure might receive various control notifications before the 
  15754. function returns.  WinLoadDlg returns a handle to the dialog window immediately 
  15755. after creating a dialog window. 
  15756.  
  15757. In general, it is a good idea to define a dialog window as invisible, since 
  15758. this allows for optimization.  For example, an experienced user might type 
  15759. ahead rapidly, anticipating the processing of a dialog-window command.  In such 
  15760. a case, there is no need to display the dialog window, because the user has 
  15761. finished the interaction before the window can be displayed.  This is how the 
  15762. WinProcessDlg function works-it does not display a dialog window while there 
  15763. still are WM_CHAR messages in the input queue; it lets these messages to be 
  15764. processed first. 
  15765.  
  15766. As control windows in a dialog window are created from the template, strings in 
  15767. the template are processed by the WinSubstituteStrings function.  Any 
  15768. WM_SUBSTITUTESTRING messages are sent to the dialog procedure before WinLoadDlg 
  15769. returns. 
  15770.  
  15771. When child windows of a dialog window are created, WinSubstituteStrings is used 
  15772. so child windows can make substitutions in their window text.  If any 
  15773. child-window text string contains the percent sign (%) substitution character, 
  15774. the length of the text string is limited to 256 characters after it is returned 
  15775. from the substitution. 
  15776.  
  15777.  
  15778. ΓòÉΓòÉΓòÉ 23.2.2.5. Adding a Menu in a Dialog Window ΓòÉΓòÉΓòÉ
  15779.  
  15780. To create a menu bar and menus in a dialog window, an application first must 
  15781. load the dialog window to get a handle to the dialog-frame window.  The 
  15782. dialog-frame window can be associated with a menu resource by calling the 
  15783. WinLoadMenu function.  This function requires arguments that specify the menu 
  15784. identifier and the handle of the parent window for the menu.  Finally, the 
  15785. dialog-frame window must incorporate the menu by sending a WM_UPDATEFRAME 
  15786. message to the dialog window.  The following code fragment illustrates these 
  15787. operations: 
  15788.  
  15789.     HWND hwndDialog, hwndMenu;
  15790.  
  15791.     /* Get the dialog resource. */
  15792.     hwndDialog = WinLoadDlg(...);
  15793.  
  15794.     / Get the menu resource and attach it to the dialog window. */
  15795.     hwndMenu = WinLoadMenu(hwndDialog, ...);
  15796.  
  15797.     /* Inform the dialog window that it has a new menu.         */
  15798.     WinSendMsg(hwndDialog, WM_UPDATEFRAME, (MPARAM) NULL, (MPARAM) NULL);
  15799.  
  15800. Applications can create menus in both modal and modeless dialog windows.  The 
  15801. preceding code fragment can be used for either type of dialog window.  For a 
  15802. modal dialog window, your application must call the WinProcessDlg function to 
  15803. handle user input until the dialog window is dismissed.  For a modeless dialog 
  15804. window, your application must call the WinShowWindow function to display the 
  15805. dialog window, enabling the message loop to direct messages to the dialog 
  15806. window. 
  15807.  
  15808.  
  15809. ΓòÉΓòÉΓòÉ 23.2.2.6. Creating a Dialog Procedure ΓòÉΓòÉΓòÉ
  15810.  
  15811. The main difference between a dialog procedure and a window procedure is that a 
  15812. dialog procedure does not receive WM_CREATE messages.  Instead, a dialog 
  15813. procedure receives WM_INITDLG messages, which are sent after a dialog window is 
  15814. created but before it is displayed.  WM_INITDLG can do the same type of 
  15815. initialization tasks that WM_CREATE handles. 
  15816.  
  15817. For example, if a dialog window contains a list box, use WM_INITDLG to fill the 
  15818. list box with items.  Also use this procedure to enable or disable buttons in a 
  15819. dialog window, depending on your application. 
  15820.  
  15821. You also can call the WinSetDlgItemText or WinSetDlgItemShort functions during 
  15822. dialog initialization, to set up text items that reflect the current conditions 
  15823. in your application. 
  15824.  
  15825. Another typical task for the WM_INITDLG message handler is centering a dialog 
  15826. window on the screen or within its owner window.  The following code fragment 
  15827. illustrates how to center a dialog window on the screen using WM_INITDLG: 
  15828.  
  15829.     RECTL rclScreen,rclDialog;
  15830.     LONG  sWidth,sHeight,sBLCx,sBLCy;
  15831.  
  15832.     case WM_INITDLG:
  15833.         /* Center the dialog window and get the screen rectangle.   */
  15834.         WinQueryWindowRect(HWND_DESKTOP, &rclScreen);
  15835.  
  15836.         /* Get the dialog-window rectangle.                         */
  15837.         WinQueryWindowRect(hwnd, &rclDialog);
  15838.  
  15839.         /* Get the dialog-window width.                             */
  15840.         sWidth = (LONG) (rclDialog.xRight - rclDialog.xLeft);
  15841.  
  15842.         /* Get the dialog-window height.                            */
  15843.         sHeight = (LONG) (rclDialog.yTop - rclDialog.yBottom);
  15844.  
  15845.         /* Set the horizontal coordinate of the lower-left corner.  */
  15846.         sBLCx = ((LONG) rclScreen.xRight - sWidth) / 2;
  15847.  
  15848.         /* Set vertical coordinate of the lower-left corner.        */
  15849.         sBLCy = ((LONG) rclScreen.yTop - sHeight) / 2;
  15850.  
  15851.         /* Move, size, and show the window.                         */
  15852.         WinSetWindowPos(hwnd,
  15853.             HWND_TOP,
  15854.             sBLCx, sBLCy,
  15855.             0, 0,          /* Ignores size arguments                */
  15856.             SWP_MOVE);
  15857.  
  15858.         return 0;
  15859.  
  15860. The dialog procedure receives notification messages from each control-window 
  15861. item in a dialog window whenever a user clicks an item or enters text in an 
  15862. entry field.  Most dialog procedures wait for the user to select one or more 
  15863. dialog-window buttons to signal being finished with the dialog window.  When 
  15864. the dialog procedure receives one of these messages, it calls the WinDismissDlg 
  15865. function, as shown in the following code fragment.  The second argument to 
  15866. WinDismissDlg is the value returned by the WinDlgBox or WinProcessDlg 
  15867. functions.  Generally, these functions return the identifier of the button that 
  15868. was pressed. 
  15869.  
  15870.     MRESULT EXPENTRY SampDialogProc(HWND hwnd,
  15871.                                     ULONG ulMessage,
  15872.                                     MPARAM mp1,
  15873.                                     MPARAM mp2)
  15874.     {
  15875.         switch (ulMessage) {
  15876.             case WM_COMMAND:
  15877.                 switch (SHORT1FROMMP(mp1)) {
  15878.                     case DID_OK:
  15879.  
  15880.                        /*
  15881.                         * Final dialog-item queries,
  15882.                         * dismiss the dialog.
  15883.                         */
  15884.  
  15885.                        WinDismissDlg(hwnd, DID_OK);
  15886.                        return 0;
  15887.                 }
  15888.                 break;
  15889.         }
  15890.         return (WinDefDlgProc(hwnd, ulMessage, mp1, mp2));
  15891.     }
  15892.  
  15893. Other dialog-window items send notification messages specific to the type of 
  15894. control window.  Make your dialog procedure respond to notification messages 
  15895. from each dialog item.  Pass any messages that a dialog procedure does not 
  15896. handle to the WinDefDlgProc function for default processing.  The default 
  15897. dialog procedure is the same as the default frame-window procedure. 
  15898.  
  15899. The WM_COMMAND message from the OK button indicates that the user has selected 
  15900. the OK button and is finished with the dialog window.  If the dialog window has 
  15901. other controls, such as entry fields or check boxes, have your dialog procedure 
  15902. query the contents or state of each control upon receipt of a message from the 
  15903. OK button.  Before dismissing a dialog window, have your dialog procedure 
  15904. collect input from each dialog-window control before closing the dialog window. 
  15905.  
  15906.  
  15907. ΓòÉΓòÉΓòÉ 23.2.2.7. Manipulating Dialog Items ΓòÉΓòÉΓòÉ
  15908.  
  15909. Dialog items are control windows and, as such, can be manipulated using 
  15910. standard window-management function calls.  The window handle is obtained for 
  15911. each dialog item by calling the WinWindowFromID function and passing the window 
  15912. handle for the dialog window and the window identifier for the dialog item as 
  15913. defined in the dialog template.  Include the following Resource Compiler 
  15914. source-code fragment in your dialog template: 
  15915.  
  15916.  
  15917.     DLGTEMPLATE IDD_ABOUT
  15918.     BEGIN
  15919.         DIALOG "", IDD_ABOUT, 80, 92, 126, 130, FS_DLGBORDER, 0
  15920.         BEGIN
  15921.             PUSHBUTTON "My Button", ITEMID_MYBUTTON, 37, 107, 56, 12
  15922.  
  15923.             /* Other item definitions ... */
  15924.  
  15925.         END
  15926.     END
  15927.  
  15928. Based on this code fragment, your application will receive the button-item 
  15929. handle by initiating the following call to WinWindowFromID: 
  15930.  
  15931.  
  15932.     hwndItem = WinWindowFromID(hwndDialog, ITEMID_MYBUTTON);
  15933.  
  15934. Applications often change the contents, enabled state, or position of dialog 
  15935. items at run time.  For example, in a dialog window that contains a list box of 
  15936. file names and an Open button, the Open button should be disabled until the 
  15937. user selects a file from the list.  To do this, define the button as disabled 
  15938. in the dialog resource so that it is disabled when the dialog window first is 
  15939. displayed.  At run time, the dialog procedure receives a notification message 
  15940. from the list box when the user selects a file.  At that time, the dialog 
  15941. procedure should call the WinEnableWindow function to enable the Open button. 
  15942.  
  15943. Applications also can change the text in static dialog items and buttons by 
  15944. calling the WinSetWindowText function and using the window handle of a 
  15945. particular dialog item. 
  15946.  
  15947.  
  15948. ΓòÉΓòÉΓòÉ 23.3. Summary ΓòÉΓòÉΓòÉ
  15949.  
  15950. Following are the OS/2 functions, structures, and messages used with dialog 
  15951. windows. 
  15952.  
  15953. Dialog Functions 
  15954.  
  15955. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15956. ΓöéFunction name           ΓöéDescription                         Γöé
  15957. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15958. ΓöéWinAlarm                ΓöéGenerates an audible alarm.         Γöé
  15959. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15960. ΓöéWinCreateDlg            ΓöéCreates a dialog window.            Γöé
  15961. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15962. ΓöéWinDefDlgProc           ΓöéInvokes the default dialog          Γöé
  15963. Γöé                        Γöéprocedure.                          Γöé
  15964. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15965. ΓöéWinDestroyWindow        ΓöéDestroys a window and its child     Γöé
  15966. Γöé                        Γöéwindows.                            Γöé
  15967. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15968. ΓöéWinDismissDlg           ΓöéHides the modeless dialog window, orΓöé
  15969. Γöé                        Γöédestroys the modal dialog window,   Γöé
  15970. Γöé                        Γöéand causes the WinProcessDlg or     Γöé
  15971. Γöé                        ΓöéWinDlgBox calls to return.          Γöé
  15972. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15973. ΓöéWinDlgBox               ΓöéLoads and processes a modal dialog  Γöé
  15974. Γöé                        Γöéwindow and returns the result value Γöé
  15975. Γöé                        Γöéestablished by the WinDismissDlg    Γöé
  15976. Γöé                        Γöécall.                               Γöé
  15977. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15978. ΓöéWinEnumDlgItem          ΓöéReturns the window handle of a      Γöé
  15979. Γöé                        Γöédialog item within a dialog window. Γöé
  15980. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15981. ΓöéWinGetDlgMsg            ΓöéObtains a message from the          Γöé
  15982. Γöé                        Γöéapplication's queue associated with Γöé
  15983. Γöé                        Γöéthe specified dialog.               Γöé
  15984. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15985. ΓöéWinLoadDlg              ΓöéCreates a dialog window from the    Γöé
  15986. Γöé                        Γöédialog template Dlgid in Resource.  Γöé
  15987. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15988. ΓöéWinMapDlgPoints         ΓöéMaps points from dialog coordinates Γöé
  15989. Γöé                        Γöéto window coordinates or from windowΓöé
  15990. Γöé                        Γöécoordinates to dialog coordinates.  Γöé
  15991. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15992. ΓöéWinMessageBox           ΓöéCreates, displays, and operates a   Γöé
  15993. Γöé                        Γöémessage box window.                 Γöé
  15994. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15995. ΓöéWinProcessDlg           ΓöéDispatches messages while a modal   Γöé
  15996. Γöé                        Γöédialog window is displayed.         Γöé
  15997. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15998. ΓöéWinQueryDlgItemShort    ΓöéConverts the text of a dialog item  Γöé
  15999. Γöé                        Γöéinto an integer value.              Γöé
  16000. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16001. ΓöéWinQueryDlgItemText     ΓöéQueries a text string in a dialog   Γöé
  16002. Γöé                        Γöéitem.                               Γöé
  16003. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16004. ΓöéWinQueryDlgItemTextLengtΓöéQueries the length of the text      Γöé
  16005. Γöé                        Γöéstring in a dialog item.            Γöé
  16006. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16007. ΓöéWinSendDlgItemMsg       ΓöéSends a message to the dialog item  Γöé
  16008. Γöé                        Γöédefined by item in the dialog windowΓöé
  16009. Γöé                        Γöéspecified by Dlg.                   Γöé
  16010. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16011. ΓöéWinSetDlgItemShort      ΓöéConverts an integer value into the  Γöé
  16012. Γöé                        Γöétext of a dialog item.              Γöé
  16013. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16014. ΓöéWinSetDlgItemText       ΓöéSets a text string in a dialog item.Γöé
  16015. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16016. ΓöéWinSubstituteStrings    ΓöéPerforms a substitution process on aΓöé
  16017. Γöé                        Γöétext string, replacing specific     Γöé
  16018. Γöé                        Γöémarker characters with text suppliedΓöé
  16019. Γöé                        Γöéby the application.                 Γöé
  16020. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16021.  
  16022. Dialog Structures 
  16023.  
  16024. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16025. ΓöéStructure name          ΓöéDescription                         Γöé
  16026. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16027. ΓöéDLGTEMPLATE             ΓöéDialog-template structure.          Γöé
  16028. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16029. ΓöéDLGITEM                 ΓöéDialog-item structure.              Γöé
  16030. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16031.  
  16032. Dialog Messages 
  16033.  
  16034. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16035. ΓöéMessage                 ΓöéDescription                         Γöé
  16036. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16037. ΓöéWM_CHAR                 ΓöéSent when a user presses a key.     Γöé
  16038. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16039. ΓöéWM_INITDLG              ΓöéOccurs when a dialog box is being   Γöé
  16040. Γöé                        Γöécreated                             Γöé
  16041. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16042. ΓöéWM_QUERYDLGCODE         ΓöéSent by the dialog manager to       Γöé
  16043. Γöé                        Γöéidentify the type of control, to    Γöé
  16044. Γöé                        Γöédetermine what kinds of messages theΓöé
  16045. Γöé                        Γöécontrol understands, and to         Γöé
  16046. Γöé                        Γöédetermine whether an input message  Γöé
  16047. Γöé                        Γöémay be processed by the dialog      Γöé
  16048. Γöé                        Γöémanager or passed down to the       Γöé
  16049. Γöé                        Γöécontrol.                            Γöé
  16050. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16051. ΓöéWM_SUBSTITUTESTRING     ΓöéSent from the WinSubstituteStrings  Γöé
  16052. Γöé                        Γöécall.                               Γöé
  16053. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16054.  
  16055.  
  16056. ΓòÉΓòÉΓòÉ 24. Font Dialog Controls ΓòÉΓòÉΓòÉ
  16057.  
  16058. Font dialog controls provide basic functions that give users the ability to 
  16059. display and select from a list of: 
  16060.  
  16061. o Font family names installed on the system 
  16062. o Available styles for each font 
  16063. o Available sizes for each font 
  16064. o Emphasis styles available for each font. 
  16065.  
  16066. Users can view their selections, using a sample character string in a preview 
  16067. area, and interact with a modal or modeless font dialog.  This chapter explains 
  16068. how font dialog controls can be extended to meet the requirements of PM 
  16069. applications. 
  16070.  
  16071.  
  16072. ΓòÉΓòÉΓòÉ 24.1. About the Font Dialog Control ΓòÉΓòÉΓòÉ
  16073.  
  16074. In the font dialog control, family face is defined as the name of the typeface. 
  16075. The following figure is an example of a font dialog. 
  16076.  
  16077. Font Dialog Courier, Times New Roman, and Helvetica are examples of commonly 
  16078. used family faces.  Type styles include normal, bold, italic, and bold italic. 
  16079. Size is the point size, or vertical measurement, of the type.  Font emphasis 
  16080. styles include outline, underline, and strikeout. 
  16081.  
  16082.  
  16083. ΓòÉΓòÉΓòÉ 24.2. Creating a Font Dialog ΓòÉΓòÉΓòÉ
  16084.  
  16085. To present a font dialog to users, your application must do the following: 
  16086.  
  16087.  1. Allocate storage for a FONTDLG structure and set all fields to NULL. 
  16088.  
  16089.  2. Initialize the fields in the FONTDLG structure. 
  16090.  
  16091.     The application must: 
  16092.  
  16093.     a. Set the cbSize field to the size of the structure. 
  16094.  
  16095.     b. Set either the hpsScreen or the hpsPrinter presentation space field, or 
  16096.        both.  You must have a valid presentation space from which to query 
  16097.        fonts. 
  16098.  
  16099.     c. Pass the pointer to a buffer in which to return the family name selected 
  16100.        (pszFamilyname) and the size of the buffer (usFamilyBufLen).  If the 
  16101.        application requires a default font, pass the family name of the font in 
  16102.        this buffer. 
  16103.  
  16104.     The application can choose to set the following: 
  16105.  
  16106.     a. An application-specific title.  Pass the pointer to a null-terminated 
  16107.        string in the pszTitle field. 
  16108.  
  16109.     b. An application-specific preview string.  Pass the pointer to a 
  16110.        null-terminated string in the pszPreview field. 
  16111.  
  16112.     c. Application-specific available font sizes for outline fonts.  Pass the 
  16113.        pointer to a null-terminated string containing point sizes, separated by 
  16114.        spaces in the pszPtSizeList field. 
  16115.  
  16116.     d. A custom dialog procedure to provide application-specific function. 
  16117.        Pass the pointer to a window procedure in the pfnDlgProc field. 
  16118.  
  16119.     e. Set the appropriate FNTS_* flags in the fl field to customize the dialog 
  16120.        style.  See the description of this field for the FONTDLG structure in 
  16121.        the OS/2 2.0 Programming Reference for a list of the flags you can 
  16122.        specify. 
  16123.  
  16124.     f. Set the FNTF_NOVIEWPRINTERFONTS or FNTF_NOVIEWSCREENFONTS flags to 
  16125.        customize the dialog style when working with printer fonts in the 
  16126.        flFlags field.  These filter flags should be initialized only when both 
  16127.        the hpsScreen and the hpsPrinter presentation space fields are non-NULL. 
  16128.  
  16129.     g. Pass the initial position of the dialog in the x and y fields. 
  16130.  
  16131.  3. Initialize the FONTDLG structure with any values that users should see when 
  16132.     they invoke the dialog for the first time. For example, you can: 
  16133.  
  16134.     a. Pass the characteristics of the default font in the usWeight, usWidth, 
  16135.        flType, and sNominalPointSize fields. 
  16136.  
  16137.     b. Pass any display options of the default font in the flStyle field. 
  16138.  
  16139.     c. Pass the color options for displaying the font sample in the clrFore and 
  16140.        clrBack fields. 
  16141.  
  16142.  4. Invoke the font dialog.  Call the WinFontDlg function and pass the dialog's 
  16143.     parent window handle, owner window handle, and a pointer to the initialized 
  16144.     FONTDLG structure. 
  16145.  
  16146.  5. Check the return value from the WinFontDlg function. If it is successful, 
  16147.     the selected font can be used by the application.  The information returned 
  16148.     in the fAttrs field of the FONTDLG structure is used. 
  16149.  
  16150.  
  16151. ΓòÉΓòÉΓòÉ 24.3. Graphical User Interface Support for the Font Dialog ΓòÉΓòÉΓòÉ
  16152.  
  16153. This section contains information about the graphical user interface support. 
  16154.  
  16155.  
  16156. ΓòÉΓòÉΓòÉ 24.3.1. Name Field ΓòÉΓòÉΓòÉ
  16157.  
  16158. The Name field is a drop-down list that displays a font family name.  When the 
  16159. font dialog is invoked, the value displayed in this field is either an 
  16160. application-supplied family name or the default system font. 
  16161.  
  16162. When users select a family name from the drop-down list, the Name field display 
  16163. is refreshed with the selected family name.  The preview area is updated to 
  16164. show the sample character string in the selected family face, using the font 
  16165. style, size, and emphasis currently in effect. 
  16166.  
  16167.  
  16168. ΓòÉΓòÉΓòÉ 24.3.2. Style Field ΓòÉΓòÉΓòÉ
  16169.  
  16170. The Style field is a drop-down list that displays a font style.  When the font 
  16171. dialog is invoked, the value displayed in this field is either an 
  16172. application-specified font style or the system default. 
  16173.  
  16174. When users select a font style from the drop-down list, the Style field display 
  16175. is refreshed with the selected style name.  The preview area is updated to show 
  16176. the sample character string in the selected font style, using the family name, 
  16177. size, and emphasis currently in effect. 
  16178.  
  16179.  
  16180. ΓòÉΓòÉΓòÉ 24.3.3. Size Field ΓòÉΓòÉΓòÉ
  16181.  
  16182. The Size field is a drop-down combination box that displays available font 
  16183. sizes.  Users can display and select from a list of available sizes for a font, 
  16184. or they can type a font size directly into the entry field. 
  16185.  
  16186. When users select a font size from the drop-down list, the Size field display 
  16187. is refreshed with the selected size.  The preview area is updated to show the 
  16188. character string in the selected font size, using the family name, font style, 
  16189. and emphasis currently in effect. 
  16190.  
  16191. The font sizes included in the drop-down list are dependent on the character 
  16192. definition of the font.  For image or raster fonts, all available sizes are 
  16193. listed.  For outline fonts, the default sizes are 8, 10, 12, 14, 18, and 24 
  16194. points.  If required, the application can specify the available sizes for 
  16195. outline fonts. 
  16196.  
  16197. When users type a font size in the entry field, the preview area is updated 
  16198. immediately.  The Size field will accept a fixed point number, such as 24.25, 
  16199. with up to four places saved after the decimal. 
  16200.  
  16201.  
  16202. ΓòÉΓòÉΓòÉ 24.3.4. Emphasis Group Box ΓòÉΓòÉΓòÉ
  16203.  
  16204. The Emphasis group box is a multiple-selection field that contains a list of 
  16205. emphasis styles (Outline, Underline, Strikeout) available for each font. 
  16206.  
  16207. When users select an emphasis style, the preview area is updated immediately. 
  16208. The Outline selection is not available for image fonts. 
  16209.  
  16210.  
  16211. ΓòÉΓòÉΓòÉ 24.3.5. Preview Area ΓòÉΓòÉΓòÉ
  16212.  
  16213. The Preview area enables users to view their font family, style, size and 
  16214. emphasis selections as they make them.  It contains a sample character string 
  16215. that is defined by the application.  The default character string is abcdABCD. 
  16216. The Preview area displays font sizes as large as 48 points.  As the size of the 
  16217. font increases, the sample displayed is clipped by the borders of the area. 
  16218.  
  16219.  
  16220. ΓòÉΓòÉΓòÉ 24.3.6. Filter Check Box ΓòÉΓòÉΓòÉ
  16221.  
  16222. The Filter check box enables users to limit the font family name drop-down list 
  16223. to select from fonts that are displayable only, printable only, or a merged 
  16224. list.  The initial setting of the Filter check box is specified by the 
  16225. application. 
  16226.  
  16227.  
  16228. ΓòÉΓòÉΓòÉ 24.3.7. Standard Push button and Default Action ΓòÉΓòÉΓòÉ
  16229.  
  16230. The dialog can be dismissed with either the OK or Cancel push buttons. 
  16231.  
  16232.  
  16233. ΓòÉΓòÉΓòÉ 24.4. Customizing the Font Dialog ΓòÉΓòÉΓòÉ
  16234.  
  16235. You can create a font dialog by customizing the font dialog control, using the 
  16236. minimum set of standard controls and adding any controls of your own design. 
  16237. Specify a standard control by including a control of the same class, ID, and 
  16238. style as in the font dialog.  The minimum set of controls required for the font 
  16239. dialog are: DID_NAME, DID_STYLE, DID_DISPLAY_FILTER, DID_PRINTER_FILTER, 
  16240. DID_SIZE, DID_SAMPLE, DID_OUTLINE, DID_UNDERSCORE, DID_STRIKEOUT, 
  16241. DID_OK_BUTTON, DID_CANCEL_BUTTON. 
  16242.  
  16243. Even if your dialog does not use all of the required controls, you must include 
  16244. them.  You can make the unused controls invisible so that your application 
  16245. users are not confused. 
  16246.  
  16247.  
  16248. ΓòÉΓòÉΓòÉ 24.5. Summary ΓòÉΓòÉΓòÉ
  16249.  
  16250. The following tables describe the OS/2 structures, messages, functions, and 
  16251. controls in the standard font dialog: 
  16252.  
  16253. Font Dialog Structures 
  16254.  
  16255. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16256. ΓöéStructure Name          ΓöéDescription                         Γöé
  16257. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16258. ΓöéFONTDLG                 ΓöéFont-dialog structure.              Γöé
  16259. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16260. ΓöéSTYLECHANGE             ΓöéStyle-change structure returned by  Γöé
  16261. Γöé                        Γöéthe FNTM_STYLECHANGED message.      Γöé
  16262. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16263.  
  16264. Font Dialog Messages 
  16265.  
  16266. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16267. ΓöéMessage Name            ΓöéDescription                         Γöé
  16268. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16269. ΓöéFNTM_FACENAMECHANGED    ΓöéNotifies the subclassing applicationΓöé
  16270. Γöé                        Γöéwhenever the font family name is    Γöé
  16271. Γöé                        Γöéchanged by the user.                Γöé
  16272. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16273. ΓöéFNTM_FILTERLIST         ΓöéSent whenever the font dialog is    Γöé
  16274. Γöé                        Γöépreparing to add a font family name,Γöé
  16275. Γöé                        Γöéfont style type, or point size entryΓöé
  16276. Γöé                        Γöéto the combination box fields that  Γöé
  16277. Γöé                        Γöécontain these parameters.           Γöé
  16278. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16279. ΓöéFNTM_POINTSIZECHANGED   ΓöéNotifies subclassing applications   Γöé
  16280. Γöé                        Γöéwhen the point size of the font is  Γöé
  16281. Γöé                        Γöéchanged by the user.                Γöé
  16282. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16283. ΓöéFNTM_STYLECHANGED       ΓöéNotifies subclassing applications   Γöé
  16284. Γöé                        Γöéwhen the user changes any of the    Γöé
  16285. Γöé                        Γöéattributes in the STYLECHANGE       Γöé
  16286. Γöé                        Γöéstructure.                          Γöé
  16287. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16288. ΓöéFNTM_UPDATEPREVIEW      ΓöéNotifies subclassing applications   Γöé
  16289. Γöé                        Γöébefore the preview window is        Γöé
  16290. Γöé                        Γöéupdated.                            Γöé
  16291. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16292.  
  16293. Font Dialog Functions 
  16294.  
  16295. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16296. ΓöéFunction Name           ΓöéDescription                         Γöé
  16297. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16298. ΓöéWinDefFontDlgProc       ΓöéThe default dialog procedure for theΓöé
  16299. Γöé                        Γöéfont dialog.                        Γöé
  16300. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16301. ΓöéWinFontDlg              ΓöéAllows the user to select a font.   Γöé
  16302. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16303.  
  16304. Standard Font Dialog Controls 
  16305.  
  16306. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16307. ΓöéControl Name         ΓöéID        ΓöéClass/Style       ΓöéRemarks      Γöé
  16308. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16309. ΓöéDID_OK_BUTTON        ΓöéDID_OK    ΓöéWC_BUTTON,        ΓöéButton       Γöé
  16310. Γöé                     Γöé          ΓöéBS_PUSHBUTTON|    Γöécontrol. UsedΓöé
  16311. Γöé                     Γöé          ΓöéBS_DEFAULT|       Γöéas an OK pushΓöé
  16312. Γöé                     Γöé          ΓöéWS_GROUP|         Γöébutton.      Γöé
  16313. Γöé                     Γöé          ΓöéWS_TABSTOP|       Γöé             Γöé
  16314. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöé             Γöé
  16315. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16316. ΓöéDID_CANCEL_BUTTON    ΓöéDID_CANCELΓöéWC_BUTTON,        ΓöéButton       Γöé
  16317. Γöé                     Γöé          ΓöéBS_PUSHBUTTON|    Γöécontrol. UsedΓöé
  16318. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéas a Cancel  Γöé
  16319. Γöé                     Γöé          Γöé                  Γöépush button. Γöé
  16320. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16321. ΓöéDID_FONT_DIALOG      Γöé300       ΓöéDIALOG,           ΓöéDialog       Γöé
  16322. Γöé                     Γöé          ΓöéFS_NOBYTEALIGN|   Γöécontrol ID.  Γöé
  16323. Γöé                     Γöé          ΓöéFS_DLGBORDER|     Γöé             Γöé
  16324. Γöé                     Γöé          ΓöéFS_BORDER|        Γöé             Γöé
  16325. Γöé                     Γöé          ΓöéWS_CLIPSIBLINGS|  Γöé             Γöé
  16326. Γöé                     Γöé          ΓöéWS_SAVEBITS,      Γöé             Γöé
  16327. Γöé                     Γöé          ΓöéFCF_SYSMENU|      Γöé             Γöé
  16328. Γöé                     Γöé          ΓöéFCF_TITLEBAR      Γöé             Γöé
  16329. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16330. ΓöéDID_NAME             Γöé301       ΓöéWC_COMBOBOX,      ΓöéCombination  Γöé
  16331. Γöé                     Γöé          ΓöéCBS_DROPDOWNLIST| Γöébox control. Γöé
  16332. Γöé                     Γöé          ΓöéWS_TABSTOP|       ΓöéUsed to      Γöé
  16333. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöédisplay and  Γöé
  16334. Γöé                     Γöé          Γöé                  Γöéselect font  Γöé
  16335. Γöé                     Γöé          Γöé                  Γöéfamily names.Γöé
  16336. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16337. ΓöéDID_STYLE            Γöé302       ΓöéWC_COMBOBOX,      ΓöéCombination  Γöé
  16338. Γöé                     Γöé          ΓöéCBS_DROPDOWNLIST| Γöébox control. Γöé
  16339. Γöé                     Γöé          ΓöéWS_TABSTOP|       ΓöéUsed to      Γöé
  16340. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöédisplay and  Γöé
  16341. Γöé                     Γöé          Γöé                  Γöéselect font  Γöé
  16342. Γöé                     Γöé          Γöé                  Γöéstyle names. Γöé
  16343. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16344. ΓöéDID_DISPLAY_FILTER   Γöé303       ΓöéWC_BUTTON,        ΓöéButton       Γöé
  16345. Γöé                     Γöé          ΓöéBS_AUTOCHECKBOX|  Γöécontrol. UsedΓöé
  16346. Γöé                     Γöé          ΓöéWS_TABSTOP|       Γöéto filter theΓöé
  16347. Γöé                     Γöé          ΓöéWS_GROUP|         ΓöéFont Name    Γöé
  16348. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéfield.       Γöé
  16349. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16350. ΓöéDID_PRINTER_FILTER   Γöé304       ΓöéWC_BUTTON,        ΓöéButton       Γöé
  16351. Γöé                     Γöé          ΓöéBS_AUTOCHECKBOX|  Γöécontrol. UsedΓöé
  16352. Γöé                     Γöé          ΓöéWS_TABSTOP|       Γöéto filter theΓöé
  16353. Γöé                     Γöé          ΓöéWS_VISIBLE        ΓöéFont Name    Γöé
  16354. Γöé                     Γöé          Γöé                  Γöéfield.       Γöé
  16355. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16356. ΓöéDID_SIZE             Γöé305       ΓöéWC_COMBOBOX       ΓöéCombination  Γöé
  16357. Γöé                     Γöé          ΓöéCBS_DROPDOWN|     Γöébox control. Γöé
  16358. Γöé                     Γöé          ΓöéWS_TABSTOP|       ΓöéUsed to      Γöé
  16359. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöédisplay,     Γöé
  16360. Γöé                     Γöé          Γöé                  Γöéselect, and  Γöé
  16361. Γöé                     Γöé          Γöé                  Γöéenter the    Γöé
  16362. Γöé                     Γöé          Γöé                  Γöétype size of Γöé
  16363. Γöé                     Γöé          Γöé                  Γöéthe selected Γöé
  16364. Γöé                     Γöé          Γöé                  Γöéfont.        Γöé
  16365. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16366. ΓöéDID_SAMPLE           Γöé306       ΓöéWC_STATIC,        ΓöéStatic text  Γöé
  16367. Γöé                     Γöé          ΓöéSS_TEXT|          Γöécontrol. UsedΓöé
  16368. Γöé                     Γöé          ΓöéDT_CENTER|        Γöéto display   Γöé
  16369. Γöé                     Γöé          ΓöéDT_VCENTER|       Γöéthe preview  Γöé
  16370. Γöé                     Γöé          ΓöéWS_GROUP|         Γöéstring in theΓöé
  16371. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéselected     Γöé
  16372. Γöé                     Γöé          Γöé                  Γöéfont.        Γöé
  16373. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16374. ΓöéDID_OUTLINE          Γöé307       ΓöéWC_BUTTON,        ΓöéCheck box    Γöé
  16375. Γöé                     Γöé          ΓöéBS_AUTOCHECKBOX|  Γöécontrol. UsedΓöé
  16376. Γöé                     Γöé          ΓöéWS_TABSTOP|       Γöéto select theΓöé
  16377. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéoutline      Γöé
  16378. Γöé                     Γöé          Γöé                  Γöéemphasis of  Γöé
  16379. Γöé                     Γöé          Γöé                  Γöéthe selected Γöé
  16380. Γöé                     Γöé          Γöé                  Γöéfont.        Γöé
  16381. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16382. ΓöéDID_UNDERSCORE       Γöé308       ΓöéWC_BUTTON,        ΓöéCheck box    Γöé
  16383. Γöé                     Γöé          ΓöéBS_AUTOCHECKBOX|  Γöécontrol. UsedΓöé
  16384. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéto select theΓöé
  16385. Γöé                     Γöé          Γöé                  Γöéunderscore   Γöé
  16386. Γöé                     Γöé          Γöé                  Γöéemphasis of  Γöé
  16387. Γöé                     Γöé          Γöé                  Γöéthe selected Γöé
  16388. Γöé                     Γöé          Γöé                  Γöéfont.        Γöé
  16389. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16390. ΓöéDID_STRIKEOUT        Γöé309       ΓöéWC_BUTTON,        ΓöéCheck box    Γöé
  16391. Γöé                     Γöé          ΓöéBS_AUTOCHECKBOX|  Γöécontrol. UsedΓöé
  16392. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéto select    Γöé
  16393. Γöé                     Γöé          Γöé                  Γöéstrikeout    Γöé
  16394. Γöé                     Γöé          Γöé                  Γöéemphasis of  Γöé
  16395. Γöé                     Γöé          Γöé                  Γöéthe selected Γöé
  16396. Γöé                     Γöé          Γöé                  Γöéfont.        Γöé
  16397. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16398. ΓöéDID_HELP_BUTTON      Γöé310       ΓöéWC_BUTTON,        ΓöéButton       Γöé
  16399. Γöé                     Γöé          ΓöéBS_PUSHBUTTON|    Γöécontrol. UsedΓöé
  16400. Γöé                     Γöé          ΓöéBS_HELP|          Γöéto request   Γöé
  16401. Γöé                     Γöé          ΓöéBS_NOPOINTERFOCUS|Γöéhelp from theΓöé
  16402. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéapplication. Γöé
  16403. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16404. ΓöéDID_APPLY_BUTTON     Γöé311       ΓöéWC_BUTTON,        ΓöéButton       Γöé
  16405. Γöé                     Γöé          ΓöéBS_PUSHBUTTON|    Γöécontrol      Γöé
  16406. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéprovided by  Γöé
  16407. Γöé                     Γöé          Γöé                  Γöéthe          Γöé
  16408. Γöé                     Γöé          Γöé                  Γöéapplication. Γöé
  16409. Γöé                     Γöé          Γöé                  ΓöéUsed as an   Γöé
  16410. Γöé                     Γöé          Γöé                  ΓöéApply push   Γöé
  16411. Γöé                     Γöé          Γöé                  Γöébutton in    Γöé
  16412. Γöé                     Γöé          Γöé                  Γöémodeless     Γöé
  16413. Γöé                     Γöé          Γöé                  Γöéapplications.Γöé
  16414. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16415. ΓöéDID_RESET_BUTTON     Γöé312       ΓöéWC_BUTTON,        ΓöéButton       Γöé
  16416. Γöé                     Γöé          ΓöéBS_PUSHBUTTON|    Γöécontrol      Γöé
  16417. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéprovided by  Γöé
  16418. Γöé                     Γöé          Γöé                  Γöéthe          Γöé
  16419. Γöé                     Γöé          Γöé                  Γöéapplication. Γöé
  16420. Γöé                     Γöé          Γöé                  ΓöéUsed as a    Γöé
  16421. Γöé                     Γöé          Γöé                  ΓöéReset push   Γöé
  16422. Γöé                     Γöé          Γöé                  Γöébutton.      Γöé
  16423. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16424. ΓöéDID_NAME_PREFIX      Γöé313       ΓöéWC_STATIC,        ΓöéStatic text  Γöé
  16425. Γöé                     Γöé          ΓöéSS_TEXT| DT_LEFT| Γöécontrol.     Γöé
  16426. Γöé                     Γöé          ΓöéDT_TOP| WS_GROUP| ΓöéLabel for theΓöé
  16427. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéfont Family  Γöé
  16428. Γöé                     Γöé          Γöé                  ΓöéName field.  Γöé
  16429. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16430. ΓöéDID_STYLE_PREFIX     Γöé314       ΓöéWC_STATIC,        ΓöéStatic text  Γöé
  16431. Γöé                     Γöé          ΓöéSS_TEXT| DT_LEFT| Γöécontrol.     Γöé
  16432. Γöé                     Γöé          ΓöéDT_TOP| WS_GROUP| ΓöéLabel for theΓöé
  16433. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéfont Style   Γöé
  16434. Γöé                     Γöé          Γöé                  ΓöéName field.  Γöé
  16435. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16436. ΓöéDID_SIZE_PREFIX      Γöé315       ΓöéWC_STATIC,        ΓöéStatic text  Γöé
  16437. Γöé                     Γöé          ΓöéSS_TEXT| DT_LEFT| Γöécontrol.     Γöé
  16438. Γöé                     Γöé          ΓöéDT_TOP| WS_GROUP| ΓöéLabel for theΓöé
  16439. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöéfont Type    Γöé
  16440. Γöé                     Γöé          Γöé                  ΓöéSize field.  Γöé
  16441. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16442. ΓöéDID_SAMPLE_GROUPBOX  Γöé316       ΓöéWC_STATIC,        ΓöéGroup box    Γöé
  16443. Γöé                     Γöé          ΓöéSS_GROUPBOX|      Γöéaround a     Γöé
  16444. Γöé                     Γöé          ΓöéWS_GROUP|         Γöésample field.Γöé
  16445. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöé             Γöé
  16446. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16447. ΓöéDID_EMPHASIS_GROUPBOXΓöé317       ΓöéWC_STATIC,        ΓöéGroup box    Γöé
  16448. Γöé                     Γöé          ΓöéSS_GROUPBOX|      Γöéaround the   Γöé
  16449. Γöé                     Γöé          ΓöéWS_GROUP|         Γöéemphasis     Γöé
  16450. Γöé                     Γöé          ΓöéWS_VISIBLE        Γöécheck boxes. Γöé
  16451. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16452.  
  16453.  
  16454. ΓòÉΓòÉΓòÉ 25. File Dialog Controls ΓòÉΓòÉΓòÉ
  16455.  
  16456. File dialog controls provide basic functions that enable users to do the 
  16457. following: 
  16458.  
  16459. o Display and select from a list of drives, directories, and files. 
  16460. o Enter a file name directly. 
  16461. o Filter the file names before they are displayed. 
  16462. o Display active network connections. 
  16463. o Specify .TYPE EA extended attributes. 
  16464. o Interact with a single-selection or multiple-selection file dialog. 
  16465. o Interact with a modal or modeless file dialog. 
  16466.  
  16467. These basic functions can be extended to meet the requirements of PM 
  16468. applications. 
  16469.  
  16470.  
  16471. ΓòÉΓòÉΓòÉ 25.1. About File Dialogs ΓòÉΓòÉΓòÉ
  16472.  
  16473. The file dialog control enables you to implement Open or SaveAs dialogs. The 
  16474. following figures illustrate these two dialogs. 
  16475.  
  16476. Open Dialog 
  16477.  
  16478. SaveAs Dialog 
  16479.  
  16480.  
  16481. ΓòÉΓòÉΓòÉ 25.2. Creating a File Dialog ΓòÉΓòÉΓòÉ
  16482.  
  16483. To present a file dialog to users, your application must do the following: 
  16484.  
  16485.  1. Allocate storage for a FILEDLG structure and set all fields to NULL. 
  16486.  2. Initialize the fields in the FILEDLG structure. 
  16487.  
  16488.     The application must do the following: 
  16489.  
  16490.     a. Set the cbSize field to the size of the structure. 
  16491.  
  16492.     b. Set the fl field to indicate the type of dialog.  You must set the 
  16493.        FDS_OPEN_DIALOG or FDS_SAVEAS_DIALOG flags. 
  16494.  
  16495.     The application can set the following: 
  16496.  
  16497.     a. An application-specific title.  Pass the pointer to a null-terminated 
  16498.        string in the pszTitle field. 
  16499.  
  16500.     b. Application-specific text for the OK push button.  Pass the pointer to a 
  16501.        null-terminated string in the pszOKButton field. 
  16502.  
  16503.     c. Specify a custom dialog procedure to provide application-specific 
  16504.        function.  Pass the pointer to a window procedure in the pfnDlgProc 
  16505.        field. 
  16506.  
  16507.     d. Set other FDS_* flags in the fl field to customize the dialog style. 
  16508.        See the description of this field for the FILEDLG structure in the OS/2 
  16509.        2.0 Programming Reference for a list of the flags you can specify. 
  16510.  
  16511.     e. Pass the initial position of the dialog in the x and y fields. 
  16512.  
  16513.  3. Initialize the FILEDLG structure with any values that users should see when 
  16514.     they invoke the dialog for the first time.  For example, you can: 
  16515.  
  16516.