home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / v / vlistbox.zip / VLISTINT.H < prev    next >
C/C++ Source or Header  |  1993-01-14  |  4KB  |  86 lines

  1. #include "windows.h"
  2. #include "windowsx.h"
  3. #include "vlist.h"
  4.  
  5. typedef struct tagVLISTBox
  6.    {
  7.       HWND      hwnd;             // hwnd of this VLIST box
  8.       int       nId;              // Id of Control
  9.       HINSTANCE hInstance;        // Instance of parent
  10.       HWND      hwndParent;       // hwnd of parent of VLIST box
  11.       HWND      hwndList;         // hwnd of List box
  12.       WNDPROC   lpfnLBWndProc;    // Window procedure of list box
  13.       int       nchHeight;        // Height of text line
  14.       int       nLines;           // Number of lines in listbox
  15.       LONG      styleSave;        // Save the Style Bits
  16.       WORD      VLBoxStyle;       // List Box Style
  17.       HANDLE    hFont;            // Font for List box
  18.       LONG      lToplIndex;      // Top logical record number;
  19.       int       nCountInBox;      // Number of Items in box.
  20.       LONG      lNumLogicalRecs;  // Number of logical records
  21.       VLBSTRUCT vlbStruct;        // Buffer to communicate to app
  22.       WORD      wFlags;           // Various flags fot the VLB
  23.                                   //
  24.                                   // 0x01 - HasStrings
  25.                                   // 0x02 - Use Data Values
  26.                                   // 0x04 - Multiple Selections
  27.                                   // 0x08 - Ok for parent to have focus
  28.                                   // 0x10 - Control has focus
  29.  
  30.       LONG      lSelItem;         // List of selected items
  31.       int       nvlbRedrawState;  // Redraw State
  32.       BOOL      bHScrollBar;      // Does it have a H Scroll
  33. } VLBOX;
  34.  
  35. typedef VLBOX NEAR *PVLBOX;
  36. typedef VLBOX FAR  *LPVLBOX;
  37.  
  38.  
  39. #define IDS_VLBOXNAME  1
  40. #define VLBLBOXID      100
  41. #define VLBEDITID      101
  42.  
  43. #define HASSTRINGS     0x01       // List box stores strings
  44. #define USEDATAVALUES  0x02       // Use Data Values to talk to parent
  45. #define MULTIPLESEL    0x04       // VLB has extended or multiple selection
  46. #define PARENTFOCUS    0x08       // Ok for parent to have focus
  47. #define HASFOCUS       0x10       // 0x10 - Control has focus
  48.  
  49. LRESULT _export CALLBACK VListBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  50. LRESULT CALLBACK _loadds LBSubclassProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  51.  
  52. LONG VLBMessageItemHandler( PVLBOX pVLBox,  UINT message, LPSTR lpfoo);
  53. LONG VLBParentMessageHandler( PVLBOX pVLBox, UINT message, WPARAM wParam, LPARAM lParam);
  54. LONG VLBNcCreateHandler( HWND hwnd, LPCREATESTRUCT lpcreateStruct);
  55. LONG VLBCreateHandler( PVLBOX pVListBox, HWND hwnd, LPCREATESTRUCT lpcreateStruct);
  56. void VLBNcDestroyHandler(HWND hwnd,  PVLBOX pVListBox, WPARAM wParam, LPARAM lParam);
  57. void VLBSetFontHandler( PVLBOX pVListBox, HANDLE hFont, BOOL fRedraw);
  58. int  VLBScrollDownLine( PVLBOX pVLBox);
  59. int  VLBScrollUpLine( PVLBOX pVLBox);
  60. int  VLBScrollDownPage( PVLBOX pVLBox, int nAdjustment);
  61. int  VLBScrollUpPage( PVLBOX pVLBox, int nAdjustment);
  62. void UpdateVLBWindow( PVLBOX pVLBox, LPRECT lpRect);
  63. int  VLBFindPage( PVLBOX pVLBox, LONG lFindRecNum, BOOL bUpdateTop);
  64. int  VLBFindPos( PVLBOX pVLBox, int nPos);
  65. void VLBFirstPage( PVLBOX pVLBox);
  66. void VLBLastPage( PVLBOX pVLBox);
  67. LONG vlbSetCurSel( PVLBOX pVLBox, int nOption, LONG lParam);
  68. int  vlbFindData( PVLBOX pVLBox, LONG lData);
  69. void VLBSizeHandler( PVLBOX pVLBox, int nItemHeight);
  70. int  vlbInVLB( PVLBOX pVLBox, LONG lData);
  71. void VLBCountLines( PVLBOX pVLBox);
  72.  
  73. void vlbRedrawOff(PVLBOX pVLBox);
  74. void vlbRedrawOn(PVLBOX pVLBox);
  75.  
  76. BOOL TestSelectedItem(PVLBOX pVLBox, VLBSTRUCT vlbStruct);
  77. void SetSelectedItem(PVLBOX pVLBox);
  78.  
  79. void vlbPGDN(PVLBOX pVLBox);
  80. void vlbPGUP(PVLBOX pVLBox);
  81.  
  82. void vlbLineDn(PVLBOX pVLBox);
  83. void vlbLineUp(PVLBOX pVLBox);
  84.  
  85. extern HANDLE  hInstance;              // Global instance handle for  DLL
  86.