📄 isbutton.ctl
字号:
End Enum
Enum isbAlign
[isbCenter] = &H0
[isbleft] = &H1
[isbRight] = &H2
[isbTop] = &H3
[isbbottom] = &H4
End Enum
Private Enum isState
statenormal = &H1
stateHot = &H2
statePressed = &H3
statedisabled = &H4
stateDefaulted = &H5
End Enum
Private Type ICONINFO
fIcon As Long
xHotspot As Long
yHotspot As Long
hBmMask As Long
hbmColor As Long
End Type
Private Type BITMAP
bmType As Long 'LONG // Specifies the bitmap type. This member must be zero.
bmWidth As Long 'LONG // Specifies the width, in pixels, of the bitmap. The width must be greater than zero.
bmHeight As Long 'LONG // Specifies the height, in pixels, of the bitmap. The height must be greater than zero.
bmWidthBytes As Long 'LONG // Specifies the number of bytes in each scan line. This value must be divisible by 2, because Windows assumes that the bit values of a bitmap form an array that is word aligned.
bmPlanes As Integer 'WORD // Specifies the count of color planes.
bmBitsPixel As Integer 'WORD // Specifies the number of bits required to indicate the color of a pixel.
bmBits As Long 'LPVOID // Points to the location of the bit values for the bitmap. The bmBits member must be a long pointer to an array of character (1-byte) values.
End Type
'*************************************************************
'
' Required Enums
'
'*************************************************************
Private Enum eMsgWhen
MSG_AFTER = 1 'Message calls back after the original (previous) WndProc
MSG_BEFORE = 2 'Message calls back before the original (previous) WndProc
MSG_BEFORE_AND_AFTER = MSG_AFTER Or MSG_BEFORE 'Message calls back before and after the original (previous) WndProc
End Enum
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 Long 'TRACKMOUSEEVENT_FLAGS
hwndTrack As Long
dwHoverTime As Long
End Type
Public Enum ttIconType
TTNoIcon = 0
TTIconInfo = 1
TTIconWarning = 2
TTIconError = 3
End Enum
Public Enum ttStyleEnum
TTStandard
TTBalloon
End Enum
Private Type RGBQUAD
rgbBlue As Byte
rgbGreen As Byte
rgbRed As Byte
rgbReserved As Byte
End Type
Private Type BITMAPINFOHEADER
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type
Private Type BITMAPINFO
bmiHeader As BITMAPINFOHEADER
bmiColors As RGBQUAD
End Type
Private Enum DrawTextFlags
DT_TOP = &H0
DT_LEFT = &H0
DT_CENTER = &H1
DT_RIGHT = &H2
DT_VCENTER = &H4
DT_BOTTOM = &H8
DT_WORDBREAK = &H10
DT_SINGLELINE = &H20
DT_EXPANDTABS = &H40
DT_TABSTOP = &H80
DT_NOCLIP = &H100
DT_EXTERNALLEADING = &H200
DT_CALCRECT = &H400
DT_NOPREFIX = &H800
DT_INTERNAL = &H1000
DT_EDITCONTROL = &H2000
DT_PATH_ELLIPSIS = &H4000
DT_END_ELLIPSIS = &H8000
DT_MODIFYSTRING = &H10000
DT_RTLREADING = &H20000
DT_WORD_ELLIPSIS = &H40000
DT_NOFULLWIDTHCHARBREAK = &H80000
DT_HIDEPREFIX = &H100000
DT_PREFIXONLY = &H200000
End Enum
Private Type RGBTRIPLE
rgbBlue As Byte
rgbGreen As Byte
rgbRed As Byte
End Type
'*************************************************************
'
' Required API Declarations
'
'*************************************************************
Private Declare Sub RtlMoveMemory _
Lib "kernel32" (Destination As Any, _
Source As Any, _
ByVal Length As Long)
Private Declare Function SetWindowText _
Lib "user32.dll" _
Alias "SetWindowTextA" (ByVal hwnd As Long, _
ByVal lpString As String) As Long
Private Declare Function GetModuleHandleA _
Lib "kernel32" (ByVal lpModuleName As String) As Long
Private Declare Function GetProcAddress _
Lib "kernel32" (ByVal hModule As Long, _
ByVal lpProcName As String) As Long
Private Declare Function GlobalAlloc _
Lib "kernel32" (ByVal wFlags As Long, _
ByVal dwBytes As Long) As Long
Private Declare Function GlobalFree _
Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function SetWindowLongA _
Lib "User32" (ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) 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 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 GetWindowLong _
Lib "User32" _
Alias "GetWindowLongA" (ByVal hwnd As Long, _
ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong _
Lib "User32" _
Alias "SetWindowLongA" (ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function BitBlt _
Lib "gdi32" (ByVal hDestDC As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long
Private Declare Function SetRect _
Lib "User32" (lpRect As RECT, _
ByVal X1 As Long, _
ByVal Y1 As Long, _
ByVal X2 As Long, _
ByVal Y2 As Long) As Long
Private Declare Function CopyRect _
Lib "User32" (lpDestRect As RECT, _
lpSourceRect As RECT) As Long
Private Declare Function InflateRect _
Lib "user32.dll" (ByRef lpRect As RECT, _
ByVal X As Long, _
ByVal Y As Long) As Long
Private Declare Function OffsetRect _
Lib "User32" (lpRect As RECT, _
ByVal X As Long, _
ByVal Y As Long) As Long
Private Declare Function DrawText _
Lib "User32" _
Alias "DrawTextA" (ByVal hdc As Long, _
ByVal lpStr As String, _
ByVal nCount As Long, _
lpRect As RECT, _
ByVal wFormat As Long) As Long
Private Declare Function OpenThemeData _
Lib "uxtheme.dll" (ByVal hwnd As Long, _
ByVal pszClassList As Long) As Long
Private Declare Function CloseThemeData _
Lib "uxtheme.dll" (ByVal hTheme As Long) As Long
Private Declare Function DrawThemeBackground _
Lib "uxtheme.dll" (ByVal hTheme As Long, _
ByVal lHDC As Long, _
ByVal iPartId As Long, _
ByVal iStateId As Long, _
pRect As RECT, _
pClipRect As RECT) As Long
Private Declare Function GetThemeBackgroundRegion _
Lib "uxtheme.dll" (ByVal hTheme As Long, _
ByVal hdc As Long, _
ByVal iPartId As Long, _
ByVal iStateId As Long, _
pRect As RECT, _
pRegion As Long) As Long
Private Declare Function ShellExecute _
Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Declare Function CreateCompatibleDC _
Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function CreateCompatibleBitmap _
Lib "gdi32" (ByVal hdc As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long) As Long
Private Declare Function SelectObject _
Lib "gdi32" (ByVal hdc As Long, _
ByVal hObject As Long) As Long
Private Declare Function DeleteDC _
Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function DeleteObject _
Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function GetPixel _
Lib "gdi32.dll" (ByVal hdc As Long, _
ByVal X As Long, _
ByVal Y As Long) As Long
Private Declare Function SetPixelV _
Lib "gdi32" (ByVal hdc As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal crColor As Long) As Long
Private Declare Function CreateWindowEx _
Lib "User32" _
Alias "CreateWindowExA" (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 SendMessage _
Lib "User32" _
Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Private Declare Function DestroyWindow _
Lib "User32" (ByVal hwnd 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 GetClientRect _
Lib "User32" (ByVal hwnd As Long, _
lpRect As RECT) As Long
Private Declare Function GetDC _
Lib "User32" (ByVal hwnd As Long) As Long
Private Declare Function GetSysColor _
Lib "User32" (ByVal nIndex As Long) As Long
Private Declare Function OleTranslateColor _
Lib "olepro32.dll" (ByVal OLE_COLOR As Long, _
ByVal HPALETTE As Long, _
pccolorref As Long) As Long
Private Declare Function DrawEdge _
Lib "User32" (ByVal hdc As Long, _
qrc As RECT, _
ByVal edge As Long, _
ByVal grfFlags As Long) As Long
Private Declare Function MoveToEx _
Lib "gdi32" (ByVal hdc As Long, _
ByVal X As Long, _
ByVal Y As Long, _
lpPoint As Point) As Long
Private Declare Function LineTo _
Lib "gdi32" (ByVal hdc As Long, _
ByVal X As Long, _
ByVal Y As Long) As Long
Private Declare Function CreateSolidBrush _
Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function CreatePen _
Lib "gdi32" (ByVal nPenStyle As Long, _
ByVal nWidth As Long, _
ByVal crColor As Long) As Long
Private Declare Function FillRect _
Lib "User32" (ByVal hdc As Long, _
lpRect As RECT, _
ByVal hBrush As Long) As Long
Private Declare Function SetWindowRgn _
Lib "User32" (ByVal hwnd As Long, _
ByVal hRgn As Long, _
ByVal bRedraw As Boolean) As Long
Private Declare Function CreateRoundRectRgn _
Lib "gdi32" (ByVal X1 As Long, _
ByVal Y1 As Long, _
ByVal X2 As Long, _
ByVal Y2 As Long, _
ByVal X3 As Long, _
ByVal Y3 As Long) As Long
Private Declare Function CreatePolygonRgn _
Lib "gdi32" (lpPoint As Point, _
ByVal nCount As Long, _
ByVal nPolyFillMode As Long) As Long
Private Declare Function CreateRectRgn _
Lib "gdi32" (ByVal X1 As Long, _
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -