ش | ی | د | س | چ | پ | ج |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
: Form_Load
wndHw=Me.Hwnd
(oldwndproc = SetWindowLongPtrA(Me.hwnd, GWL_WNDPROC, AddressOf WndProc
: Form_Unload
SetWindowLongPtrA wndHw, GWL_WNDPROC, oldwndproc
Public Function WndProc(ByVal lhwnd As LongPtr, ByVal uMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As Long
If uMsg = 516 Then 'WM_RBUTTONDOWNU
'Debug.Print "Intercepted WM_CONTEXTMENU at " & Now
" MsgBox "Mouse Right Button Was Clicked
WndProc=-1
ElseIf uMsg = WM_KEYDOWN Then
MsgBox wParam
WndProc = True
Else ' Send all other messages to the default message handler
(WndProc = CallWindowProcA(oldwndproc, lhwnd, uMsg, wParam, lParam
End If
End Function
Const WM_NCLBUTTONDOWN As Integer = 161
Const WM_SYSCOMMAND As Integer = 274Const HTCAPTION As Integer = 2Const SC_MOVE As Integer = 61456If (Msg = WM_SYSCOMMAND) And (WParam = SC_MOVE) ThenReturnEnd IfIf (Msg = WM_NCLBUTTONDOWN) And (WParam = HTCAPTION) ThenReturnIf (Msg = WM_RBUTTONDOWN) And (WParam = WM_RBUTTONDOWN) ThenReturnEnd If
(20×16)×1.6+4=516 ( DECIMAL )
516÷16=32
516-(32×16)=4
(516÷16)×10=320
320÷16=20
List Of Windows Message SendMessageList
: WndProc
case WM_INITDIALOG
ShowWindow GetDlgItem(hDlg,IDOK),SW_HIDE
hBitmap1=CreateWindowEx(WS_EX_TRANSPARENT,"Button","Login", WS_VISIBLE Or WS_CHILD Or BS_BITMAP,60, 150,100, 25,hDlg,(HMENU)IDC_BUTTON2, NULL, NULL
(
(hdc = GetDC(hDlg
(hMemDC = CreateCompatibleDC(hdc
(hBitmap = CreateCompatibleBitmap(hdc,120,25
SelectObject hMemDC,hBitmap
(SetDCBrushColor hMemDC,RGB(212,208,20
Dim r As RECT
(FillRect(hMemDC,r,GetStockObject(DC_BRUSH
DeleteDC hMemDC
ReleaseDC hDlg,hdc