home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mclb.zip / lb.pak / MCLB.INF (.txt) < prev    next >
OS/2 Help File  |  1995-08-17  |  32KB  |  835 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. This document is the programmer's reference for the MultiColumn ListBox (MCLB) 
  5. PM control.  For more information on programming with this control, see OS/2 
  6. Developer Magazine, Nov/Dec 1995. 
  7.  
  8. Acknowledgments 
  9. This control was originally conceived at the IBM United Kingdom Warwick 
  10. Development group by Charles Cooper.  The control was rewritten and enhanced by 
  11. Mark McMillan of IBM, Research Triangle Park, USA. 
  12.  
  13. Description 
  14. The MultiColumn ListBox is a very useful PM custom control designed to overcome 
  15. some of the limitations of the standard PM listbox and container controls.  It 
  16. is simpler and in many cases faster than a container, but provides multicolumn 
  17. (tabular) support for display of column-oriented data. 
  18.  
  19. The MCLB supports individually sizable columns, optional horizontal scroll bars 
  20. at the base of each column, seperate font and color support for the titles and 
  21. column data, owner-drawn lists, and a simple listbox-style programming model. 
  22.  
  23. The MCLB can be subclassed with the DMLB (Direct Manipulation ListBox) function 
  24. also supplied in this toolkit to provide drag/drop reordering capability to the 
  25. MCLB. 
  26.  
  27.  
  28. ΓòÉΓòÉΓòÉ 2. Creating an MCLB ΓòÉΓòÉΓòÉ
  29.  
  30. To create an MCLB the application must create an MCLBINFO data structure and 
  31. initialize it.  At a minimum, the following fields must be supplied: 
  32.  
  33. o Size 
  34. o Cols 
  35. o Titles 
  36. o InitSizes 
  37. o TabChar 
  38.  
  39. The application must then call MCLBCreateWindow to create the MCLB control. 
  40.  
  41. As supplied in the toolkit, the MCLB does not support direct creation from a 
  42. dialog template. However, it is very easy to get the same effect by defining a 
  43. static rectangle (or any other control) in the dialog template to act as a 
  44. placeholder.  During WM_INITDLG processing the application can create the MCLB 
  45. and size/position it exactly on top of the placeholder control. See the SAMP1 
  46. sample for code that does this. 
  47.  
  48.  
  49. ΓòÉΓòÉΓòÉ 3. Styles ΓòÉΓòÉΓòÉ
  50.  
  51. The visual appearance of an MCLB can be modified through the use of 'style' 
  52. flags which are passed to the MCLBCreateWindow API when the control is created. 
  53. The style flags cannot be changed after the MCLB is created. In addition to the 
  54. flags described below, any standard PM WS_* window style flags can be used 
  55. (e.g. WS_VISIBLE).  The standard PM listbox styles are shown here, along with 
  56. the extended styles unqiue to MCLB controls: 
  57.  
  58. o LS_MULTIPLESEL  Allow multiple items to be selected in the list (same as 
  59.   normal PM listbox control). 
  60.  
  61. o LS_EXTENDEDSEL  Allows extended selection methods to be used in the list 
  62.   (same as normal PM listbox control). 
  63.  
  64. o LS_HORZSCROLL  When this style is specified each column of the MCLB will have 
  65.   a horizontal scroll bar at the bottom.  Note that for LS_OWNERDRAW style, the 
  66.   application must properly process WM_MEASUREITEM messages in order for the 
  67.   scroll bar to work correctly.  This is true even if the application returns 
  68.   FALSE from WM_DRAWITEM and lets PM draw the text of an ownerdraw listbox. 
  69.  
  70. o LS_OWNERDRAW  The listbox items are to be drawn by the application. When this 
  71.   style is used the application must respond to the WM_MEASUREITEM and 
  72.   WM_DRAWITEM messages.  This style applies to all columns of the MCLB (e.g. 
  73.   the application will be responsible for drawing all items in all columns). 
  74.  
  75. o LS_NOADJUSTPOS  When this style is specified the control is sized exactly as 
  76.   specified and the last row may be partially visible.  When this style is not 
  77.   specified, the columns will be vertically sized such that the last row is not 
  78.   clipped.  The overall MCLB control size is never altered (the size of the 
  79.   title area will be adjusted to prevent clipping if this style is not 
  80.   specified). 
  81.  
  82. o MCLBS_CUASELECT  When this style is specified the LS_MULTIPLESEL and 
  83.   LS_EXTENDEDSEL styles will also be used.  This style causes the MCLB to 
  84.   deselect all items except one when the left button is pressed.  This 
  85.   behaviour is consistent with the container control.  Without this style, a 
  86.   left button press on an already selected item will have no effect. 
  87.  
  88. o MCLBS_NOCOLRESIZE  When this style is specified the user is not allowed to 
  89.   change the relative column sizes.  The MCLB will be displayed without 
  90.   splitbars between the columns (just thin vertical lines will be drawn between 
  91.   the columns).  This style applies to all columns of the MCLB. It is not 
  92.   possible to have some sizable and some fixed-width columns in the same MCLB 
  93.   control.  The default is for the columns to be sizable and movable splitbars 
  94.   to be displayed between each column. 
  95.  
  96. o MCLBS_SIZEMETHOD_PROP  This is the default SIZEMETHOD style if none is 
  97.   specified.  The SIZEMETHOD styles determine how the column sizes are adjusted 
  98.   if the MCLB control is resized by the application.  Note that this is not 
  99.   related to user-initiated column sizing, but only to what happens when the 
  100.   entire MCLB size is changed. 
  101.  
  102.   This method will cause each column size to be adjusted in proportion to its 
  103.   previous size.  For example, if a column was 20% of the width of the MCLB 
  104.   before resizing, it will be adjusted to be 20% of the width after resizing. 
  105.   Thus each column remains the same relative size when the size of the control 
  106.   is changed. 
  107.  
  108. o MCLBS_SIZEMETHOD_LEFT  With this SIZEMETHOD style, any change in the size of 
  109.   the MCLB control is reflected in the leftmost MCLB columns.  If the MCLB size 
  110.   is increased, the leftmost column will increase by the same amount.  If the 
  111.   size is decreased, column size reduction starts in the leftmost column and 
  112.   continues left-to-right reducing each column to zero width until the new 
  113.   overall control width is achieved. 
  114.  
  115. o MCLBS_SIZEMETHOD_CUSTOM  With this SIZEMETHOD style, any change in the size 
  116.   of the MCLB control must be handled by the application.  When the size of the 
  117.   MCLB is changed the application will be sent a WM_CONTROL message with a 
  118.   notification code of MCLBN_CUSTOMSIZE .  Message parameter 2 will be a 
  119.   pointer to array of n+1 LONG values where "n" is the number of columns. The 
  120.   [0] element will contain the new overall width (accounting for margins, 
  121.   dividers, etc).  The [1]-[n] elements contain the current column widths in 
  122.   pixels.  The application must set the new column widths in the [1]-[n] array 
  123.   elements.  The sum of the [1]-[n] values should equal the overall width given 
  124.   in element [0]. 
  125.  
  126.   This style can be used to implement specific column sizing rules as may be 
  127.   required for particular applications.  For example, it might be used to 
  128.   prevent a particular column of being reduced below a certain minimum size. 
  129.   There are some important notes to consider in using this style: 
  130.  
  131.     1. This style effects only the adjustment of column sizes that occures when 
  132.        the MCLB control size is changed.  It does not effect user-controlled 
  133.        column sizing. 
  134.  
  135.     2. If the sum of the [1]-[n] elements is not equal to the value of the [0] 
  136.        element, the last column will be used to make up the difference. 
  137.  
  138.     3. The application can choose to use the default sizing method by returning 
  139.        FALSE from the MCLBN_CUSTOMSIZE  control message. 
  140.  
  141.  
  142. ΓòÉΓòÉΓòÉ 4. MCLBINFO Data Structure ΓòÉΓòÉΓòÉ
  143.  
  144. The MCLBINFO structure describes the characteristics of an MCLB control. This 
  145. structure is created and filled in by an application prior to calling the 
  146. MCLBCreateWindow API.  It is also returned to the application with the current 
  147. values when the application sends a MCLB_QUERYINFO  message. 
  148.  
  149. typedef struct _MCLBINFO {
  150.   ULONG  Size;                    /* Length of this structure                   */
  151.   char   *Titles;                 /* Title strings (TabChar separated)          */
  152.   char   TitleFont[MAX_FONTLEN];  /* Title font (null to inherit from owner)    */
  153.   char   ListFont[MAX_FONTLEN];   /* List  font (null to inherit from owner)    */
  154.   ULONG  TitleBColor;             /* Title background color (RGB)               */
  155.   ULONG  TitleFColor;             /* Title foreground color (RGB)               */
  156.   ULONG  ListBColor;              /* List  background color (RGB)               */
  157.   ULONG  ListFColor;              /* List  foreground color (RGB)               */
  158.   LONG   *InitSizes;              /* Ptr to array of initial sizes              */
  159.   char   _Reserved[64];           /* Reserved for future use                    */
  160.   USHORT Cols;                    /* Number of columns                          */
  161.   char   TabChar;                 /* Data column separator character            */
  162.   char   _Padd;                   /* Padd for separator character (zero)        */
  163. } MCLBINFO;
  164.  
  165.  
  166. ΓòÉΓòÉΓòÉ 5. WM_CONTROL Message Reference ΓòÉΓòÉΓòÉ
  167.  
  168. This section describes all the WM_CONTROL messages generated by a MCLB control 
  169. and sent to the control owner.  Note that most of the standard LN_* messages 
  170. are the same as for standard PM listbox controls.  Only LN_* messages that 
  171. differ from the PM definitions are shown here. 
  172.  
  173. For some WM_CONTROL messages it may be necessary for the application to know 
  174. which column of the MCLB generated the message.  The application may send the 
  175. MCLB_QUERYCTLCOL  message to get the number of the column which caused the 
  176. current WM_CONTROL message.  Note that MCLB_QUERYCTLCOL  must only be sent 
  177. during the processing of a WM_CONTROL message. 
  178.  
  179.  
  180. ΓòÉΓòÉΓòÉ 5.1. LN_* ΓòÉΓòÉΓòÉ
  181.  
  182. The following WM_CONTROL listbox notification messages retain their normal PM 
  183. meanings.  Note that the control ID in SHORT 1 of mp1, and the window handle in 
  184. mp2 are those of the MCLB control itself. 
  185.  
  186.    LN_ENTER
  187.    LN_KILLFOCUS
  188.    LN_SETFOCUS
  189.    LN_SCROLL
  190.    LN_SELECT
  191.  
  192.  
  193. ΓòÉΓòÉΓòÉ 5.2. MCLBN_COLSIZED ΓòÉΓòÉΓòÉ
  194.  
  195. This WM_CONTROL notification is sent by the MCLB to its owner when the user has 
  196. moved a column divider. 
  197.  
  198. Param1 
  199.  
  200.    MCLBID (USHORT) 
  201.              ID of the MCLB control 
  202.  
  203.    NotifyCode (USHORT) 
  204.              MCLBN_COLSIZED 
  205.  
  206. Param2 
  207.  
  208.    ColNum (USHORT) 
  209.              Number of the column to the left of the moved divider.  Note that 
  210.              this column and the ColNum+1 column have both changed size. 
  211.  
  212. Returns
  213. Nothing 
  214.  
  215.  
  216. Remarks 
  217. This message occures only when the user moves a column divider in the MCLB. It 
  218. does not occure when the size of the MCLB control is changed.  The 
  219. MCLB_QUERYCOLSIZES  message can be used to find the new column sizes. 
  220.  
  221.  
  222. Related 
  223. MCLBS_NOCOLRESIZE style 
  224. MCLB_QUERYCOLSIZES  message 
  225.  
  226.  
  227. ΓòÉΓòÉΓòÉ 5.3. MCLBN_CUSTOMSIZE ΓòÉΓòÉΓòÉ
  228.  
  229. This WM_CONTROL notification is sent by the MCLB to its owner when the control 
  230. window size has been changed and the control has the MCLBS_SIZEMETHOD_CUSTOM 
  231. style. 
  232.  
  233. Param1 
  234.  
  235.    MCLBID (USHORT) 
  236.              ID of the MCLB control 
  237.  
  238.    NotifyCode (USHORT) 
  239.              MCLBN_CUSTOMSIZE 
  240.  
  241. Param2 
  242.  
  243.    Sizes (LONG *) 
  244.              Pointer to array of LONG values.  The array has N+1 elements where 
  245.              N is the number of columns.  The [0] element contains the new 
  246.              width the columns must fit into.  The [1] to [N] elements contain 
  247.              the current column sizes in pixels. 
  248.  
  249. Returns
  250.  
  251.    Processed (BOOL) 
  252.              Return TRUE if the application has updated the [1] to [N] elements 
  253.              of the array with the new column widths.  Return FALSE for the 
  254.              MCLB control to proportionally resize the columns. 
  255.  
  256.  
  257. Remarks 
  258. This message occures only if the MCLBS_SIZEMETHOD_CUSTOM style is used. The 
  259. application can choose to process this message and return TRUE, or return FALSE 
  260. and let the MCLB control perform default proportional column sizing. 
  261.  
  262. If the application returns TRUE, the [1] to [N] elements of the array must be 
  263. updated with the new adjusted column sizes.  The sum of the [1] to [N] elements 
  264. should be equal to the supplied [0] element value. E.g. the new column sizes 
  265. must add up to the new width allocated for the columns. 
  266.  
  267.  
  268. Related 
  269. MCLBS_SIZEMETHOD_CUSTOM style 
  270.  
  271.  
  272. ΓòÉΓòÉΓòÉ 5.4. MCLBN_PPCHANGED ΓòÉΓòÉΓòÉ
  273.  
  274. This WM_CONTROL notification is sent by the MCLB to its owner when any 
  275. presentation parameter is altered. 
  276.  
  277. Param1 
  278.  
  279.    MCLBID (USHORT) 
  280.              ID of the MCLB control 
  281.  
  282.    NotifyCode (USHORT) 
  283.              MCLBN_PPCHANGED 
  284.  
  285. Param2 
  286.  
  287.    ColNum (USHORT) 
  288.              Number of the column that originated the presentation parameter 
  289.              changes or zero if the title area was changed. Note that all 
  290.              columns will have the same presentation parameters (e.g. all 
  291.              columns will use the same font and colors). 
  292.  
  293.    PPType (USHORT) 
  294.              Indicates the type of presentation parameter that was changed: 
  295.  
  296.                             MCLBPP_FONT         Font changed
  297.                             MCLBPP_FORECOLOR    Foreground color changed
  298.                             MCLBPP_BACKCOLOR    Background color changed
  299.  
  300. Returns
  301. Nothing 
  302.  
  303.  
  304. Remarks 
  305. The MCLB_QUERYINFO  message can be used to determine the current fonts and 
  306. colors of the MCLB. 
  307.  
  308.  
  309. Related 
  310. MCLB_QUERYINFO 
  311.  
  312.  
  313. ΓòÉΓòÉΓòÉ 6. Owner-Draw Messages ΓòÉΓòÉΓòÉ
  314.  
  315. This section describes messages the owner of an MCLB will receive if the 
  316. LS_OWNERDRAW style is used. 
  317.  
  318.  
  319. ΓòÉΓòÉΓòÉ 6.1. WM_MEASUREITEM ΓòÉΓòÉΓòÉ
  320.  
  321. This message is sent to the owner of an owner-draw style MCLB to determine the 
  322. size of a listbox item.  This message will occure for each item of each column 
  323. of the listbox.  The measurements returned must be for just one column, not the 
  324. aggregate size of all columns. 
  325.  
  326. This standard PM message is extended for an MCLB to include the column number 
  327. in SHORT 2 of mp1 (unused by PM). 
  328.  
  329. Param1 
  330.  
  331.    MCLBId (SHORT) 
  332.              ID of the MCLB control. 
  333.  
  334.    Col (USHORT) 
  335.              Column number of the item to be measured. 
  336.  
  337. Param2 
  338.  
  339.    ItemIndex (SHORT) 
  340.              Index of the item to be measured. 
  341.  
  342. Returns
  343.  
  344.    Height (SHORT) 
  345.              Height of the item. 
  346.  
  347.    Width (SHORT) 
  348.              Width of the item. 
  349.  
  350.  
  351. Remarks 
  352. The application should be prepared to receive this message when the MCLB 
  353. control is created (e.g. during MCLBCreateWindow processing). 
  354.  
  355. Note that the vertical height of all items in all columns must be the same, and 
  356. this value must be equal to or greater than the vertical font size for the 
  357. listbox items. 
  358.  
  359. The width must be the actual width of the item in the column.  If the column 
  360. contains text the width returned should be the actual drawn text width. 
  361.  
  362.  
  363. Related 
  364.  
  365.  
  366. ΓòÉΓòÉΓòÉ 6.2. WM_DRAWITEM ΓòÉΓòÉΓòÉ
  367.  
  368. This message is sent to the owner of an owner-draw style MCLB when any item in 
  369. any column needs to be redrawn.  Note that this draw message applies to just a 
  370. single item in a single column, not to an entire row. 
  371.  
  372. This standard PM message is extended for an MCLB to include the column number 
  373. in SHORT 2 of mp1 (unused by PM). 
  374.  
  375. Param1 
  376.  
  377.    MCLBId (SHORT) 
  378.              ID of the MCLB control. 
  379.  
  380.    Col (USHORT) 
  381.              Column number of the item to be drawn. 
  382.  
  383. Param2 
  384.  
  385.    DrawInfo (OWNERITEM *) 
  386.              Pointer to an OWNERITEM data structure. 
  387.  
  388. Returns
  389.  
  390.    Drawn (BOOL) 
  391.              Return TRUE if the application has drawn the item.  Return FALSE 
  392.              for the listbox to draw the item text. 
  393.  
  394.  
  395. Remarks 
  396.  
  397.  
  398. Related 
  399.  
  400.  
  401. ΓòÉΓòÉΓòÉ 7. MCLB Messages ΓòÉΓòÉΓòÉ
  402.  
  403. This section describes all the messages an application can send to a MCLB 
  404. control. Unless noted otherwise here, all the PM listbox LM_* messages work as 
  405. documented for a listbox control.  Also unless stated otherwise, item text 
  406. consists of all the column data separated with the column separator character. 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 7.1. LM_INSERTITEM ΓòÉΓòÉΓòÉ
  410.  
  411. This standard listbox message is extended to include the column number by which 
  412. the inserted item is to be sorted.  SHORT 2 of mp1 is unused by PM, but is 
  413. defined for an MCLB as the column number by which sorting is to be done.  If it 
  414. is zero or greater than the number of columns, LIT_ERORR will be returned. 
  415.  
  416. It is recomended that if many items are to be inserted in the MBLB, that 
  417. WinEnableWindowUpdate() be used to improve performance.  Window updating should 
  418. be disabled before the first insert and enabled after the last insert. 
  419.  
  420. Param1 
  421.  
  422.    InsertIndex (SHORT) 
  423.              Position in the list at which to insert, or LIT_END, 
  424.              LIT_SORTASCENDING, or LIT_SORTDECENDING. 
  425.  
  426.    SortCol (USHORT) 
  427.              If InsertIndex is LIT_SORTASCENDING or LIT_SORTDECENDING then the 
  428.              specified column number is used to determine the sorting sequence. 
  429.  
  430. Param2 
  431.  
  432.    Text (char *) 
  433.              Pointer to string to be inserted.  Column data is separated in the 
  434.              string by the column separator charcter defined in MCLBINFO when 
  435.              the MCLB was created. 
  436.  
  437. Returns
  438.  
  439.    InsertedAt (SHORT) 
  440.              Index of newly inserted item or LIT_MEMERROR, or LIT_ERROR. 
  441.  
  442.  
  443. Remarks 
  444.  
  445.  
  446. Related 
  447.  
  448.  
  449. ΓòÉΓòÉΓòÉ 7.2. LM_INSERTMULTITEMS ΓòÉΓòÉΓòÉ
  450.  
  451. (Note: This is a new message in OS/2 Warp.) 
  452.  
  453. This standard listbox message is extended to include the column number by which 
  454. the inserted items are to be sorted.  The reserved2 field of the LBOXINFO 
  455. structure is used  to define the column number by which sorting is to be done. 
  456. If it is zero or greater than the number of columns, LIT_ERORR will be 
  457. returned. 
  458.  
  459. Note that due to the implementation of the MCLB, there is little performance 
  460. difference between using this message to insert items and repeated use of 
  461. LM_INSERTITEM. 
  462.  
  463. Param1 
  464.  
  465.    Info (LBOXINFO *) 
  466.              Pointer to LBOXINFO structure (new in Warp 3.0 toolkit). 
  467.  
  468. Param2 
  469.  
  470.    Strings (char **) 
  471.              Pointer to array of string pointers.  Each string represents one 
  472.              row of the MCLB using the column separator character to separate 
  473.              the data into columns. 
  474.  
  475. Returns
  476.  
  477.    InsertedAt (SHORT) 
  478.              Index of newly inserted item or LIT_MEMERROR, or LIT_ERROR. 
  479.  
  480.  
  481. Remarks 
  482.  
  483.  
  484. Related 
  485.  
  486.  
  487. ΓòÉΓòÉΓòÉ 7.3. LM_SEARCHSTRING ΓòÉΓòÉΓòÉ
  488.  
  489. This message is not fully implemented for an MCLB control. The search is 
  490. performed only on the first column. 
  491.  
  492.  
  493. ΓòÉΓòÉΓòÉ 7.4. MCLB_SETTITLES ΓòÉΓòÉΓòÉ
  494.  
  495. This message is sent to the MCLB to set the title strings (column headers). 
  496.  
  497. Param1 
  498.  
  499.    Titles (* char) 
  500.              Pointer to a character string which contains the new column 
  501.              titles.  The titles must be separated by the MCLB column separator 
  502.              character as defined in the MCLBINFO structure when the MCLB was 
  503.              created. 
  504.  
  505. Param2 
  506. Reserved 
  507.  
  508. Returns
  509. Nothing 
  510.  
  511.  
  512. Remarks 
  513.  
  514.  
  515. Related 
  516.  
  517.  
  518. ΓòÉΓòÉΓòÉ 7.5. MCLB_SETTITLEFONT ΓòÉΓòÉΓòÉ
  519.  
  520. This message is sent to the MCLB to set the font to be used for the titles. 
  521.  
  522. Param1 
  523.  
  524.    FontNameSize (* char) 
  525.              Pointer to a character string which contains the new font to be 
  526.              used. The format of the string is the same as that used in the 
  527.              WinSetPresParam() call such as "8.Helv".  This parameter may be 
  528.              NULL in which case the title font is reset to the default font. 
  529.  
  530. Param2 
  531. Reserved 
  532.  
  533. Returns
  534. Nothing 
  535.  
  536.  
  537. Remarks 
  538.  
  539.  
  540. Related 
  541.  
  542.  
  543. ΓòÉΓòÉΓòÉ 7.6. MCLB_SETLISTFONT ΓòÉΓòÉΓòÉ
  544.  
  545. This message is sent to the MCLB to set the font to be used for the list items. 
  546.  
  547. Param1 
  548.  
  549.    FontNameSize (* char) 
  550.              Pointer to a character string which contains the new font to be 
  551.              used. The format of the string is the same as that used in the 
  552.              WinSetPresParam() call such as "8.Helv".  This parameter may be 
  553.              NULL in which case the list font is reset to the default font. 
  554.  
  555. Param2 
  556. Reserved 
  557.  
  558. Returns
  559. Nothing 
  560.  
  561.  
  562. Remarks 
  563.  
  564.  
  565. Related 
  566.  
  567.  
  568. ΓòÉΓòÉΓòÉ 7.7. MCLB_SETTITLECOLORS ΓòÉΓòÉΓòÉ
  569.  
  570. This message is sent to the MCLB to set the colors to be used for the titles. 
  571.  
  572. Param1 
  573.  
  574.    Foreground (LONG) 
  575.              Contains the RGB value of the foreground color. 
  576.  
  577. Param2 
  578.  
  579.    Background (LONG) 
  580.              Contains the RGB value of the background color. 
  581.  
  582. Returns
  583. Nothing 
  584.  
  585.  
  586. Remarks 
  587. If the foreground and background colors specified are the same, the title 
  588. colors are reset to the default colors. 
  589.  
  590.  
  591. Related 
  592.  
  593.  
  594. ΓòÉΓòÉΓòÉ 7.8. MCLB_SETLISTCOLORS ΓòÉΓòÉΓòÉ
  595.  
  596. This message is sent to the MCLB to set the colors to be used for the list 
  597. items. 
  598.  
  599. Param1 
  600.  
  601.    Foreground (LONG) 
  602.              Contains the RGB value of the foreground color. 
  603.  
  604. Param2 
  605.  
  606.    Background (LONG) 
  607.              Contains the RGB value of the background color. 
  608.  
  609. Returns
  610. Nothing 
  611.  
  612.  
  613. Remarks 
  614. If the foreground and background colors specified are the same, the list colors 
  615. are reset to the default colors. 
  616.  
  617.  
  618. Related 
  619.  
  620.  
  621. ΓòÉΓòÉΓòÉ 7.9. MCLB_SETCOLSIZES ΓòÉΓòÉΓòÉ
  622.  
  623. This message is sent to the MCLB to set the columns to specific sizes. 
  624.  
  625. Param1 
  626.  
  627.    NewSizes (LONG *) 
  628.              Pointer to array of LONG values.  Array must contain at least N 
  629.              elements, where N is the number of columns in the MCLB. 
  630.  
  631. Param2 
  632. Reserved 
  633.  
  634. Returns
  635. Nothing 
  636.  
  637.  
  638. Remarks 
  639. The value of the [0] to [N-1] elements of the array must add up to the current 
  640. width of all the columns.  The current sum of the column widths can be 
  641. deterined with the MCLB_QUERYFULLSIZE  message. 
  642.  
  643.  
  644. Related 
  645.  
  646.  
  647. ΓòÉΓòÉΓòÉ 7.10. MCLB_QUERYCOLSIZES ΓòÉΓòÉΓòÉ
  648.  
  649. This message is sent to the MCLB to query the current size of the columns. 
  650.  
  651. Param1 
  652.  
  653.    Sizes (LONG *) 
  654.              Pointer to array of LONG values.  Array must contain at least N 
  655.              elements, where N is the number of columns in the MCLB. 
  656.  
  657. Param2 
  658. Reserved 
  659.  
  660. Returns
  661. Nothing 
  662.  
  663.  
  664. Remarks 
  665. The value of the [0] to [N-1] elements of the array will be set to the current 
  666. column widths in pixels. 
  667.  
  668.  
  669. Related 
  670.  
  671.  
  672. ΓòÉΓòÉΓòÉ 7.11. MCLB_QUERYINFO ΓòÉΓòÉΓòÉ
  673.  
  674. This message is sent to the MCLB to query the current MCLB configuration. 
  675.  
  676. Param1 
  677.  
  678.    Info (* MCLBINFO) 
  679.              Pointer to MCLBINFO structure.  Upon return the structured will be 
  680.              filled with the current values. 
  681.  
  682. Param2 
  683. Reserved 
  684.  
  685. Returns
  686. Nothing 
  687.  
  688.  
  689. Remarks 
  690. The value of the InitSizes array will be set to the current column sizes. 
  691.  
  692. NOTE: The application must free the InitSizes array and the Titles string. 
  693.  
  694.  
  695. Related 
  696.  
  697.  
  698. ΓòÉΓòÉΓòÉ 7.12. MCLB_QUERYSTYLE ΓòÉΓòÉΓòÉ
  699.  
  700. This message is sent to the MCLB to query the MCLB styles flags. 
  701.  
  702. Param1 
  703. Reserved 
  704.  
  705. Param2 
  706. Reserved 
  707.  
  708. Returns
  709.  
  710.    Styles (ULONG) 
  711.              Only the MCLB-specific style bits (MCLBS_* flags) will be 
  712.              returned. 
  713.  
  714.  
  715. Remarks 
  716.  
  717.  
  718. Related 
  719.  
  720.  
  721. ΓòÉΓòÉΓòÉ 7.13. MCLB_QUERYFULLSIZE ΓòÉΓòÉΓòÉ
  722.  
  723. This message is sent to the MCLB to query the sum of the column widths 
  724.  
  725. Param1 
  726. Reserved 
  727.  
  728. Param2 
  729. Reserved 
  730.  
  731. Returns
  732.  
  733.    Width (LONG) 
  734.              The sum of the current column widths. 
  735.  
  736.  
  737. Remarks 
  738. Note that this value is not the same as the width of the control window. This 
  739. value is the width of the control minus the width of all dividers, vertical 
  740. scroll bars, borders, etc.  It is the number of pixels actually allocated for 
  741. the columns of data. 
  742.  
  743.  
  744. Related 
  745.  
  746.  
  747. ΓòÉΓòÉΓòÉ 7.14. MCLB_QUERYCTLCOL ΓòÉΓòÉΓòÉ
  748.  
  749. This message is sent to the MCLB to query column which caused the current 
  750. WM_CONTROL message. 
  751.  
  752. Param1 
  753. Reserved 
  754.  
  755. Param2 
  756. Reserved 
  757.  
  758. Returns
  759.  
  760.    Col (USHORT) 
  761.              The number of the column which caused the current WM_CONTROL 
  762.              message. 
  763.  
  764.  
  765. Remarks 
  766. This message must be sent to the MCLB, not posted.  The results of this message 
  767. are only defined during WM_CONTROL message processing. 
  768.  
  769. It can be useful at times to know which column of an MCLB has caused a 
  770. particular WM_CONTROL message to be sent to the owner.  The owner can discover 
  771. this by sending the MCLB this message.  This message must be sent while the 
  772. owner is processing the WM_CONTROL message of interest. 
  773.  
  774.  
  775. Related 
  776.  
  777.  
  778. ΓòÉΓòÉΓòÉ 8. Programming Interfaces (API) ΓòÉΓòÉΓòÉ
  779.  
  780. This section describes each of the callable MCLB programming interfaces. 
  781.  
  782.  
  783. ΓòÉΓòÉΓòÉ 8.1. MCLBCreateWindow ΓòÉΓòÉΓòÉ
  784.  
  785. This function creates an MCLB and returns its window handle. 
  786.  
  787. Syntax: 
  788.  
  789. MCLBHwnd MCLBCreateWindow(Parent, Owner, Style, x, y, cx, cy, Behind, Id, MCLBInfo)
  790.  
  791. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  792. ΓöéName           ΓöéType      ΓöéIn/Out    ΓöéDescription                                       Γöé
  793. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  794. ΓöéParent         ΓöéHWND      Γöéinput     ΓöéHandle of the parent window.                      Γöé
  795. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  796. ΓöéOwner          ΓöéHWND      Γöéinput     ΓöéHandle of the owner window.  This window will     Γöé
  797. Γöé               Γöé          Γöé          Γöérecieve WM_CONTROL messages from the MCLB.        Γöé
  798. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  799. ΓöéStyle          ΓöéULONG     Γöéinput     ΓöéStyle flags.  This is a logical-OR combination of Γöé
  800. Γöé               Γöé          Γöé          ΓöéWS_* window styles, LS_* listbox styles, and      Γöé
  801. Γöé               Γöé          Γöé          ΓöéMCLBS_* MCLB styles.                              Γöé
  802. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  803. Γöéx              ΓöéLONG      Γöéinput     ΓöéX position of the window relative to the Parent   Γöé
  804. Γöé               Γöé          Γöé          Γöéwindow.                                           Γöé
  805. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  806. Γöéy              ΓöéLONG      Γöéinput     ΓöéY position of the window relative to the Parent   Γöé
  807. Γöé               Γöé          Γöé          Γöéwindow.                                           Γöé
  808. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  809. Γöécx             ΓöéLONG      Γöéinput     ΓöéWidth of the window.                              Γöé
  810. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  811. Γöécy             ΓöéLONG      Γöéinput     ΓöéHeight of the window.                             Γöé
  812. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  813. ΓöéBehind         ΓöéHWND      Γöéinput     ΓöéSibling window behind which this window is to be  Γöé
  814. Γöé               Γöé          Γöé          Γöéplaced.  HWND_TOP or HWND_BOTTOM can be used to   Γöé
  815. Γöé               Γöé          Γöé          Γöéplace this window on top of, or behind all other  Γöé
  816. Γöé               Γöé          Γöé          Γöésibling windows.                                  Γöé
  817. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  818. ΓöéId             ΓöéUSHORT    Γöéinput     ΓöéId of this window.  This Id is encoded in all     Γöé
  819. Γöé               Γöé          Γöé          ΓöéWM_CONTROL messages from this MCLB.               Γöé
  820. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  821. ΓöéInfo           ΓöéMCLBINFO *Γöéinput     ΓöéPointer to completed MCLBINFO data structure.     Γöé
  822. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  823. Returns 
  824.  
  825. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  826. ΓöéMCLBHwnd       ΓöéHWND      Γöéreturn    ΓöéHandle of the MCLB window, or NULLHANDLE if       Γöé
  827. Γöé               Γöé          Γöé          Γöécreation failed.                                  Γöé
  828. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  829.  
  830.  
  831. Remarks 
  832.  
  833.  
  834. Related 
  835. MCLBINFO