ش | ی | د | س | چ | پ | ج |
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 |
تست شده
The WM_PAINT message is sent when the system or another application makes a request to paint a portion
of an application's window
The PAINTSTRUCT
structure contains information that can be used to paint the.client area of a window
حاوی اطلاعاتی برای استفاده در نقاشی ناحیه ی Client پنجره.
Case WM_PAINT
Dim ps As PAINTSTRUCT
( hdc = BeginPaint(lhwnd, ps
Dim rrc As RECT
GetClientRect lhwnd, rrc
(( FillRect hdc, rrc, CreateSolidBrush(RGB(100, 0, 100
SetTextColor hdc, vbRed
TextOutA hdc, 10, 10, "sa", 2
EndPaint lhwnd, ps
ReleaseDC lhwnd, hdc
البته غیر از پیام زیر میشود با پیام WM_CTLCOLORBTN هم رنگ باتن را تغییر داد که lParam میشود هندل باتن و wParam هم هندل DC میشود
Case WM_DRAWITEM
Dim pDIS As DRAWITEMSTRUCT
Dim state
(CopyMemory pDIS, ByVal lParam, Len(pDIS
( hdc = GetDC(pDIS.hdc
Dim p As RECT
p = pDIS.rcItem
state = pDIS.itemState
GetClientRect can, p
If pDIS.CtlID = 2 Then
If state = 272 Then
RoundRect hdc, p.Left, p.Top, p.Right, p.Bottom, 16, 16
ReleaseDC can, hdc
Else
RoundRect hdc, p.Left, p.Top, p.Right, p.Bottom, 4, 4
ReleaseDC can, hdc
End If
End If
(CopyMemory ByVal lParam, pDIS,Len(pDIS