Ignore:
Timestamp:
Sep 29, 2008, 1:02:27 AM (16 years ago)
Author:
イグトランス (egtra)
Message:

Button.OnClickの仕組みを汎用的(WM_COMMAND全般)に。WndProcなどをProtectedへ。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/UI/Button.ab

    r561 r637  
    1313*/
    1414Class Button
    15     Inherits Control
     15    Inherits WmCommandControl
    1616Protected
    1717    Override Sub GetCreateStruct(ByRef cs As CREATESTRUCT)
     
    2626    End Sub
    2727
     28    Override Function RaiseCommandEvent(notificationCode As Word) As Boolean
     29        Dim lr As LRESULT
     30        RaiseCommandEvent = False
     31        Select Case notificationCode
     32            Case BN_CLICKED
     33                RaiseCommandEvent = OnClick(Args.Empty)
     34            Case BN_DBLCLK
     35                RaiseCommandEvent = OnDoubleClick(Args.Empty)
     36            Case BN_SETFOCUS
     37                RaiseCommandEvent = ProcessMessage(WM_SETFOCUS, 0, 0, lr)
     38            Case BN_KILLFOCUS
     39                RaiseCommandEvent = ProcessMessage(WM_KILLFOCUS, 0, 0, lr)
     40            'ここに挙げられなかったBNメッセージは、16ビットWindowsとの互換性のためとされているもの。
     41        End Select
     42    End Function
     43
    2844End Class
    2945
Note: See TracChangeset for help on using the changeset viewer.