⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clsodcontrol.cls

📁 一款Grid表格控件源代码,非常棒.不下你一定会后悔
💻 CLS
📖 第 1 页 / 共 5 页
字号:
Private Const SS_ENDELLIPSIS                    As Long = &H4000
Private Const SS_PATHELLIPSIS                   As Long = &H8000
Private Const SS_WORDELLIPSIS                   As Long = &HC000
Private Const SS_ELLIPSISMASK                   As Long = &HC000

Private Const STM_SETICON                       As Long = &H170
Private Const STM_GETICON                       As Long = &H171
Private Const STM_SETIMAGE                      As Long = &H172
Private Const STM_GETIMAGE                      As Long = &H173

Private Const STN_CLICKED                       As Long = 0
Private Const STN_DBLCLK                        As Long = 1
Private Const STN_ENABLE                        As Long = 2
Private Const STN_DISABLE                       As Long = 3

Private Const SW_HIDE                           As Long = &H0
Private Const SW_NORMAL                         As Long = &H1
Private Const SW_SHOW                           As Long = &H5

Private Const SWP_NOSIZE                        As Long = &H1
Private Const SWP_NOMOVE                        As Long = &H2
Private Const SWP_NOZORDER                      As Long = &H4
Private Const SWP_NOREDRAW                      As Long = &H8
Private Const SWP_NOACTIVATE                    As Long = &H10
Private Const SWP_FRAMECHANGED                  As Long = &H20
Private Const SWP_SHOWWINDOW                    As Long = &H40
Private Const SWP_HIDEWINDOW                    As Long = &H80
Private Const SWP_NOCOPYBITS                    As Long = &H100
Private Const SWP_NOOWNERZORDER                 As Long = &H200
Private Const SWP_NOSENDCHANGING                As Long = &H400

Private Const WS_OVERLAPPED                     As Long = &H0
Private Const WS_MAXIMIZEBOX                    As Long = &H10000
Private Const WS_TABSTOP                        As Long = &H10000
Private Const WS_MINIMIZEBOX                    As Long = &H20000
Private Const WS_GROUP                          As Long = &H20000
Private Const WS_THICKFRAME                     As Long = &H40000
Private Const WS_SYSMENU                        As Long = &H80000
Private Const WS_HSCROLL                        As Long = &H100000
Private Const WS_VSCROLL                        As Long = &H200000
Private Const WS_DLGFRAME                       As Long = &H400000
Private Const WS_BORDER                         As Long = &H800000
Private Const WS_CAPTION                        As Long = &HC00000
Private Const WS_MAXIMIZE                       As Long = &H1000000
Private Const WS_CLIPCHILDREN                   As Long = &H2000000
Private Const WS_CLIPSIBLINGS                   As Long = &H4000000
Private Const WS_DISABLED                       As Long = &H8000000
Private Const WS_VISIBLE                        As Long = &H10000000
Private Const WS_MINIMIZE                       As Long = &H20000000
Private Const WS_CHILD                          As Long = &H40000000
Private Const WS_POPUP                          As Long = &H80000000

Private Const WS_EX_LTRREADING                  As Long = &H0
Private Const WS_EX_LEFT                        As Long = &H0
Private Const WS_EX_RIGHTSCROLLBAR              As Long = &H0
Private Const WS_EX_DLGMODALFRAME               As Long = &H1
Private Const WS_EX_NOPARENTNOTIFY              As Long = &H4
Private Const WS_EX_TOPMOST                     As Long = &H8
Private Const WS_EX_ACCEPTFILES                 As Long = &H10
Private Const WS_EX_TRANSPARENT                 As Long = &H20
Private Const WS_EX_MDICHILD                    As Long = &H40
Private Const WS_EX_TOOLWINDOW                  As Long = &H80
Private Const WS_EX_WINDOWEDGE                  As Long = &H100
Private Const WS_EX_CLIENTEDGE                  As Long = &H200
Private Const WS_EX_CONTEXTHELP                 As Long = &H400
Private Const WS_EX_RIGHT                       As Long = &H1000
Private Const WS_EX_RTLREADING                  As Long = &H2000
Private Const WS_EX_LEFTSCROLLBAR               As Long = &H4000
Private Const WS_EX_CONTROLPARENT               As Long = &H10000
Private Const WS_EX_STATICEDGE                  As Long = &H20000
Private Const WS_EX_APPWINDOW                   As Long = &H40000

