Last change
on this file since 642 was 642, checked in by イグトランス (egtra), 16 years ago |
CheckBoxとButtonBaseクラスを追加。
|
File size:
1.1 KB
|
Rev | Line | |
---|
[642] | 1 | #require <Classes/ActiveBasic/Windows/UI/Control.ab>
|
---|
| 2 |
|
---|
| 3 | Namespace ActiveBasic
|
---|
| 4 | Namespace Windows
|
---|
| 5 | Namespace UI
|
---|
| 6 |
|
---|
| 7 | /*!
|
---|
| 8 | @date 2008/10/16
|
---|
| 9 | @brief ウィンドウクラス"BUTTON"用基底クラス。
|
---|
| 10 | @author Egtra
|
---|
| 11 | */
|
---|
| 12 | Class ButtonBase
|
---|
| 13 | Inherits WmCommandControl
|
---|
| 14 | Protected
|
---|
| 15 | Override Sub GetCreateStruct(ByRef cs As CREATESTRUCT)
|
---|
| 16 | cs.lpszClass = "BUTTON"
|
---|
| 17 | End Sub
|
---|
| 18 |
|
---|
| 19 | Sub ButtonBase()
|
---|
| 20 | End Sub
|
---|
| 21 | Public
|
---|
| 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 |
|
---|
| 42 | End Class
|
---|
| 43 |
|
---|
| 44 | End Namespace 'UI
|
---|
| 45 | End Namespace 'Widnows
|
---|
| 46 | End Namespace 'ActiveBasic
|
---|
Note:
See
TracBrowser
for help on using the repository browser.