source: trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/UI/Control.ab@ 679

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

UI.TimerをWM_TIMER使用に修正。Step32時計のサンプルを追加。

File size: 17.7 KB
Line 
1'Classes/ActiveBasic/Windows/UI/Control.ab
2
3#require <Classes/ActiveBasic/Windows/UI/WindowHandle.ab>
4#require <Classes/ActiveBasic/Windows/UI/EventArgs.ab>
5#require <Classes/ActiveBasic/COM/ComClassBase.ab>
6
7Namespace ActiveBasic
8Namespace Windows
9Namespace UI
10
11Namespace Detail
12 TypeDef PTrackMouseEvent = *Function(ByRef tme As TRACKMOUSEEVENT) As BOOL
13End Namespace
14
15/*
16@brief Windowsのウィンドウを管理する基底クラス
17@auther Egtra
18*/
19Class Control
20 Inherits WindowHandle
21 Implements ActiveBasic.COM.InterfaceQuerable
22Public
23 /*!
24 @brief Destroyイベントよりも後に呼ばれるDestroyイベントデリゲート
25 @date 2008/07/16
26 */
27 finalDestroy As ActiveBasic.Windows.UI.Handler
28
29 Sub Control()
30 comImpl = New COM.ComClassDelegationImpl(This)
31 End Sub
32
33 Function Handle() As HWND
34 Handle = hwnd
35 End Function
36
37 /*!
38 @brief HWNDからControlインスタンスを取得する。
39 @param[in] hwnd 対象のウィンドウハンドル
40 @return 対応するControlインスタンス。存在しなければ作成される。ただし、hwndがNULLならNothing。
41 */
42 Static Function FromHWnd(hwnd As HWND) As Control
43 FromHWnd = Nothing
44 If IsWindow(hwnd) Then
45 FromHWnd = FromHWndCore(hwnd)
46 If ActiveBasic.IsNothing(FromHWnd) Then
47 Dim lock = New ActiveBasic.Windows.CriticalSectionLock(_System_CriticalSection)
48 Try
49 FromHWnd = New Control
50 FromHWnd.registerStandardEvent()
51 FromHWnd.AssociateHWnd(hwnd)
52 Finally
53 lock.Dispose()
54 End Try
55 End If
56 End If
57 End Function
58
59Private
60 Static Function FromHWndCore(hwnd As HWND) As Control
61 FromHWndCore = _System_PtrObj(GetProp(hwnd, PropertyInstance As ULONG_PTR As PCTSTR) As VoidPtr) As Control
62 End Function
63
64'--------------------------------
65' ウィンドウ作成
66
67Public
68 /*!
69 @brief ウィンドウを作成する(詳細版)。
70 @date 2008/08/02
71 通常はCreateやCreateFormその他を使ってください。
72 */
73 Sub CreateEx(parent As Control, style As DWord, exStyle As DWord, hmenu As HMENU)
74 Dim cs As CREATESTRUCT
75 With cs
76 .dwExStyle = exStyle
77 .lpszClass = (atom As ULONG_PTR) As LPCTSTR
78 .lpszName = 0
79 .style = style
80 .x = 0
81 .y = 0
82 .cx = 0
83 .cy = 0
84 If IsNothing(parent) Then
85 .hwndParent = 0
86 Else
87 .hwndParent = parent As HWND
88 End If
89 .hMenu = hmenu
90 .hInstance = hInstance
91 End With
92 GetCreateStruct(cs)
93 createImpl(cs, parent)
94 End Sub
95
96 /*!
97 @brief ウィンドウを作成する(子ウィンドウ以外)。
98 @date 2008/08/02
99 */
100 Sub CreateForm(style As DWord, exStyle As DWord, owner = Nothing As Control, hmenu = 0 As HMENU)
101 CreateEx(owner, style, exStyle, hmenu)
102 End Sub
103
104 Sub CreateForm()
105 CreateEx(Nothing, 0, 0, 0)
106 End Sub
107
108 /*!
109 @brief 子ウィンドウを作成する。
110 @date 2008/08/02
111 */
112 Sub Create(parent As Control, style = 0 As DWord, exStyle = 0 As DWord, id = 0 As Long)
113 CreateEx(parent, style Or WS_CHILD Or WS_VISIBLE, exStyle, id As ULONG_PTR As HMENU)
114 End Sub
115
116Protected
117 Virtual Sub GetCreateStruct(ByRef cs As CREATESTRUCT)
118 End Sub
119
120 Sub createImpl(ByRef cs As CREATESTRUCT, parent As Control)
121 throwIfAlreadyCreated()
122
123 StartWndProc()
124
125 With cs
126 'よそのウィンドウクラスの場合、WndProcFirst内のhwndの代入が行われないため、ここでも行っておく。
127 hwnd = CreateWindowEx(.dwExStyle, .lpszClass, .lpszName, .style,
128 .x, .y, .cx, .cy, .hwndParent, .hMenu, .hInstance, .lpCreateParams)
129 If hwnd = 0 Then
130 ThrowWithLastErrorNT("Control.CreateEx")
131 End If
132
133 If IsNothing(FromHWndCore(hwnd)) <> False Then
134 AssociateHWnd(hwnd)
135 TlsSetValue(tlsIndex, 0)
136 End If
137 End With
138
139 If IsNothing(parent) = False Then
140 RegisterUnassociateHWnd(parent)
141 End If
142 End Sub
143
144Public
145/*
146 Sub Attach(hwndNew As HWND)
147 throwIfAlreadyCreated()
148 If hwndNew = 0 Then
149 Throw New System.ArgumentNullException("Control.Attach")
150 End If
151 registerStandardEvent()
152 AssociateHWnd(hwndNew)
153 End Sub
154*/
155 Sub BeginSubclass()
156 throwIfNotCreated()
157 prevWndProc = SetWindowLongPtr(hwnd, GWLP_WNDPROC, AddressOf(WndProcFirst) As LONG_PTR) As WNDPROC
158 End Sub
159
160Private
161 Sub throwIfAlreadyCreated()
162 If hwnd <> 0 Then
163 Throw New System.InvalidOperationException("Window is already created.")
164 End If
165 End Sub
166
167 Sub throwIfNotCreated()
168 If hwnd = 0 Then
169 Throw New System.InvalidOperationException("Window is not already created.")
170 End If
171 End Sub
172
173'--------------------------------
174' ウィンドウプロシージャ
175
176Protected
177 Virtual Function WndProc(msg As DWord, wp As WPARAM, lp As LPARAM) As LRESULT
178 If Not ProcessMessage(msg, wp, lp, WndProc) Then
179 WndProc = DefWndProc(msg, wp, lp)
180 End If
181 End Function
182
183 Virtual Function DefWndProc(msg As DWord, wp As WPARAM, lp As LPARAM) As LRESULT
184 If prevWndProc Then
185 DefWndProc = CallWindowProc(prevWndProc, hwnd, msg, wp, lp)
186 Else
187 DefWndProc = DefWindowProc(hwnd, msg, wp, lp)
188 End If
189 End Function
190Protected
191 Function ProcessMessage(msg As DWord, wp As WPARAM, lp As LPARAM, ByRef lr As LRESULT) As Boolean
192 Dim h = Nothing As MessageHandler
193 Dim b = messageMap.TryGetValue(Hex$(msg), h)
194 If b Then
195 If Not IsNothing(h) Then
196 Dim a = New MessageArgs(hwnd, msg, wp, lp)
197 h(This, a)
198 If a.Handled Then
199 lr = a.LResult
200 ProcessMessage = True
201 Exit Function
202 End If
203 End If
204 End If
205 ProcessMessage = False
206 End Function
207Private
208 Static Function makeKeysFormMsg(e As MessageArgs) As Keys
209 Dim t As DWord
210 t = e.WParam And Keys.KeyCode
211 t Or= (GetKeyState(VK_SHIFT) As Word And &h8000) << 1
212 t Or= (GetKeyState(VK_CONTROL) As Word And &h8000) << 2
213 t Or= (GetKeyState(VK_MENU) As Word And &h8000) << 3
214 makeKeysFormMsg = t As Keys
215 End Function
216
217 Static Function makeMouseEventFromMsg(e As MessageArgs) As MouseArgs
218 Dim wp = e.WParam
219 Dim lp = e.LParam
220
221 /*************************************************/
222 Dim mb As MouseButtons
223 If LOWORD(wp) = 0 Then mb = MouseButtons.None
224 If LOWORD(wp) and MK_LBUTTON Then mb or = MouseButtons.Left
225 If LOWORD(wp) and MK_RBUTTON Then mb or = MouseButtons.Right
226 If LOWORD(wp) and MK_MBUTTON Then mb or = MouseButtons.Middle
227 If LOWORD(wp) and MK_XBUTTON1 Then mb or = MouseButtons.XButton1
228 If LOWORD(wp) and MK_XBUTTON2 Then mb or = MouseButtons.XButton2
229 If LOWORD(wp) and MK_SHIFT Then mb or = MouseButtons.Shift
230 If LOWORD(wp) and MK_CONTROL Then mb or = MouseButtons.Control
231 makeMouseEventFromMsg = New MouseArgs(mb, 1, GET_X_LPARAM(lp), GET_Y_LPARAM(lp), 0)
232 /*************************************************/
233
234 'makeMouseEventFromMsg = New MouseArgs(LOWORD(wp) As MouseButtons, 1, GET_X_LPARAM(lp), GET_Y_LPARAM(lp), 0)
235 End Function
236
237Protected
238 /*!
239 @brief 最初にウィンドウプロシージャを使うための前処理を行う関数
240 @date 2008/07/11
241 WndProcFirstを使うときは、この関数を呼んでおく必要がある。
242 */
243 Sub StartWndProc()
244 TlsSetValue(tlsIndex, ObjPtr(This))
245 registerStandardEvent()
246 End Sub
247Private
248 /*!
249 @brief 主なメッセージハンドラの登録を行う関数
250 @date 2008/08/02
251 */
252 Sub registerStandardEvent()
253 AddMessageEvent(WM_ERASEBKGND, AddressOf(OnEraseBackground))
254 Dim md = New MessageHandler(AddressOf(OnMouseDownBase))
255 AddMessageEvent(WM_LBUTTONDOWN, md)
256 AddMessageEvent(WM_RBUTTONDOWN, md)
257 AddMessageEvent(WM_MBUTTONDOWN, md)
258 AddMessageEvent(WM_XBUTTONDOWN, md)
259 Dim mu = New MessageHandler(AddressOf(OnMouseUpBase))
260 AddMessageEvent(WM_LBUTTONUP, mu)
261 AddMessageEvent(WM_RBUTTONUP, mu)
262 AddMessageEvent(WM_MBUTTONUP, mu)
263 AddMessageEvent(WM_XBUTTONUP, mu)
264 Dim mb = New MessageHandler(AddressOf(OnMouseDblClkBase))
265 AddMessageEvent(WM_LBUTTONDBLCLK, mb)
266 AddMessageEvent(WM_RBUTTONDBLCLK, mb)
267 AddMessageEvent(WM_MBUTTONDBLCLK, mb)
268 AddMessageEvent(WM_XBUTTONDBLCLK, mb)
269
270 AddMessageEvent(WM_MOUSEMOVE, AddressOf(OnMouseMoveBase))
271 AddMessageEvent(WM_MOUSELEAVE, AddressOf(OnMouseLeaveBase))
272 AddMessageEvent(WM_MOUSEHOVER, AddressOf(OnMouseHoverBase))
273 AddMessageEvent(WM_PAINT, AddressOf(OnPaintBase))
274 AddMessageEvent(WM_KEYDOWN, AddressOf(OnKeyDownBase))
275 AddMessageEvent(WM_CHAR, AddressOf(OnChar))
276 AddMessageEvent(WM_CREATE, AddressOf(OnCreateBase))
277 AddMessageEvent(WM_SIZE, AddressOf(OnSize))
278 End Sub
279
280 Sub OnEraseBackground(sender As Object, e As MessageArgs)
281 Dim a = New PaintBackgroundArgs(e.WParam, e.LParam)
282 e.Handled = e.Handled And OnPaintBackground(a)
283 e.LResult = a.Painted
284 End Sub
285
286 Sub OnMouseDownBase(sender As Object, e As MessageArgs)
287 e.Handled = e.Handled And OnMouseDown(makeMouseEventFromMsg(e))
288 End Sub
289
290 Sub OnMouseUpBase(sender As Object, e As MessageArgs)
291 Dim me = makeMouseEventFromMsg(e)
292 If doubleClickFired = False Then
293 OnClick(Args.Empty)
294 OnMouseClick(me)
295 Else
296 doubleClickFired = False
297 End If
298 e.Handled = e.Handled And OnMouseUp(me)
299 End Sub
300
301 Sub OnMouseDblClkBase(sender As Object, e As MessageArgs)
302 Dim me = makeMouseEventFromMsg(e)
303 doubleClickFired = True
304 OnMouseDown(me)
305 OnDoubleClick(Args.Empty)
306 e.Handled = e.Handled And OnMouseDoubleClick(me)
307 End Sub
308
309 Sub OnMouseMoveBase(sender As Object, e As MessageArgs)
310 Dim me = makeMouseEventFromMsg(e)
311 If mouseEntered = False Then
312 mouseEntered = True
313 OnMouseEnter(me)
314 trackMouseEvent(TME_LEAVE Or TME_HOVER)
315 End If
316 e.Handled = e.Handled And OnMouseMove(me)
317 End Sub
318
319 Sub OnMouseLeaveBase(sender As Object, e As MessageArgs)
320 e.Handled = e.Handled And OnMouseLeave(Args.Empty)
321 mouseEntered = False
322 End Sub
323
324 Sub OnMouseHoverBase(sender As Object, e As MessageArgs)
325 Dim me = makeMouseEventFromMsg(e)
326 e.Handled = e.Handled And OnMouseHover(me)
327 End Sub
328
329 Sub OnPaintBase(sender As Object, e As MessageArgs)
330 If ActiveBasic.IsNothing(paintDC) Then
331 e.Handled = False
332 Else
333 Dim ps As PAINTSTRUCT
334 BeginPaint(hwnd, ps)
335 Try
336 OnPaintDC(New PaintDCArgs(ps.hdc, ps.rcPaint))
337 Finally
338 EndPaint(hwnd, ps)
339 End Try
340 End If
341 End Sub
342
343 Sub OnKeyDownBase(sender As Object, e As MessageArgs)
344 e.Handled = e.Handled And OnKeyDown(New KeyArgs(makeKeysFormMsg(e)))
345 End Sub
346
347 Sub OnKeyUpBase(sender As Object, e As MessageArgs)
348 e.Handled = e.Handled And OnKeyUp(New KeyArgs(makeKeysFormMsg(e)))
349 End Sub
350
351 Sub OnChar(sender As Object, e As MessageArgs)
352 e.Handled = e.Handled And OnKeyPress(New KeyPressArgs(e.WParam As Char))
353 End Sub
354
355 Sub OnCreateBase(sender As Object, e As MessageArgs)
356 e.Handled = e.Handled And OnCreate(New CreateArgs(e.LParam As *CREATESTRUCT))
357 End Sub
358
359 Sub OnSize(sender As Object, e As MessageArgs)
360 e.Handled = e.Handled And OnResize(New ResizeArgs(e.WParam, e.LParam))
361 End Sub
362
363 messageMap As System.Collections.Generic.Dictionary<Object /*DWord*/, MessageHandler>
364
365Public
366 /*!
367 @biref メッセージイベントハンドラを登録する。
368 @date 2007/12/04
369 */
370 Sub AddMessageEvent(message As DWord, h As MessageHandler)
371 If Not IsNothing(h) Then
372 If IsNothing(messageMap) Then
373 messageMap = New System.Collections.Generic.Dictionary<Object, MessageHandler>
374 End If
375 Dim msg = Hex$(message)
376 Dim m = Nothing As MessageHandler
377 If messageMap.TryGetValue(msg, m) Then
378 messageMap.Item[msg] = m + h
379 Else
380 messageMap.Item[msg] = h
381 End If
382 End If
383 End Sub
384
385 /*!
386 @biref メッセージイベントハンドラ登録を解除する。
387 @date 2007/12/04
388 */
389 Sub RemoveMessageEvent(message As DWord, a As MessageHandler)
390 If Not IsNothing(a) Then
391 If Not IsNothing(messageMap) Then
392 Dim msg = Hex$(message)
393 Dim m = messageMap.Item[msg]
394 If Not IsNothing(m) Then
395 messageMap.Item[msg] = m - a
396 End If
397 End If
398 End If
399 End Sub
400
401'--------------------------------
402' ウィンドウメッセージ処理
403
404
405'--------
406'イベント
407
408#include "ControlEvent.sbp"
409
410'--------------------------------
411' インスタンスメンバ変数
412Private
413 /*!
414 @brief サブクラス化前のウィンドウプロシージャ
415 @date 2008/08/23
416 サブクラス化していなければNULL
417 */
418 prevWndProc As WNDPROC
419 /*!
420 @brief マウスカーソルがクライアント領域に入っているかどうかのフラグ
421 外から中に入ってきたときにMouseEnterイベントを発生させるために用意している。
422 */
423 mouseEntered As Boolean
424 /*!
425 @brief ダブルクリックが起こったかどうかのフラグ
426 Click/MouseClickイベントのために用意している。
427 @date 2008/07/12
428 */
429 doubleClickFired As Boolean
430
431'--------------------------------
432' 初期ウィンドウクラス
433Protected
434 Static Function WndProcFirst(hwnd As HWND, msg As DWord, wp As WPARAM, lp As LPARAM) As LRESULT
435 Imports System.Runtime.InteropServices
436
437 Dim rThis = FromHWndCore(hwnd)
438 If IsNothing(rThis) Then
439 rThis = _System_PtrObj(TlsGetValue(tlsIndex)) As Control
440 TlsSetValue(tlsIndex, 0)
441 If IsNothing(rThis) Then
442 Goto *InstanceIsNotFound
443 End If
444 ' ウィンドウが作られて最初にWndProcFirstが呼ばれたとき
445 rThis.AssociateHWnd(hwnd)
446 End If
447 If msg = WM_NCDESTROY Then
448 rThis.UnassociateHWnd()
449 rThis.hwnd = 0
450 End If
451 If msg = WM_DESTROY And IsNothing(rThis.finalDestroy) = False Then
452 Dim f = rThis.finalDestroy
453 f(rThis, Args.Empty)
454 End If
455 WndProcFirst = rThis.WndProc(msg, wp, lp)
456 Exit Function
457
458 *InstanceIsNotFound
459 Dim err = String.Concat("Control.WndProcFirst: The attached instance is not found. msg = &h",
460 Hex$(msg), Ex"\r\n")
461 OutputDebugString(ToTCStr(err))
462 WndProcFirst = DefWindowProc(hwnd, msg, wp, lp)
463 End Function
464
465 /*!
466 @brief Controlインスタンスとウィンドウハンドルを結び付ける。
467 @param[in] hwndNew 結び付けるウィンドウハンドル
468 @date 2008/07/16
469 これを実行することで、UnassociateHWndされるまでControlがGC対象にならなくなると共に、
470 FromHWndでウィンドウハンドルからControlインスタンスの取得が可能となる。
471 */
472 Sub AssociateHWnd(hwndNew As HWND)
473 SetHWnd(hwndNew)
474 Prop[PropertyInstance] = ObjPtr(This) As HANDLE
475 comImpl.AddRef()
476 End Sub
477
478 /*!
479 @brief オーナーの破棄時にこのControlインスタンスとウィンドウハンドルの結び付けを解除するよう登録する。
480 @param[in] owner 結び付けの解除を連動させるControl
481 @date 2008/07/16
482 ownerのFinalDestoryでこのControlとHWNDとの結び付けを解除する。
483 */
484 Sub RegisterUnassociateHWnd(owner As Control)
485 If IsNothing(owner) = False Then
486 Dim e = New Handler(AddressOf(UnassociateHWndOnEvent))
487 If IsNothing(finalDestroy) Then
488 owner.finalDestroy = e
489 Else
490 owner.finalDestroy += e
491 End If
492 End If
493 End Sub
494
495 Sub UnassociateHWndOnEvent(sender As Object, e As Args)
496 UnassociateHWnd()
497 hwnd = 0
498 End Sub
499
500 Sub UnassociateHWnd()
501 comImpl.Release()
502 End Sub
503
504' Static Const WM_CONTROL_INVOKE = WM_USER + 0 As DWord
505' Static Const WM_CONTROL_BEGININVOKE = WM_USER + 1 As DWord
506
507'--------------------------------
508' インタフェース実装
509
510Public
511 Virtual Function QueryInterfaceImpl(ByRef iid As IID, ByRef pv As VoidPtr) As HRESULT
512 QueryInterfaceImpl = E_NOTIMPL
513 End Function
514
515Private
516 /*!
517 @brief ウィンドウの寿命管理
518 Controlには次のAddRef-Releaseの対がある。
519 @li createImpl - WM_NCDESTROY(ウィンドウプロシージャがWndProcFirstの場合)
520 @li createImpl - UnassociateHWnd←UnassociateHWndOnEvent←RegisterUnassociateHWnd(その他のウィンドウクラスの場合)
521 @li Attach - WM_NCDESTROY(サブクラス化された場合)
522 なお、Control派生クラスをサブクラス化すると、後ろ2つが両方適用される。
523 */
524 comImpl As COM.ComClassDelegationImpl
525
526'--------------------------------
527' その他の補助関数
528Private
529 Function trackMouseEvent(flags As DWord) As BOOL
530 If pTrackMouseEvent <> 0 Then
531 Dim tme As TRACKMOUSEEVENT
532 With tme
533 .cbSize = Len(tme)
534 .dwFlags = flags
535 .hwndTrack = hwnd
536 .dwHoverTime = HOVER_DEFAULT
537 End With
538 trackMouseEvent = pTrackMouseEvent(tme)
539 End If
540 End Function
541
542'--------------------------------
543' 初期化終了関連(特にウィンドウクラス)
544Private
545 'ウィンドウ作成時にウィンドウプロシージャへThisを伝えるためのもの
546 Static tlsIndex As DWord
547
548 Static hInstance As HINSTANCE
549 Static atom As ATOM
550 Static hmodComctl As HMODULE
551 Static pTrackMouseEvent As Detail.PTrackMouseEvent
552
553 Static Const WindowClassName = "ActiveBasic.Windows.UI.Control"
554 Static Const PropertyInstance = 0 As ATOM
555Public
556 Static Sub Initialize(hinst As HINSTANCE)
557 tlsIndex = TlsAlloc()
558 If tlsIndex = TLS_OUT_OF_INDEXES Then
559 ThrowWithLastError("Control.Initialize: TlsAlloc failed.")
560 End If
561 hInstance = hinst
562 hmodComctl = LoadLibrary("comctl32.dll")
563 pTrackMouseEvent = GetProcAddress(hmodComctl, ToMBStr("_TrackMouseEvent")) As Detail.PTrackMouseEvent
564
565 Dim PropertyInstanceString = WindowClassName + " " + Hex$(GetCurrentProcessId())
566 PropertyInstance = GlobalAddAtom(ToTCStr(PropertyInstanceString))
567 If PropertyInstance = 0 Then
568 ThrowWithLastError("Control.Initialize: GlobalAddAtom failed.")
569 End If
570
571 Dim wcx As WNDCLASSEX
572 With wcx
573 .cbSize = Len (wcx)
574 .style = CS_HREDRAW Or CS_VREDRAW Or CS_DBLCLKS
575 .lpfnWndProc = AddressOf (WndProcFirst)
576 .cbClsExtra = 0
577 .cbWndExtra = 0
578 .hInstance = hinst
579 .hIcon = 0
580 .hCursor = LoadImage(0, MAKEINTRESOURCE(IDC_ARROW), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE Or LR_SHARED) As HCURSOR
581 .hbrBackground = 0
582 .lpszMenuName = 0
583 .lpszClassName = ToTCStr(WindowClassName)
584 .hIconSm = 0
585 End With
586 atom = RegisterClassEx(wcx)
587 If atom = 0 Then
588 ThrowWithLastErrorNT("Control.Initialize: RegisterClasseEx failed.")
589 End If
590 End Sub
591
592 Static Sub Uninitialize()
593 If atom <> 0 Then
594 UnregisterClass(atom As ULONG_PTR As PCSTR, hInstance)
595 End If
596 If tlsIndex <> 0 And tlsIndex <> &hffffffff Then
597 TlsFree(tlsIndex)
598 End If
599 If hmodComctl <> 0 Then
600 FreeLibrary(hmodComctl)
601 End If
602 If PropertyInstance <> 0 Then
603 GlobalDeleteAtom(PropertyInstance)
604 End If
605 End Sub
606End Class
607
608/*!
609@brief WM_COMMANDで通知を行うコントロールの基底クラス
610@date 2008/08/28
611@auther Egtra
612親がWM_COMMANDを受け取ったら、RaiseCommandEventを呼ぶことを意図している。
613(Formで実装済み)
614*/
615Class WmCommandControl
616 Inherits Control
617Public
618 Abstract Function RaiseCommandEvent(notificationCode As Word) As Boolean
619End Class
620
621End Namespace 'UI
622End Namespace 'Widnows
623End Namespace 'ActiveBasic
Note: See TracBrowser for help on using the repository browser.