source: trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/UI/ButtonBase.ab@ 642

Last change on this file since 642 was 642, checked in by イグトランス (egtra), 16 years ago

CheckBoxとButtonBaseクラスを追加。

File size: 1.1 KB
Line 
1#require <Classes/ActiveBasic/Windows/UI/Control.ab>
2
3Namespace ActiveBasic
4Namespace Windows
5Namespace UI
6
7/*!
8@date 2008/10/16
9@brief ウィンドウクラス"BUTTON"用基底クラス。
10@author Egtra
11*/
12Class ButtonBase
13 Inherits WmCommandControl
14Protected
15 Override Sub GetCreateStruct(ByRef cs As CREATESTRUCT)
16 cs.lpszClass = "BUTTON"
17 End Sub
18
19 Sub ButtonBase()
20 End Sub
21Public
22 Sub RaiseClick()
23 OnClick(Args.Empty)
24 End Sub
25
26 Override Function RaiseCommandEvent(notificationCode As Word) As Boolean
27 Dim lr As LRESULT
28 RaiseCommandEvent = False
29 Select Case notificationCode
30 Case BN_CLICKED
31 RaiseCommandEvent = OnClick(Args.Empty)
32 Case BN_DBLCLK
33 RaiseCommandEvent = OnDoubleClick(Args.Empty)
34 Case BN_SETFOCUS
35 RaiseCommandEvent = ProcessMessage(WM_SETFOCUS, 0, 0, lr)
36 Case BN_KILLFOCUS
37 RaiseCommandEvent = ProcessMessage(WM_KILLFOCUS, 0, 0, lr)
38 'ここに挙げられなかったBNメッセージは、16ビットWindowsとの互換性のためとされているもの。
39 End Select
40 End Function
41
42End Class
43
44End Namespace 'UI
45End Namespace 'Widnows
46End Namespace 'ActiveBasic
Note: See TracBrowser for help on using the repository browser.