- Timestamp:
- Mar 31, 2009, 2:09:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/UI/Control.ab
r679 r698 57 57 End Function 58 58 59 Function AddRef() As DWord 60 AddRef = comImpl.AddRef() 61 End Function 62 63 Function Release() As DWord 64 Release = comImpl.Release() 65 End Function 66 67 Function QueryInterface(ByRef riid As IID, ByRef pv As Any) As HRESULT 68 QueryInterface = comImpl.QueryInterface(riid, pv) 69 End Function 70 59 71 Private 60 72 Static Function FromHWndCore(hwnd As HWND) As Control … … 70 82 @date 2008/08/02 71 83 通常はCreateやCreateFormその他を使ってください。 84 ここで渡された引数は、GetCreateStructへ渡して修正の機会を与えた後に、 85 CreateWindowExへ渡される。 72 86 */ 73 87 Sub CreateEx(parent As Control, style As DWord, exStyle As DWord, hmenu As HMENU) … … 115 129 116 130 Protected 131 /*! 132 @brief ウィンドウ作成前の初期設定確認 133 派生クラスでオーバーライドして、csを書き換えてよい。 134 書き換えられたcsを基にCreateWindowExが呼ばれる。 135 */ 117 136 Virtual Sub GetCreateStruct(ByRef cs As CREATESTRUCT) 118 137 End Sub 119 138 139 Private 120 140 Sub createImpl(ByRef cs As CREATESTRUCT, parent As Control) 121 141 throwIfAlreadyCreated() … … 153 173 End Sub 154 174 */ 175 155 176 Sub BeginSubclass() 156 177 throwIfNotCreated() … … 207 228 Private 208 229 Static Function makeKeysFormMsg(e As MessageArgs) As Keys 209 Dim t As DWord 210 t = e.WParam And Keys.KeyCode 230 Dim t = (e.WParam As DWord) And Keys.KeyCode 211 231 t Or= (GetKeyState(VK_SHIFT) As Word And &h8000) << 1 212 232 t Or= (GetKeyState(VK_CONTROL) As Word And &h8000) << 2 … … 354 374 355 375 Sub OnCreateBase(sender As Object, e As MessageArgs) 356 e.Handled = e.Handled And OnCreate(New CreateArgs(e.LParam As *CREATESTRUCT)) 376 Dim c = New CreateArgs(e.LParam As *CREATESTRUCT) 377 If e.LResult = -1 Then 378 c.Cancel = True 379 End If 380 e.Handled = e.Handled And OnCreate(c) 381 If c.Cancel Then 382 e.LResult = -1 383 Else 384 e.LResult = 0 385 End If 357 386 End Sub 358 387 … … 579 608 .hIcon = 0 580 609 .hCursor = LoadImage(0, MAKEINTRESOURCE(IDC_ARROW), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE Or LR_SHARED) As HCURSOR 581 .hbrBackground = 0610 .hbrBackground = (COLOR_3DFACE + 1) As HBRUSH 582 611 .lpszMenuName = 0 583 612 .lpszClassName = ToTCStr(WindowClassName)
Note:
See TracChangeset
for help on using the changeset viewer.