Private Const VER_PLATFORM_WIN32_NT             As Long = 2


Public Enum EITImageType
    eitBitmap = 0&
    eitIcon = 1&
    eitCursor = 2&
    eitMetafile = 3&
End Enum

Public Enum ECCThemeStyle
    eccAzure = 0&
    eccClassic = 1&
    eccGloss = 2&
    eccMetal = 3&
    eccXp = 4&
End Enum

Public Enum ECBSBorderStyle
    ecbsNone = 0&
    ecbsLine = 1&
    ecbsThin = 2&
    ecbsThick = 3&
    ecbs3D = 4&
End Enum

Public Enum ECSControlStyle
    ecsCheckBox = 1&
    ecsComboDropDown = 2&
    ecsComboDropList = 3&
    ecsComboSimple = 4&
    ecsCommandButton = 5&
    ecsImageCombo = 6&
    ecsImageListBox = 7&
    ecsLabel = 8&
    ecsListBox = 9&
    ecsListBoxExtended = 10&
    ecsListBoxMultiSelect = 11&
    ecsOptionButton = 12&
    ecsPictureBox = 13&
    ecsTextBox = 14&
End Enum

Private Type POINTAPI
    x                                           As Long
    y                                           As Long
End Type

Private Enum TRACKMOUSEEVENT_FLAGS
    TME_HOVER = &H1&
    TME_LEAVE = &H2&
    TME_QUERY = &H40000000
    TME_CANCEL = &H80000000
End Enum


Private Type TRACKMOUSEEVENT_STRUCT
    cbSize                                      As Long
    dwFlags                                     As TRACKMOUSEEVENT_FLAGS
    hwndTrack                                   As Long
    dwHoverTime                                 As Long
End Type

Private Type OSVERSIONINFO
    dwVersionInfoSize                           As Long
    dwMajorVersion                              As Long
    dwMinorVersion                              As Long
    dwBuildNumber                               As Long
    dwPlatformId                                As Long
    szCSDVersion(0 To 127)                      As Byte
End Type

Private Type RECT
    Left                                        As Long
    Top                                         As Long
    Right                                       As Long
    bottom                                      As Long
End Type

Private Type DRAWITEMSTRUCT
    CtlType                                     As Long
    CtlID                                       As Long
    itemID                                      As Long
    itemAction                                  As Long
    itemState                                   As Long
    hwndItem                                    As Long
    hdc                                         As Long
    rcItem                                      As RECT
    itemData                                    As Long
End Type

Private Type COMBOBOXINFO
   cbSize                                       As Long
   rcItem                                       As RECT
   rcButton                                     As RECT
   stateButton                                  As Long
   hwndCombo                                    As Long
   hwndEdit                                     As Long
   hwndList                                     As Long
End Type

Private Type PAINTSTRUCT
    hdc                                         As Long
    fErase                                      As Boolean
    rcPaint                                     As RECT
    fRestore                                    As Boolean
    fIncUpdate                                  As Boolean
    rgbReserved(32)                             As Byte
End Type

Private Type BITMAP
    bmType                                      As Long
    bmWidth                                     As Long
    bmHeight                                    As Long
    bmWidthBytes                                As Long
    bmPlanes                                    As Integer
    bmBitsPixel                                 As Integer
    bmBits                                      As Long
End Type

Private Type LOGFONT
    lfHeight                                    As Long
    lfWidth                                     As Long
    lfEscapement                                As Long
    lfOrientation                               As Long
    lfWeight                                    As Long
    lfItalic                                    As Byte
    lfUnderline                                 As Byte
    lfStrikeOut                                 As Byte
    lfCharSet                                   As Byte
    lfOutPrecision                              As Byte
    lfClipPrecision                             As Byte
    lfQuality                                   As Byte
    lfPitchAndFamily                            As Byte
    lfFaceName(32)                              As Byte
End Type

Private Declare Function TrackMouseEvent Lib "USER32" (lpEventTrack As TRACKMOUSEEVENT_STRUCT) As Long

