📄 isbutton.ctl
字号:
Private Const DFCS_MENUBULLET As Long = &H2 'Bullet
Private Const DFCS_MENUARROWRIGHT As Long = &H4
Private Const DFCS_SCROLLUP As Long = &H0 'Up arrow of scroll bar
Private Const DFCS_SCROLLDOWN As Long = &H1 'Down arrow of scroll bar
Private Const DFCS_SCROLLLEFT As Long = &H2 'Left arrow of scroll bar
Private Const DFCS_SCROLLRIGHT As Long = &H3 'Right arrow of scroll bar
Private Const DFCS_SCROLLCOMBOBOX As Long = &H5 'Combo box scroll bar
Private Const DFCS_SCROLLSIZEGRIP As Long = &H8 'Size grip
Private Const DFCS_SCROLLSIZEGRIPRIGHT As Long = &H10 'Size grip in bottom-right corner of window
Private Const DFCS_BUTTONCHECK As Long = &H0 'Check box
Private Const DFCS_BUTTONRADIO As Long = &H4 'Radio button
Private Const DFCS_BUTTON3STATE As Long = &H8 'Three-state button
Private Const DFCS_BUTTONPUSH As Long = &H10 'Push button
Private Const DFCS_INACTIVE As Long = &H100 'Button is inactive (grayed)
Private Const DFCS_PUSHED As Long = &H200 'Button is pushed
Private Const DFCS_CHECKED As Long = &H400 'Button is checked
Private Const DFCS_ADJUSTRECT As Long = &H2000 'Bounding rectangle is adjusted to exclude the surrounding edge of the push button
Private Const DFCS_FLAT As Long = &H4000 'Button has a flat border
Private Const DFCS_MONO As Long = &H8000 'Button has a monochrome border
Private Const BDR_RAISEDOUTER As Long = &H1
Private Const BDR_SUNKENOUTER As Long = &H2
Private Const BDR_RAISEDINNER As Long = &H4
Private Const BDR_SUNKENINNER As Long = &H8
Private Const BDR_OUTER As Long = &H3
Private Const BDR_INNER As Long = &HC
Private Const BDR_RAISED As Long = &H5
Private Const BDR_SUNKEN As Long = &HA
Private Const EDGE_RAISED = (BDR_RAISEDOUTER Or BDR_RAISEDINNER)
Private Const EDGE_SUNKEN = (BDR_SUNKENOUTER Or BDR_SUNKENINNER)
Private Const EDGE_ETCHED = (BDR_SUNKENOUTER Or BDR_RAISEDINNER)
Private Const EDGE_BUMP = (BDR_RAISEDOUTER Or BDR_SUNKENINNER)
Private Const BF_LEFT As Long = &H1
Private Const BF_TOP As Long = &H2
Private Const BF_RIGHT As Long = &H4
Private Const BF_BOTTOM As Long = &H8
Private Const BF_TOPLEFT As Long = (BF_TOP Or BF_LEFT)
Private Const BF_TOPRIGHT As Long = (BF_TOP Or BF_RIGHT)
Private Const BF_BOTTOMLEFT As Long = (BF_BOTTOM Or BF_LEFT)
Private Const BF_BOTTOMRIGHT As Long = (BF_BOTTOM Or BF_RIGHT)
Private Const BF_RECT As Long = (BF_LEFT Or BF_TOP Or BF_RIGHT Or BF_BOTTOM)
Private Const BF_DIAGONAL As Long = &H10
' For diagonal lines, the BF_RECT flags specify the end point of
' the vector bounded by the rectangle parameter.
Private Const BF_DIAGONAL_ENDTOPRIGHT As Long = (BF_DIAGONAL Or BF_TOP Or BF_RIGHT)
Private Const BF_DIAGONAL_ENDTOPLEFT As Long = (BF_DIAGONAL Or BF_TOP Or BF_LEFT)
Private Const BF_DIAGONAL_ENDBOTTOMLEFT As Long = (BF_DIAGONAL Or BF_BOTTOM Or BF_LEFT)
Private Const BF_DIAGONAL_ENDBOTTOMRIGHT As Long = (BF_DIAGONAL Or BF_BOTTOM Or BF_RIGHT)
Private Const BF_MIDDLE As Long = &H800 ' Fill in the middle.
Private Const BF_SOFT As Long = &H1000 ' Use for softer buttons.
Private Const BF_ADJUST As Long = &H2000 ' Calculate the space left over.
Private Const BF_FLAT As Long = &H4000 ' For flat rather than 3-D borders.
Private Const BF_MONO As Long = &H8000 ' For monochrome borders.
'Windows Messages
Private Const WM_LBUTTONDBLCLK As Long = &H203
Private Const WM_RBUTTONDBLCLK As Long = &H206
Private Const WM_LBUTTONDOWN As Long = &H201
Private Const WM_RBUTTONDOWN As Long = &H204
Private Const WM_MOUSEMOVE As Long = &H200
Private Const WM_MOUSELEAVE As Long = &H2A3
Private Const WM_MOVING As Long = &H216
Private Const WM_SIZING As Long = &H214
Private Const WM_EXITSIZEMOVE As Long = &H232
Private Const WM_THEMECHANGED As Long = &H31A
Private Const WM_SYSCOLORCHANGE As Long = &H15
Private Const WM_USER As Long = &H400
Private Const GWL_STYLE As Long = -16
Private Const WS_CAPTION As Long = &HC00000
Private Const WS_THICKFRAME As Long = &H40000
Private Const WS_SYSMENU As Long = &H80000
Private Const WS_MINIMIZEBOX As Long = &H20000
Private Const SWP_REFRESH As Long = (&H1 Or &H2 Or &H4 Or &H20)
Private Const WS_EX_TOOLWINDOW As Long = &H80
Private Const GWL_EXSTYLE As Long = -20
Private Const SW_SHOWDEFAULT As Long = 10
Private Const SW_SHOWMAXIMIZED As Long = 3
Private Const SW_SHOWMINIMIZED As Long = 2
Private Const SW_SHOWMINNOACTIVE As Long = 7
Private Const SW_SHOWNA As Long = 8
Private Const SW_SHOWNOACTIVATE As Long = 4
Private Const SW_SHOWNORMAL As Long = 1
Private Const SWP_FRAMECHANGED As Long = &H20
Private Const SWP_DRAWFRAME As Long = SWP_FRAMECHANGED
Private Const SWP_HIDEWINDOW As Long = &H80
Private Const SWP_NOACTIVATE As Long = &H10
Private Const SWP_NOCOPYBITS As Long = &H100
Private Const SWP_NOMOVE As Long = &H2
Private Const SWP_NOOWNERZORDER As Long = &H200
Private Const SWP_NOREDRAW As Long = &H8
Private Const SWP_NOREPOSITION As Long = SWP_NOOWNERZORDER
Private Const SWP_NOSIZE As Long = &H1
Private Const SWP_NOZORDER As Long = &H4
Private Const SWP_SHOWWINDOW As Long = &H40
Private Const HWND_TOPMOST As Long = -&H1
Private Const CW_USEDEFAULT As Long = &H80000000
Private Const RGN_AND As Long = &H1
Private Const RGN_OR As Long = &H2
Private Const RGN_XOR As Long = &H3
Private Const RGN_DIFF As Long = &H4
Private Const RGN_COPY As Long = &H5
Private Const DST_BITMAP As Long = &H4
Private Const DST_COMPLEX As Long = &H0
Private Const DST_ICON As Long = &H3
Private Const DSS_MONO As Long = &H80
Private Const DSS_NORMAL As Long = &H0
Private Const NULLREGION As Long = &H1 'Empty region
Private Const SIMPLEREGION As Long = &H2 'Rectangle Region
Private Const COMPLEXREGION As Long = &H3 'The region is complex
'Constants for nPolyFillMode in CreatePolygonRgn y CreatePolyPolygonRgn:
Private Const ALTERNATE As Long = 1
Private Const WINDING As Long = 2
''Tooltip Window Constants
Private Const TTS_NOPREFIX As Long = &H2
Private Const TTF_TRANSPARENT As Long = &H100
Private Const TTF_CENTERTIP As Long = &H2
Private Const TTM_ADDTOOLA As Long = (WM_USER + 4)
Private Const TTM_DELTOOLA As Long = (WM_USER + 5)
Private Const TTM_ACTIVATE As Long = WM_USER + 1
Private Const TTM_UPDATETIPTEXTA As Long = (WM_USER + 12)
Private Const TTM_SETMAXTIPWIDTH As Long = (WM_USER + 24)
Private Const TTM_SETTIPBKCOLOR As Long = (WM_USER + 19)
Private Const TTM_SETTIPTEXTCOLOR As Long = (WM_USER + 20)
Private Const TTM_SETTITLE As Long = (WM_USER + 32)
Private Const TTS_BALLOON As Long = &H40
Private Const TTS_ALWAYSTIP As Long = &H1
Private Const TTF_SUBCLASS As Long = &H10
Private Const TOOLTIPS_CLASSA As String = "tooltips_class32"
'==================================================================================================
'Subclasser declarations
Private Const ALL_MESSAGES As Long = -1 'All messages added or deleted
Private Const GMEM_FIXED As Long = 0 'Fixed memory GlobalAlloc flag
Private Const GWL_WNDPROC As Long = -4 'Get/SetWindow offset to the WndProc procedure address
Private Const PATCH_04 As Long = 88 'Table B (before) address patch offset
Private Const PATCH_05 As Long = 93 'Table B (before) entry count patch offset
Private Const PATCH_08 As Long = 132 'Table A (after) address patch offset
Private Const PATCH_09 As Long = 137 'Table A (after) entry count patch offset
'==================================================================================================
'*************************************************************
'
' Required Type Definitions
'
'*************************************************************
Private Type POINT
x As Long
Y As Long
End Type
Private Type SIZE
cX As Long
cY As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
bottom As Long
End Type
Private Type RGB 'Required for color trnsform using RGB
Red As Byte
Green As Byte
Blue As Byte
End Type
Private Type tSubData 'Subclass data type
hwnd As Long 'Handle of the window being subclassed
nAddrSub As Long 'The address of our new WndProc (allocated memory).
nAddrOrig As Long 'The address of the pre-existing WndProc
nMsgCntA As Long 'Msg after table entry count
nMsgCntB As Long 'Msg before table entry count
aMsgTblA() As Long 'Msg after table array
aMsgTblB() As Long 'Msg Before table array
End Type
''Tooltip Window Types
Private Type TOOLINFO
lSize As Long
lFlags As Long
lHwnd As Long
lId As Long
lpRect As RECT
hInstance As Long
lpStr As String
lParam As Long
End Type
Private Type OSVERSIONINFOEX 'OS Version
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
wServicePackMajor As Integer
wServicePackMinor As Integer
wSuiteMask As Integer
wProductType As Byte
wReserved As Byte
End Type
Enum isbStyle 'Styles
[isbNormal] = &H0
[isbSoft] = &H1
[isbFlat] = &H2
[isbJava] = &H3
[isbOfficeXP] = &H4
[isbWindowsXP] = &H5
[isbWindowsTheme] = &H6
[isbPlastik] = &H7
[isbGalaxy] = &H8
[isbKeramik] = &H9
[isbMacOSX] = &HA
End Enum
Enum isbButtonType
isbButton = &H0
isbCheckBox = &H1
End Enum
Enum isbAlign
[isbCenter] = &H0
[isbleft] = &H1
[isbRight] = &H2
[isbTop] = &H3
[isbbottom] = &H4
End Enum
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -