home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lstbx4.zip / Listbox.H < prev    next >
Text File  |  1994-07-05  |  23KB  |  481 lines

  1.  
  2. /* Program name: Listbox.C    Title: A List Box    Replacement        */
  3. /*                                    */
  4. /* OS/2    Developer Magazine, Issue:  May    '94, page 12                    */
  5. /* Author:  Mark Benge       IBM Corp.                    */
  6. /*        Matt Smith       Prominare Inc.                */
  7. /* Description:     Replacement for OS/2 List Box,    first of a series.    */
  8. /*                                    */
  9. /* Program Requirements:  OS/2 2.x                    */
  10. /*              IBM C    Set++                    */
  11. /*              WATCOM C 386/9.0                */
  12. /*              Borland C++ for OS/2                */
  13. /*              OS/2 Toolkit                    */
  14.  
  15. /* Copyright ╕ International Business Machines Corp. 1991-1994        */
  16. /* Copyright ╕ 1989-1994  Prominare Inc.  All Rights Reserved.        */
  17.  
  18. /* listbox.h       Created:    1993-10-08  Revised:    1994-02-28    */
  19.  
  20. /* List    Box Control Constant Definition    Header                */
  21.  
  22. /* Functions are defined with strong typing to insure correct usage    */
  23. /* within the final program and    correct    linkage                */
  24.  
  25. /************************************************************************/ /* 1.1 */
  26. /************************************************************************/ /* 1.1 */
  27. /*                                    */ /* 1.1 */
  28. /************************************************************************/ /* 1.1 */
  29. /*                                    */ /* 1.1 */
  30. /*     Additions for Version 1.1 of the    control    are denoted with    */ /* 1.1 */
  31. /*     comments    starting in column 76 with the 1.1 version number    */ /* 1.1 */
  32. /*                                    */ /* 1.1 */
  33. /************************************************************************/ /* 1.1 */
  34. /*                                    */ /* 1.1 */
  35. /************************************************************************/ /* 1.1 */
  36. /************************************************************************/ /* 1.1 */
  37.  
  38. /************************************************************************/ /* 1.2 */
  39. /************************************************************************/ /* 1.2 */
  40. /*                                    */ /* 1.2 */
  41. /************************************************************************/ /* 1.2 */
  42. /*                                    */ /* 1.2 */
  43. /*     Additions for Version 1.2 of the    control    are denoted with    */ /* 1.2 */
  44. /*     comments    starting in column 76 with the 1.2 version number    */ /* 1.2 */
  45. /*                                    */ /* 1.2 */
  46. /************************************************************************/ /* 1.2 */
  47. /*                                    */ /* 1.2 */
  48. /************************************************************************/ /* 1.2 */
  49. /************************************************************************/ /* 1.2 */
  50.  
  51.  
  52. /* --- Memory Types ---------------------------------------------------    */
  53.  
  54. typedef    ULONG HHEAPMEM;
  55. #define    HALLOC_DEFAULT          0xffffffffUL
  56.  
  57. /* --- Internal    Structures --------------------------------------------    */
  58.  
  59. #define    USER_RESERVED       8       /* Control Reserved Memory Size    */
  60.  
  61. #define    QUCWP_WNDP (QWL_USER + 4)  /* Pointer to Internal Control Data    */
  62.  
  63. #define    CBLK_LIST       1024       /* List Array Block Size        */
  64.  
  65. typedef    struct _LISTITEM
  66.    {                   /* Structure    Size:  24 Bytes        */
  67.    PSZ         pszText;           /* Text Pointer            */
  68.    ULONG     cText;           /* Text Length            */
  69.    ULONG     ulHandle;           /* User Defined Handle        */
  70.    ULONG     fl;           /* Flags (Upper 16 bits old Flags)    */
  71.    LONG         cyItem;           /* Item Height            */
  72.    LONG         cxItem;           /* Item Width            */
  73.    } LISTITEM ;
  74.  
  75. typedef    LISTITEM *PLISTITEM;
  76.  
  77. #define    LI_CLEAR       0x00000000UL
  78. #define    LI_SELECTED       0x00000001UL
  79. #define    LI_FOCUS       0x00000002UL
  80. #define    LI_CHECKED       0x00000004UL                       /* 1.1 */
  81. #define    LI_INSERTED       0x00001000UL
  82. #define    LI_SELECTEDPREV       0x00000010UL
  83. #define    LI_SELECTEDOLD       0x00010000UL
  84. #define    LI_FOCUSOLD       0x00020000UL
  85. #define    LI_CHECKEDOLD       0x00040000UL                       /* 1.1 */
  86. #define    LI_INSERTEDOLD       0x10000000UL
  87. #define    LI_SELECTEDPREVOLD 0x00100000UL
  88.  
  89. typedef    struct _LISTCOL
  90.    {
  91.    HHEAPMEM  hHeap;           /* Heap Handle            */
  92.    PLISTITEM *apli;           /* List Item    Array Pointer        */
  93.    } LISTCOL ;
  94.  
  95. typedef    LISTCOL    *PLISTCOL;
  96.  
  97. typedef    struct _LISTBOXWIN
  98.    {
  99.          /***********************************************************/
  100.          /*    Window Management                    */
  101.          /***********************************************************/
  102.    HHEAPMEM  hHeap;           /* Heap Handle            */
  103.    HAB         hAB;           /* Anchor Block Handle        */
  104.    HWND         hWnd;           /* Control Window Handle        */
  105.    HWND         hwndOwner;           /* Owner Window Handle        */
  106.    HWND         hwndParent;       /* Parent Window Handle        */
  107.    HPOINTER  hptr;           /* Selection    Mouse Pointer        */
  108.          /***********************************************************/
  109.          /*    Styles/ID                        */
  110.          /***********************************************************/
  111.    ULONG     flStyle;           /* Style Flags            */
  112.    ULONG     flStyleExt;       /* Extended Style Flags        */ /* 1.1 */
  113.    ULONG     id;           /* Window ID                */
  114.          /***********************************************************/
  115.          /*    Flags                            */
  116.          /***********************************************************/
  117.    BOOL         fFocus;           /* Focus Flag            */
  118.    BOOL         fDblClk;           /* Mouse Double Click Flag        */
  119.    BOOL         fCapture;           /* Mouse Capture Flag        */
  120.    BOOL         fTimer;           /* Mouse Capture Flag        */
  121.    BOOL         fVisible;           /* List Box Visible Flag        */
  122.    BOOL         fDelaySort;       /* Delay Sort Flag            */
  123.    BOOL         fFocusShown;       /* FocusShown Flag            */
  124.          /***********************************************************/
  125.          /*    Window Display                        */
  126.          /***********************************************************/
  127.    LONG         cx;           /* List Box Width            */
  128.    LONG         cy;           /* List Box Height            */
  129.    LONG         cxWindow;           /* List Box Width  (Actual)        */
  130.    LONG         cyWindow;           /* List Box Height (Actual)        */
  131.    LONG         lClrBackground;       /* Background Colour            */
  132.    LONG         lClrBorder;       /* Border Colour            */
  133.    LONG         lClrHilite;       /* Hilite Colour            */
  134.    LONG         lClrHiliteBackground; /* Hilite Background    Colour        */
  135.    LONG         lClrList;           /* List Colour            */
  136.    LONG         lClrText;           /* Text Colour            */
  137.    LONG         lClrListIndex;       /* List Colour            */
  138.    LONG         lClrTextIndex;       /* Text Colour            */
  139.    RECTL     rcl;           /* Window Rectangle            */
  140.    RECTL     rclCorner;           /* Scroll Corner Rectangle        */
  141.    RECTL     rclAdjusted;       /* Adjusted Top Rectangle        */
  142.    POINTL    aptlOutside[5];       /* Border Points Array        */
  143.    POINTL    aptlInside[5];       /* Border Points Array        */
  144.    LONG         cptl;           /* Border Points Array Count        */
  145.          /***********************************************************/
  146.          /*    Scroll Bars                        */
  147.          /***********************************************************/
  148.    SWP         aswp[4];           /* Scroll Bar Position Array        */
  149.    HWND         hwndScrollBottom;       /* Bottom Scroll Bar    Window Handle    */
  150.    HWND         hwndScrollLeft;       /* Left Scroll Bar Window Handle    */
  151.    HWND         hwndScrollRight;       /* Right Scroll Bar Window Handle    */
  152.    HWND         hwndScrollTop;       /* Top Scroll Bar Window Handle    */
  153.    LONG         cxScroll;           /* Vertical Scroll Bar Width        */
  154.    LONG         cyScroll;           /* Horizontal Scroll    Bar Height    */
  155.          /***********************************************************/
  156.          /*    Scroll Bar Indices                    */
  157.          /***********************************************************/
  158.    LONG         cHorzScroll;       /* Horizontal Scroll    Count        */
  159.    LONG         cVertScroll;       /* Vertical Scroll Count        */
  160.    LONG         iHorzScroll;       /* Horizontal Scroll    Position    */
  161.    LONG         iVertScroll;       /* Vertical Scroll Position        */
  162.          /***********************************************************/
  163.          /*    Indices                            */
  164.          /***********************************************************/
  165.    LONG         iAnchor;           /* Anchor Item Index            */
  166.    LONG         iAnchorLast;       /* Last Anchor Item Index        */
  167.    LONG         iFocus;           /* Focus Item Index            */
  168.    LONG         iFocusLast;       /* Last Focus Item Index        */
  169.    LONG         iSelected;           /* Selected Item Index        */
  170.    LONG         iSelectedLast;       /* Last Selected Item Index        */
  171.          /***********************************************************/
  172.          /*    List Box Limits                        */
  173.          /***********************************************************/
  174.    LONG         cCharsPage;       /* Characters per Page        */
  175.    LONG         cLinesPage;       /* Lines per    Page            */
  176.    LONG         cxItem;           /* Longest Horizontal Item        */
  177.    LONG         cyItem;           /* Item Height            */
  178.    LONG         xChar;           /* Character    Width            */
  179.    LONG         yAscender;           /* Character    Ascender Height        */
  180.          /***********************************************************/
  181.          /*    List Box List                        */
  182.          /***********************************************************/
  183.    PLISTCOL  plc;           /* List Column Array            */
  184.    LONG         cColumns;           /* Columns Count            */
  185.    LONG         cItems;           /* Items Count            */
  186.    BOOL         fDirty;           /* Dirty Update Flag            */
  187.          /***********************************************************/ /* 1.1 */
  188.          /*    Sound Support                        */ /* 1.1 */
  189.          /***********************************************************/ /* 1.1 */
  190.    HMODULE   hmodSnd;           /* Sound Support DLL    Handle        */ /* 1.1 */
  191.    ULONG     (*    EXPENTRY pfnLoadWaveFile)(HWND hWnd, PSZ pszWaveFile);       /* 1.1 */
  192.    VOID         (*    EXPENTRY pfnUnloadWave)(HWND hWnd, ULONG hSound);       /* 1.1 */
  193.    VOID         (*    EXPENTRY pfnPlayWave)(ULONG hSound);               /* 1.1 */
  194.    CHAR         szSClkWAV[CCHMAXPATH];/* Single Click Wave    File        */ /* 1.1 */
  195.    ULONG     ulSClkWAV;           /* Single Click Wave    File Handle    */ /* 1.1 */
  196.    CHAR         szDClkWAV[CCHMAXPATH];/* Double Click Wave    File        */ /* 1.1 */
  197.    ULONG     ulDClkWAV;           /* Double Click Wave    File Handle    */ /* 1.1 */
  198.          /***********************************************************/ /* 1.1 */
  199.          /*    Check Box Support                    */ /* 1.1 */
  200.          /***********************************************************/ /* 1.1 */
  201.    HBITMAP   hbm;           /* Check Mark Bitmap    Handle        */ /* 1.1 */
  202.    BOOL         fEnableCheckboxes;       /* Check Box    Enable Flag        */ /* 1.1 */
  203.    RECTL     rclChecked;       /* Checked Bitmap Rectangle        */ /* 1.1 */
  204.    RECTL     rclUnChecked;       /* Unchecked    Bitmap Rectangle    */ /* 1.1 */
  205.    LONG         xTextOffset;       /* Text Offset            */ /* 1.1 */
  206.    LONG         cyHalfBitmap;       /* Bitmap Half Height        */ /* 1.1 */
  207.          /***********************************************************/ /* 1.2 */
  208.          /*    Direct Editing Support                    */ /* 1.2 */
  209.          /***********************************************************/ /* 1.2 */
  210.    HWND         hwndEdit;           /* Entry Field Handle        */ /* 1.2 */
  211.    LONG         iEditing;           /* Entry Field Item Index        */ /* 1.2 */
  212.    } LISTBOXWIN    ;
  213.  
  214. typedef    LISTBOXWIN *PLISTBOXWIN;
  215.  
  216. #define    SWP_VERT       0
  217. #define    SWP_HORZ       1
  218.  
  219. #define    IDT_SCROLL    512
  220.  
  221. #if defined(VERSION_100)                           /* 1.1 */
  222.  
  223. typedef    struct _LISTBOXCDATA
  224.    {
  225.    ULONG    cb;               /* Structure    Size            */
  226.    ULONG    ulVersion;           /* Structure    Version    NUmber        */
  227.    ULONG    cItems;           /* Items Count            */
  228.    BYTE        abList[1];           /* Array List Start            */
  229.    } LISTBOXCDATA ;
  230.  
  231. typedef    LISTBOXCDATA *PLISTBOXCDATA;
  232.  
  233. #define    LBV_100        10000UL       /* Control Data Version Number    */
  234.  
  235. #else                                       /* 1.1 */
  236.                                        /* 1.1 */
  237. typedef    struct _LISTBOXCDATA1                           /* 1.1 */
  238.    {                                       /* 1.1 */
  239.    ULONG    cItems;           /* Items Count            */ /* 1.1 */
  240.    BYTE        abList[1];           /* Array List Start            */ /* 1.1 */
  241.    } LISTBOXCDATA1 ;                               /* 1.1 */
  242.                                        /* 1.1 */
  243. typedef    struct _LISTBOXCDATA2                           /* 1.1 */
  244.    {                                       /* 1.1 */
  245.    ULONG    flExtStyles;       /* Extended Styles            */ /* 1.1 */
  246.    ULONG    cItems;           /* Items Count            */ /* 1.1 */
  247.    ULONG    cSounds;           /* Sounds Count            */ /* 1.1 */
  248.    BYTE        abList[1];           /* Array List Start            */ /* 1.1 */
  249.    } LISTBOXCDATA2 ;                               /* 1.1 */
  250.                                        /* 1.1 */
  251. typedef    union                                   /* 1.1 */
  252.    {                                       /* 1.1 */
  253.    LISTBOXCDATA1 lbcd1_0;       /* List Box Control Data Version 1.0    */ /* 1.1 */
  254.    LISTBOXCDATA2 lbcd1_1;       /* List Box Control Data Version 1.1    */ /* 1.1 */
  255.    } LISTBOXVDATA ;                               /* 1.1 */
  256.                                        /* 1.1 */
  257. typedef    struct _LISTBOXCDATA                           /* 1.1 */
  258.    {                                       /* 1.1 */
  259.    ULONG    cb;           /* Structure    Size            */ /* 1.1 */
  260.    ULONG    ulVersion;       /* Structure    Version    Number        */ /* 1.1 */
  261.    LISTBOXVDATA    vdata;           /* Version Specific Data Union    */ /* 1.1 */
  262.    } LISTBOXCDATA ;                               /* 1.1 */
  263.                                        /* 1.1 */
  264. typedef    LISTBOXCDATA *PLISTBOXCDATA;                       /* 1.1 */
  265.                                        /* 1.1 */
  266. #define    LBV_100       0x00010000UL       /* Control Data Version Number    */ /* 1.1 */
  267. #define    LBV_110       0x000100a0UL       /* Control Data Version Number    */ /* 1.1 */
  268.                                        /* 1.1 */
  269. #endif                                       /* 1.1 */
  270.  
  271. #define    LBV_120       0x000100b0UL       /* Control Data Version Number    */ /* 1.2 */
  272.  
  273. /************************************************************************/
  274. /************************************************************************/
  275. /*                                    */
  276. /*     Class Definition                            */
  277. /*                                    */
  278. /************************************************************************/
  279. /************************************************************************/
  280.  
  281. #define    CLASS_LISTBOX  "ListBoxWindow"
  282.  
  283. /************************************************************************/
  284. /************************************************************************/
  285. /*                                    */
  286. /*     Inline Macros                            */
  287. /*                                    */
  288. /************************************************************************/
  289. /************************************************************************/
  290.  
  291. #define    SaveSelectState(iCol, iSelected)  { if ( plbw->flStyle & LS_OWNERDRAW )\
  292.    if (    (plbw->plc[iCol].apli[iSelected]->fl & LI_SELECTED) && fItemVisible(plbw, iSelected) )\
  293.        plbw->plc[iCol].apli[iSelected]->fl |= LI_SELECTEDPREV;\
  294.    else\
  295.        plbw->plc[iCol].apli[iSelected]->fl &= ~LI_SELECTEDPREV;    }
  296.  
  297. /************************************************************************/
  298. /************************************************************************/
  299. /*                                    */
  300. /*     Extended    Messages                        */
  301. /*                                    */
  302. /************************************************************************/
  303. /************************************************************************/
  304.  
  305. #define    LMX_CALCLINECOUNT      0x0180UL
  306. #define    LMX_CALCSIZE           0x0181UL
  307. #define    LMX_COPY           0x0182UL
  308. #define    LMX_CUT               0x0183UL
  309. #define    LMX_PASTE           0x0184UL
  310. #define    LMX_QUERYITEMCOUNT     0x0185UL
  311. #define    LMX_QUERYITEMRECT      0x0186UL
  312. #define    LMX_QUERYSELECTLIST    0x0187UL
  313. #define    LMX_RESETLIST           0x0188UL
  314. #define    LMX_SELECTALL           0x0189UL
  315. #define    LMX_SELECTITEMBITMAP   0x018aUL
  316. #define    LMX_SETARRAY           0x018bUL
  317. #define    LMX_SETARRAYHANDLES    0x018cUL
  318. #define    LMX_SETITEMBITMAPS     0x018dUL
  319. #define    LMX_SETITEMCOUNT       0x018eUL
  320. #define    LMX_SORT           0x018fUL
  321. #define    LMX_SETARRAYITEMS      0x0190UL
  322. #define    LMX_ADDARRAY           0x0191UL
  323.  
  324. #define    LMX_SETCHECK           0x0192UL                       /* 1.1 */
  325. #define    LMX_QUERYCHECK           0x0193UL                       /* 1.1 */
  326. #define    LMX_SETCHECKARRAY      0x0194UL                       /* 1.1 */
  327. #define    LMX_QUERYCHECKARRAY    0x0195UL                       /* 1.1 */
  328.  
  329. #define    LMXM_SETSOUNDEVENT     0x0196UL                       /* 1.1 */
  330. #define    LMXM_QUERYSOUNDEVENT   0x0197UL                       /* 1.1 */
  331.  
  332. /************************************************************************/ /* 1.2 */
  333. /************************************************************************/ /* 1.2 */
  334. /*                                    */ /* 1.2 */
  335. /*     Private Messages                            */ /* 1.2 */
  336. /*                                    */ /* 1.2 */
  337. /************************************************************************/ /* 1.2 */
  338. /************************************************************************/ /* 1.2 */
  339.  
  340. #define    WM_DESTROYEDIT       (WM_USER + 1024UL)                   /* 1.2 */
  341.  
  342. /************************************************************************/ /* 1.1 */
  343. /************************************************************************/ /* 1.1 */
  344. /*                                    */ /* 1.1 */
  345. /*     Sound Events                            */ /* 1.1 */
  346. /*                                    */ /* 1.1 */
  347. /************************************************************************/ /* 1.1 */
  348. /************************************************************************/ /* 1.1 */
  349.  
  350. #define    LSND_SINGLECLICK     1                       /* 1.1 */
  351. #define    LSND_DOUBLECLICK     2                       /* 1.1 */
  352.  
  353. /************************************************************************/ /* 1.1 */
  354. /************************************************************************/ /* 1.1 */
  355. /*                                    */ /* 1.1 */
  356. /*     Check Boxes                            */ /* 1.1 */
  357. /*                                    */ /* 1.1 */
  358. /************************************************************************/ /* 1.1 */
  359. /************************************************************************/ /* 1.1 */
  360.  
  361. #define    IDB_CHECKMARKS         512                       /* 1.1 */
  362.  
  363. /************************************************************************/ /* 1.1 */
  364. /************************************************************************/ /* 1.1 */
  365. /*                                    */ /* 1.1 */
  366. /*     Style Extensions                            */ /* 1.1 */
  367. /*                                    */ /* 1.1 */
  368. /************************************************************************/ /* 1.1 */
  369. /************************************************************************/ /* 1.1 */
  370.  
  371. #define    LSXS_CHECKBOX         0x00000001UL                   /* 1.1 */
  372. #define    LSXS_EDITABLE         0x00000002UL                   /* 1.2 */
  373.  
  374. /************************************************************************/ /* 1.1 */
  375. /************************************************************************/ /* 1.1 */
  376. /*                                    */ /* 1.1 */
  377. /*     Notification Extensions                        */ /* 1.1 */
  378. /*                                    */ /* 1.1 */
  379. /************************************************************************/ /* 1.1 */
  380. /************************************************************************/ /* 1.1 */
  381.  
  382. #define    LNX_CHECKED         256UL                       /* 1.1 */
  383. #define    LNX_EDITED         257UL                       /* 1.2 */
  384.  
  385. /************************************************************************/
  386. /************************************************************************/
  387. /*                                    */
  388. /*     Prototypes                            */
  389. /*                                    */
  390. /************************************************************************/
  391. /************************************************************************/
  392.  
  393. /* --- EventMgr.C Prototype Definitions    -------------------------------    */
  394.  
  395. MRESULT    mrNotifyOwner(PLISTBOXWIN plbw,    ULONG ulNotification);
  396.  
  397. /* --- HeapMgr.C Prototype Definitions --------------------------------    */
  398.  
  399. HHEAPMEM HeapAlloc(ULONG cbInitial, ULONG cbNewBlks);
  400. VOID     HeapRelease(HHEAPMEM hHeap);
  401. ULONG     HeapSize(HHEAPMEM hHeap);
  402.  
  403. VOID     HeapStatus(HHEAPMEM hHeap, PULONG pcBlocks, PULONG pulSize,
  404.             PULONG pulUsed, PULONG pulFree, PULONG pulUnused, PULONG pulOverhead);
  405. VOID     HeapDisplayStatus(HHEAPMEM hHeap);
  406.  
  407. PVOID     HeapMalloc(HHEAPMEM hHeap, ULONG cbSize);
  408. PVOID     HeapCalloc(HHEAPMEM hHeap, ULONG cItems, ULONG    cbSize);
  409. PVOID     HeapRealloc(HHEAPMEM hHeap, PVOID pv, ULONG cbSize);
  410. VOID     HeapFree(HHEAPMEM hHeap, PVOID    pv);
  411.  
  412. /* --- ListBox.C Prototype Definitions --------------------------------    */
  413.  
  414. BOOL EXPENTRY fRegisterListBox(HAB hAB);
  415. VOID UpdateScrollBars(PLISTBOXWIN plbw);
  416. VOID DrawSelection(PLISTBOXWIN plbw, LONG iItem);
  417. VOID DrawItemSelection(PLISTBOXWIN plbw, LONG iItem);
  418. BOOL fItemVisible(PLISTBOXWIN plbw, LONG iItem);
  419. LONG lItemFromPoint(PLISTBOXWIN    plbw, LONG y);
  420. MRESULT    EXPENTRY ScrollBarWndProc(HWND hWnd, ULONG msg,    MPARAM mp1, MPARAM mp2);
  421. MRESULT    EXPENTRY ListBoxWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  422.  
  423. /* --- ListMgr.C Prototype Definitions --------------------------------    */
  424.  
  425. LONG lSetItemText(HHEAPMEM hHeap, HWND hWnd, PLISTITEM pli, PSZ    pszText);
  426. VOID SaveExtendedState(PLISTBOXWIN plbw);
  427. VOID RestoreExtendedState(PLISTBOXWIN plbw);
  428. BOOL fSelectMultipleItem(PLISTBOXWIN plbw, LONG    iCol, LONG iSelected, BOOL fSelect);
  429. BOOL fSelectItem(PLISTBOXWIN plbw, LONG    iCol, LONG iItem, BOOL fSelect);
  430. VOID SelectExtendedItems(PLISTBOXWIN plbw, LONG    iCol, LONG iSelected);
  431. VOID SetControlDataList(PLISTBOXWIN plbw, ULONG    cItems,    PBYTE pb);
  432. MRESULT    EXPENTRY mrBaseListHandler(HWND    hWnd, ULONG msg, MPARAM    mp1, MPARAM mp2);
  433. MRESULT    EXPENTRY mrExtendedListHandler(HWND hWnd, ULONG    msg, MPARAM mp1, MPARAM    mp2);
  434. MRESULT    EXPENTRY mrChkBoxHandler(HWND hWnd, ULONG msg, MPARAM mp1,       /* 1.1 */
  435.                  MPARAM    mp2);                   /* 1.1 */
  436.  
  437. /* --- SndMgr.C    Prototype Definitions ---------------------------------    */ /* 1.1 */
  438.  
  439. VOID LoadSoundSupport(PLISTBOXWIN plbw);                   /* 1.1 */
  440. VOID PlaySound(PLISTBOXWIN plbw, ULONG ulSound);               /* 1.1 */
  441. VOID UnloadSoundSupport(PLISTBOXWIN plbw);                   /* 1.1 */
  442. VOID SetControlDataSounds(PLISTBOXWIN plbw, ULONG cItems, ULONG    cSounds,   /* 1.1 */
  443.               PBYTE    pb);                       /* 1.1 */
  444. MRESULT    EXPENTRY mrSoundHandler(HWND hWnd, ULONG msg, MPARAM mp1,       /* 1.1 */
  445.                 MPARAM mp2);                   /* 1.1 */
  446.  
  447. /* --- TraffMgr.C Prototype Definitions    -------------------------------    */
  448.  
  449. LONG lGetPresParam(HWND    hWnd, ULONG ulID1, ULONG ulID2,    LONG lDefault);
  450. BOOL fAddHorzScroll(HWND hWnd, PLISTBOXWIN plbw);
  451. VOID MeasureItem(PLISTBOXWIN plbw, LONG    lMaxBaselineExt);
  452. VOID SizeListBox(PLISTBOXWIN plbw);
  453. VOID FocusChange(PLISTBOXWIN plbw, LONG    iFocus,    BOOL fSet);
  454. VOID RemoveFocus(PLISTBOXWIN plbw);
  455. VOID SetFocus(PLISTBOXWIN plbw,    LONG iFocus);
  456. VOID DrawItemSelection(PLISTBOXWIN plbw, LONG iItem);
  457. BOOL fCreateEditArea(PLISTBOXWIN plbw, MPARAM mp1);              /* 1.2 */
  458. BOOL fDecodeChkSelect(PLISTBOXWIN plbw,    MPARAM mp1);               /* 1.1 */
  459. BOOL fDecodeMouse(PLISTBOXWIN plbw, MPARAM mp1);
  460. BOOL fDecodeExtendedMouse(PLISTBOXWIN plbw, MPARAM mp1,    BOOL fBlock);
  461. VOID LineUp(PLISTBOXWIN    plbw);
  462. VOID LineDown(PLISTBOXWIN plbw);
  463. VOID DragUp(PLISTBOXWIN    plbw);
  464. VOID DragDown(PLISTBOXWIN plbw);
  465.  
  466. /************************************************************************/ /* 1.1 */
  467. /************************************************************************/ /* 1.1 */
  468. /*                                    */ /* 1.1 */
  469. /*     Sound DLL Support                        */ /* 1.1 */
  470. /*                                    */ /* 1.1 */
  471. /************************************************************************/ /* 1.1 */
  472. /************************************************************************/ /* 1.1 */
  473.  
  474. ULONG EXPENTRY LoadWaveFile(HWND hWnd, PSZ pszWaveFile);           /* 1.1 */
  475. VOID  EXPENTRY UnloadWave(HWND hWnd, ULONG hSound);               /* 1.1 */
  476. VOID  EXPENTRY PlayWave(ULONG hSound);                       /* 1.1 */
  477.  
  478. #define    ORD_LOADWAVEFILE     1                       /* 1.1 */
  479. #define    ORD_PLAYWAVE         2                       /* 1.1 */
  480. #define    ORD_UNLOADWAVE         3                       /* 1.1 */
  481.