Private Declare Function TrackMouseEventComCtl Lib "COMCTL32" Alias "_TrackMouseEvent" (lpEventTrack As TRACKMOUSEEVENT_STRUCT) As Long

Private Declare Function GetModuleHandleA Lib "kernel32" (ByVal lpModuleName As String) As Long

Private Declare Function GetModuleHandleW Lib "kernel32" (ByVal lpModuleName As Long) As Long

Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, _
                                                        ByVal lpProcName As String) As Long

Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long

Private Declare Function LoadLibraryA Lib "kernel32" (ByVal lpLibFileName As String) As Long

Private Declare Function LoadLibraryW Lib "kernel32" (ByVal lpLibFileName As Long) As Long

Private Declare Function BeginPaint Lib "USER32" (ByVal hWnd As Long, _
                                                  lpPaint As PAINTSTRUCT) As Long

Private Declare Function EndPaint Lib "USER32" (ByVal hWnd As Long, _
                                                lpPaint As PAINTSTRUCT) As Long

Private Declare Function CreateWindowExA Lib "USER32" (ByVal dwExStyle As Long, _
                                                       ByVal lpClassName As String, _
                                                       ByVal lpWindowName As String, _
                                                       ByVal dwStyle As Long, _
                                                       ByVal x As Long, _
                                                       ByVal y As Long, _
                                                       ByVal nWidth As Long, _
                                                       ByVal nHeight As Long, _
                                                       ByVal hWndParent As Long, _
                                                       ByVal hMenu As Long, _
                                                       ByVal hInstance As Long, _
                                                       lpParam As Any) As Long

Private Declare Function CreateWindowExW Lib "USER32" (ByVal dwExStyle As Long, _
                                                       ByVal lpClassName As Long, _
                                                       ByVal lpWindowName As Long, _
                                                       ByVal dwStyle As Long, _
                                                       ByVal x As Long, _
                                                       ByVal y As Long, _
                                                       ByVal nWidth As Long, _
                                                       ByVal nHeight As Long, _
                                                       ByVal hWndParent As Long, _
                                                       ByVal hMenu As Long, _
                                                       ByVal hInstance As Long, _
                                                       lpParam As Any) As Long

Private Declare Function DestroyWindow Lib "USER32" (ByVal hWnd As Long) As Long

Private Declare Function SendMessageA Lib "USER32" (ByVal hWnd As Long, _
                                                    ByVal wMsg As Long, _
                                                    ByVal wParam As Long, _
                                                    lParam As Any) As Long

Private Declare Function SendMessageLongA Lib "USER32" Alias "SendMessageA" (ByVal hWnd As Long, _
                                                                             ByVal wMsg As Long, _
                                                                             ByVal wParam As Long, _
                                                                             ByVal lParam As Long) As Long

Private Declare Function SendMessageLongW Lib "USER32" Alias "SendMessageW" (ByVal hWnd As Long, _
                                                                             ByVal wMsg As Long, _
                                                                             ByVal wParam As Long, _
                                                                             ByVal lParam As Long) As Long

Private Declare Function SetWindowPos Lib "USER32" (ByVal hWnd As Long, _
                                                    ByVal hWndInsertAfter As Long, _
                                                    ByVal x As Long, _
                                                    ByVal y As Long, _
                                                    ByVal cx As Long, _
                                                    ByVal cy As Long, _
                                                    ByVal wFlags As Long) As Long

Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInfo As OSVERSIONINFO) As Long

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpDst As Any, _
                                                                     lpSrc As Any, _
                                                                     ByVal Length As Long)

Private Declare Function EnableWindow Lib "USER32" (ByVal hWnd As Long, _
                                                    ByVal fEnable As Long) As Long

Private Declare Function GetWindowLongA Lib "USER32" (ByVal hWnd As Long, _
                                                      ByVal nIndex As Long) As Long

Private Declare Function GetWindowLongW Lib "USER32" (ByVal hWnd As Long, _
                                                      ByVal nIndex As Long) As Long

Private Declare Function SetWindowLongA Lib "USER32" (ByVal hWnd As Long, _
                                                      ByVal nIndex As Long, _
                                                      ByVal dwNewLong As Long) As Long

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -