Last change
on this file since 545 was 241, checked in by イグトランス (egtra), 18 years ago |
GDI+に対して名前空間で囲ったものの、現在コンパイルできないため分岐させておく
|
File size:
1.7 KB
|
Line | |
---|
1 | ' Classes/System/Windows/Forms/Message.ab
|
---|
2 |
|
---|
3 | #ifndef __SYSTEM_WINDOWS_FORMS_MESSAGE_AB__
|
---|
4 | #define __SYSTEM_WINDOWS_FORMS_MESSAGE_AB__
|
---|
5 |
|
---|
6 | #require <windows.sbp>
|
---|
7 |
|
---|
8 | Class Message
|
---|
9 | Public
|
---|
10 | Const Function HWnd() As HWND
|
---|
11 | Return hwnd
|
---|
12 | End Function
|
---|
13 |
|
---|
14 | Sub HWnd(hw As HWND)
|
---|
15 | hwnd = hw
|
---|
16 | End Sub
|
---|
17 |
|
---|
18 | Const Function Msg() As DWord
|
---|
19 | Return msg
|
---|
20 | End Function
|
---|
21 |
|
---|
22 | Sub Msg(m As DWord)
|
---|
23 | msg = m
|
---|
24 | End Sub
|
---|
25 |
|
---|
26 | Const Function WParam() As WPARAM
|
---|
27 | Return wp
|
---|
28 | End Function
|
---|
29 |
|
---|
30 | Sub WParam(wParam As WPARAM)
|
---|
31 | wp = wParam
|
---|
32 | End Sub
|
---|
33 |
|
---|
34 | Const Function LParam() As LPARAM
|
---|
35 | Return lp
|
---|
36 | End Function
|
---|
37 |
|
---|
38 | Sub LParam(lParam As LPARAM)
|
---|
39 | lp = lParam
|
---|
40 | End Sub
|
---|
41 |
|
---|
42 | Const Function Result() As LRESULT
|
---|
43 | Return lr
|
---|
44 | End Function
|
---|
45 |
|
---|
46 | Sub Result(res As LRESULT)
|
---|
47 | lr = res
|
---|
48 | End Sub
|
---|
49 |
|
---|
50 | /*Const*/ Function Equals(x As Message) As Boolean
|
---|
51 | Return hwnd = x.hwnd And _
|
---|
52 | msg = x.msg And _
|
---|
53 | wp = .wp And _
|
---|
54 | lp = .lp And _
|
---|
55 | lr = .lr
|
---|
56 | End Function
|
---|
57 |
|
---|
58 | Override Function GetHashCode() As Long
|
---|
59 | Return _System_HashFromPtr(hwnd) Xor (Not msg) Xor _System_HashFromPtr(wp As VoidPtr) Xor _
|
---|
60 | (Not _System_HashFromPtr(lp As VoidPtr)) Xor _System_HashFromPtr(lr As VoidPtr)
|
---|
61 | End Function
|
---|
62 |
|
---|
63 | Const Function Operator ==(x As Message) As BOOL
|
---|
64 | Return Equals(x)
|
---|
65 | End Function
|
---|
66 |
|
---|
67 | Const Function Operator <>(x As Message) As BOOL
|
---|
68 | Return Not Equals(x)
|
---|
69 | End Function
|
---|
70 |
|
---|
71 | Static Function Create(hwnd As HWND, msg As DWord, wp As WPARAM, lp As LPARAM) As Message
|
---|
72 | Create = New Message
|
---|
73 | With Create
|
---|
74 | .hwnd = hwnd
|
---|
75 | .msg = msg
|
---|
76 | .wp = wp
|
---|
77 | .lp = lp
|
---|
78 | End With
|
---|
79 | End Function
|
---|
80 |
|
---|
81 | Private
|
---|
82 | hwnd As HWND
|
---|
83 | msg As DWord
|
---|
84 | wp As WPARAM
|
---|
85 | lp As LPARAM
|
---|
86 | lr As LRESULT
|
---|
87 | End Class
|
---|
88 |
|
---|
89 | #endif '__SYSTEM_WINDOWS_FORMS_MESSAGE_AB__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.