| 1 | /**
|
|---|
| 2 | @file Include/Classes/ActiveBasic/Windows/UI/Args.ab
|
|---|
| 3 | @brief イベントハンドラ関連
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | Namespace ActiveBasic
|
|---|
| 7 | Namespace Windows
|
|---|
| 8 | Namespace UI
|
|---|
| 9 |
|
|---|
| 10 | TypeDef Args = System.EventArgs
|
|---|
| 11 | 'TypeDef Handler = System.EventHandler
|
|---|
| 12 | Delegate Sub Handler(sender As Object, e As Args)
|
|---|
| 13 |
|
|---|
| 14 | Class MessageArgs
|
|---|
| 15 | Inherits Args
|
|---|
| 16 | Public
|
|---|
| 17 | Sub MessageArgs(hwndSrc As HWND, message As DWord, wParam As WPARAM, lParam As LPARAM)
|
|---|
| 18 | msg = message
|
|---|
| 19 | ' hwnd = hwndSrc
|
|---|
| 20 | wp = wParam
|
|---|
| 21 | lp = lParam
|
|---|
| 22 | lr = 0
|
|---|
| 23 | End Sub
|
|---|
| 24 |
|
|---|
| 25 | Const Function Msg() As DWord
|
|---|
| 26 | Msg = msg
|
|---|
| 27 | End Function
|
|---|
| 28 |
|
|---|
| 29 | ' Const Function HWnd() As HWND
|
|---|
| 30 | ' HWnd = hwnd
|
|---|
| 31 | ' End Function
|
|---|
| 32 |
|
|---|
| 33 | Const Function WParam() As WPARAM
|
|---|
| 34 | WParam = wp
|
|---|
| 35 | End Function
|
|---|
| 36 |
|
|---|
| 37 | Const Function LParam() As LPARAM
|
|---|
| 38 | LParam = lp
|
|---|
| 39 | End Function
|
|---|
| 40 |
|
|---|
| 41 | Const Function LResult() As LRESULT
|
|---|
| 42 | LResult = lr
|
|---|
| 43 | End Function
|
|---|
| 44 |
|
|---|
| 45 | Sub LResult(lResult As LRESULT)
|
|---|
| 46 | lr = lResult
|
|---|
| 47 | End Sub
|
|---|
| 48 | Private
|
|---|
| 49 | msg As DWord
|
|---|
| 50 | ' hwnd As HWND
|
|---|
| 51 | wp As WPARAM
|
|---|
| 52 | lp As LPARAM
|
|---|
| 53 | lr As LRESULT
|
|---|
| 54 | End Class
|
|---|
| 55 |
|
|---|
| 56 | Delegate Sub MessageHandler(sender As Object, e As MessageArgs)
|
|---|
| 57 |
|
|---|
| 58 | Class PaintDCArgs
|
|---|
| 59 | Inherits Args
|
|---|
| 60 | Public
|
|---|
| 61 | Sub PaintDCArgs(hdcTarget As HDC, ByRef rect As RECT)
|
|---|
| 62 | hdc = hdcTarget
|
|---|
| 63 | rc = rect
|
|---|
| 64 | End Sub
|
|---|
| 65 |
|
|---|
| 66 | Const Function Handle() As HDC
|
|---|
| 67 | Handle = hdc
|
|---|
| 68 | End Function
|
|---|
| 69 |
|
|---|
| 70 | Const Function ClipRect() As RECT
|
|---|
| 71 | ClipRect = rc
|
|---|
| 72 | End Function
|
|---|
| 73 |
|
|---|
| 74 | Private
|
|---|
| 75 | hdc As HDC
|
|---|
| 76 | rc As RECT
|
|---|
| 77 | End Class
|
|---|
| 78 |
|
|---|
| 79 | Delegate Sub PaintDCHandler(sender As Object, e As PaintDCArgs)
|
|---|
| 80 |
|
|---|
| 81 | Class PaintDCHandledArgs
|
|---|
| 82 | Inherits PaintDCArgs
|
|---|
| 83 | Public
|
|---|
| 84 | Sub PaintDCHandledArgs(hdcTarget As HDC, ByRef rect As RECT)
|
|---|
| 85 | PaintDCArgs(hdcTarget, rect)
|
|---|
| 86 | End Sub
|
|---|
| 87 |
|
|---|
| 88 | Const Function Handled() As Boolean
|
|---|
| 89 | Handled = h
|
|---|
| 90 | End Function
|
|---|
| 91 |
|
|---|
| 92 | Sub Handled(handled As Boolean)
|
|---|
| 93 | h = handled
|
|---|
| 94 | End Sub
|
|---|
| 95 |
|
|---|
| 96 | Private
|
|---|
| 97 | h As Boolean
|
|---|
| 98 | End Class
|
|---|
| 99 |
|
|---|
| 100 | TypeDef PaintDCBackGroundArgs = PaintDCHandledArgs
|
|---|
| 101 |
|
|---|
| 102 | Enum MouseButtons
|
|---|
| 103 | None = 0
|
|---|
| 104 | Left = MK_LBUTTON
|
|---|
| 105 | Right = MK_RBUTTON
|
|---|
| 106 | Middle = MK_MBUTTON
|
|---|
| 107 | XButton1 = MK_XBUTTON1
|
|---|
| 108 | XButton2 = MK_XBUTTON2
|
|---|
| 109 |
|
|---|
| 110 | Shift = MK_SHIFT
|
|---|
| 111 | Control = MK_CONTROL
|
|---|
| 112 | End Enum
|
|---|
| 113 |
|
|---|
| 114 | Class MouseArgs
|
|---|
| 115 | Inherits Args
|
|---|
| 116 | Public
|
|---|
| 117 | Sub MouseArgs(button As MouseButtons, clicks As Long, x As Long, y As Long, delta As Long)
|
|---|
| 118 | This.button = button
|
|---|
| 119 | This.clicks = clicks
|
|---|
| 120 | This.pt = New System.Drawing.Point(x, y)
|
|---|
| 121 | This.delta = delta
|
|---|
| 122 | End Sub
|
|---|
| 123 |
|
|---|
| 124 | Const Function Button() As MouseButtons
|
|---|
| 125 | Button = button
|
|---|
| 126 | End Function
|
|---|
| 127 |
|
|---|
| 128 | Const Function Clicks() As Long
|
|---|
| 129 | Clicks = clicks
|
|---|
| 130 | End Function
|
|---|
| 131 |
|
|---|
| 132 | Const Function Delta() As Long
|
|---|
| 133 | Delta = delta
|
|---|
| 134 | End Function
|
|---|
| 135 |
|
|---|
| 136 | Const Function Locale() As System.Drawing.Point
|
|---|
| 137 | Locale = New System.Drawing.Point(pt.X, pt.Y)
|
|---|
| 138 | End Function
|
|---|
| 139 |
|
|---|
| 140 | Const Function X() As Long
|
|---|
| 141 | X = pt.X
|
|---|
| 142 | End Function
|
|---|
| 143 |
|
|---|
| 144 | Const Function Y() As Long
|
|---|
| 145 | Y = pt.Y
|
|---|
| 146 | End Function
|
|---|
| 147 |
|
|---|
| 148 | Private
|
|---|
| 149 | pt As System.Drawing.Point
|
|---|
| 150 | button As MouseButtons
|
|---|
| 151 | clicks As Long
|
|---|
| 152 | delta As Long
|
|---|
| 153 | End Class
|
|---|
| 154 |
|
|---|
| 155 | Delegate Sub MouseHandler(sender As Object, e As MouseArgs)
|
|---|
| 156 |
|
|---|
| 157 | Class KeyPressArgs
|
|---|
| 158 | Inherits Args
|
|---|
| 159 | Public
|
|---|
| 160 | Sub KeyPressArgs(keyChar As Char)
|
|---|
| 161 | key = keyChar
|
|---|
| 162 | End Sub
|
|---|
| 163 |
|
|---|
| 164 | Sub KeyChar(keyChar As Char)
|
|---|
| 165 | key = keyChar
|
|---|
| 166 | End Sub
|
|---|
| 167 |
|
|---|
| 168 | Const Function KeyChar() As Char
|
|---|
| 169 | KeyChar = key
|
|---|
| 170 | End Function
|
|---|
| 171 |
|
|---|
| 172 | Sub Handled(handled As Boolean)
|
|---|
| 173 | h = handled
|
|---|
| 174 | End Sub
|
|---|
| 175 |
|
|---|
| 176 | Const Function Handled() As Boolean
|
|---|
| 177 | Handled = h
|
|---|
| 178 | End Function
|
|---|
| 179 | Private
|
|---|
| 180 | key As Char
|
|---|
| 181 | h As Boolean
|
|---|
| 182 | End Class
|
|---|
| 183 |
|
|---|
| 184 | Delegate Sub KeyPressHandler(sender As Object, e As KeyPressArgs)
|
|---|
| 185 |
|
|---|
| 186 | Enum Keys
|
|---|
| 187 | None = 0
|
|---|
| 188 | LButton = VK_LBUTTON
|
|---|
| 189 | RButton = VK_RBUTTON
|
|---|
| 190 | Cancel = VK_CANCEL
|
|---|
| 191 | MButton = VK_MBUTTON
|
|---|
| 192 | XButton1 = VK_XBUTTON1
|
|---|
| 193 | XButton2 = VK_XBUTTON2
|
|---|
| 194 | Back = VK_BACK
|
|---|
| 195 | Tab = VK_TAB
|
|---|
| 196 | LineFeed = &ha
|
|---|
| 197 | Clear = VK_CLEAR
|
|---|
| 198 | Enter = VK_RETURN
|
|---|
| 199 | Return_ = VK_RETURN
|
|---|
| 200 | ShiftKey = VK_SHIFT
|
|---|
| 201 | ControlKey = VK_CONTROL
|
|---|
| 202 | Menu = VK_MENU
|
|---|
| 203 | Pause = VK_PAUSE
|
|---|
| 204 | Capital = VK_CAPITAL
|
|---|
| 205 | KanaMode = VK_KANA
|
|---|
| 206 | HangulMode = VK_HANGUL
|
|---|
| 207 | JunjaMode = VK_JUNJA
|
|---|
| 208 | FinalMode = VK_FINAL
|
|---|
| 209 | KanjiMode = VK_KANJI
|
|---|
| 210 | HanjaMode = VK_HANJA
|
|---|
| 211 | Escape = VK_ESCAPE
|
|---|
| 212 | IMEConvert = VK_CONVERT
|
|---|
| 213 | IMENonconvert = VK_NONCONVERT
|
|---|
| 214 | IMEAccept = VK_ACCEPT
|
|---|
| 215 | IMEModeChange = VK_MODECHANGE
|
|---|
| 216 | Space = VK_SPACE
|
|---|
| 217 | Prior = VK_PRIOR
|
|---|
| 218 | PageUp = VK_PRIOR
|
|---|
| 219 | PageDown = VK_NEXT
|
|---|
| 220 | Next_ = VK_NEXT
|
|---|
| 221 | End_ = VK_END
|
|---|
| 222 | Home = VK_HOME
|
|---|
| 223 | Left = VK_LEFT
|
|---|
| 224 | Up = VK_UP
|
|---|
| 225 | Right = VK_RIGHT
|
|---|
| 226 | Down = VK_DOWN
|
|---|
| 227 | Select_ = VK_SELECT
|
|---|
| 228 | Print = VK_PRINT
|
|---|
| 229 | Execute = VK_EXECUTE
|
|---|
| 230 | Snapshot = VK_SNAPSHOT
|
|---|
| 231 | Insert = VK_INSERT
|
|---|
| 232 | Delete_ = VK_DELETE
|
|---|
| 233 | Help = VK_HELP
|
|---|
| 234 | D0 = &h30
|
|---|
| 235 | D1 = &h31
|
|---|
| 236 | D2 = &h32
|
|---|
| 237 | D3 = &h33
|
|---|
| 238 | D4 = &h34
|
|---|
| 239 | D5 = &h35
|
|---|
| 240 | D6 = &h36
|
|---|
| 241 | D7 = &h37
|
|---|
| 242 | D8 = &h38
|
|---|
| 243 | D9 = &h39
|
|---|
| 244 | A = &h41
|
|---|
| 245 | B = &h42
|
|---|
| 246 | C = &h43
|
|---|
| 247 | D = &h44
|
|---|
| 248 | E = &h45
|
|---|
| 249 | F = &h46
|
|---|
| 250 | G = &h47
|
|---|
| 251 | H = &h48
|
|---|
| 252 | I = &h49
|
|---|
| 253 | J = &h4a
|
|---|
| 254 | K = &h4b
|
|---|
| 255 | L = &h4c
|
|---|
| 256 | M = &h4d
|
|---|
| 257 | N = &h4e
|
|---|
| 258 | O = &h4f
|
|---|
| 259 | P = &h50
|
|---|
| 260 | Q = &h51
|
|---|
| 261 | R = &h52
|
|---|
| 262 | S = &h53
|
|---|
| 263 | T = &h54
|
|---|
| 264 | U = &h55
|
|---|
| 265 | V = &h56
|
|---|
| 266 | W = &h57
|
|---|
| 267 | X = &h58
|
|---|
| 268 | Y = &h59
|
|---|
| 269 | Z = &h5A
|
|---|
| 270 | LWin = VK_LWIN
|
|---|
| 271 | RWin = VK_RWIN
|
|---|
| 272 | Apps = VK_APPS
|
|---|
| 273 | Sleep = VK_SLEEP
|
|---|
| 274 | NumPad0 = VK_NUMPAD0
|
|---|
| 275 | NumPad1 = VK_NUMPAD1
|
|---|
| 276 | NumPad2 = VK_NUMPAD2
|
|---|
| 277 | NumPad3 = VK_NUMPAD3
|
|---|
| 278 | NumPad4 = VK_NUMPAD4
|
|---|
| 279 | NumPad5 = VK_NUMPAD5
|
|---|
| 280 | NumPad6 = VK_NUMPAD6
|
|---|
| 281 | NumPad7 = VK_NUMPAD7
|
|---|
| 282 | NumPad8 = VK_NUMPAD8
|
|---|
| 283 | NumPad9 = VK_NUMPAD9
|
|---|
| 284 | Multiply = VK_MULTIPLY
|
|---|
| 285 | Add = VK_ADD
|
|---|
| 286 | Separator = VK_SEPARATOR
|
|---|
| 287 | Substract = VK_SUBTRACT
|
|---|
| 288 | Decimal = VK_DECIMAL
|
|---|
| 289 | Divide = VK_DIVIDE
|
|---|
| 290 | F1 = VK_F1
|
|---|
| 291 | F2 = VK_F2
|
|---|
| 292 | F3 = VK_F3
|
|---|
| 293 | F4 = VK_F4
|
|---|
| 294 | F5 = VK_F5
|
|---|
| 295 | F6 = VK_F6
|
|---|
| 296 | F7 = VK_F7
|
|---|
| 297 | F8 = VK_F8
|
|---|
| 298 | F9 = VK_F9
|
|---|
| 299 | F10 = VK_F10
|
|---|
| 300 | F11 = VK_F11
|
|---|
| 301 | F12 = VK_F12
|
|---|
| 302 | F13 = VK_F13
|
|---|
| 303 | F14 = VK_F14
|
|---|
| 304 | F15 = VK_F15
|
|---|
| 305 | F16 = VK_F16
|
|---|
| 306 | F17 = VK_F17
|
|---|
| 307 | F18 = VK_F18
|
|---|
| 308 | F19 = VK_F19
|
|---|
| 309 | F20 = VK_F20
|
|---|
| 310 | F21 = VK_F21
|
|---|
| 311 | F22 = VK_F22
|
|---|
| 312 | F23 = VK_F23
|
|---|
| 313 | F24 = VK_F24
|
|---|
| 314 | NumLock = VK_NUMLOCK
|
|---|
| 315 | Scroll = VK_SCROLL
|
|---|
| 316 | LShiftKey = VK_LSHIFT
|
|---|
| 317 | RShiftKey = VK_RSHIFT
|
|---|
| 318 | LControlKey = VK_LCONTROL
|
|---|
| 319 | RControlKey = VK_RCONTROL
|
|---|
| 320 | LMenu = VK_LMENU
|
|---|
| 321 | RMenu = VK_RMENU
|
|---|
| 322 | BrowserBack = VK_BROWSER_BACK
|
|---|
| 323 | BrowserForward = VK_BROWSER_FORWARD
|
|---|
| 324 | BrowserRefresh = VK_BROWSER_REFRESH
|
|---|
| 325 | BrowserStop = VK_BROWSER_STOP
|
|---|
| 326 | BrowserSearch = VK_BROWSER_SEARCH
|
|---|
| 327 | BrowserFavorites = VK_BROWSER_FAVORITES
|
|---|
| 328 | BrowserHome = VK_BROWSER_HOME
|
|---|
| 329 | VolumeMute = VK_VOLUME_MUTE
|
|---|
| 330 | VolumeDown = VK_VOLUME_DOWN
|
|---|
| 331 | VolumeUp = VK_VOLUME_UP
|
|---|
| 332 | MediaNextTrack = VK_MEDIA_NEXT_TRACK
|
|---|
| 333 | MediaPreviousTrack = VK_MEDIA_PREV_TRACK
|
|---|
| 334 | MediaStop = VK_MEDIA_STOP
|
|---|
| 335 | MediaPlayPause = VK_MEDIA_PLAY_PAUSE
|
|---|
| 336 | LaunchMail = VK_LAUNCH_MAIL
|
|---|
| 337 | SelectMedia = VK_LAUNCH_MEDIA_SELECT
|
|---|
| 338 | LaunchApplication1 = VK_LAUNCH_APP1
|
|---|
| 339 | LaunchApplication2 = VK_LAUNCH_APP2
|
|---|
| 340 | Oem1 = VK_OEM_1
|
|---|
| 341 | Oemplus = VK_OEM_PLUS
|
|---|
| 342 | Oemcomma = VK_OEM_COMMA
|
|---|
| 343 | OemMinus = VK_OEM_MINUS
|
|---|
| 344 | OemPeriod = VK_OEM_PERIOD
|
|---|
| 345 | Oem2 = VK_OEM_2
|
|---|
| 346 | OemQuestion = VK_OEM_2
|
|---|
| 347 | Oem3 = VK_OEM_3
|
|---|
| 348 | Oemtilde = VK_OEM_3
|
|---|
| 349 | Oem4 = VK_OEM_4
|
|---|
| 350 | OemOpenBrackets = VK_OEM_4
|
|---|
| 351 | Oem5 = VK_OEM_5
|
|---|
| 352 | OemPipe = VK_OEM_5
|
|---|
| 353 | Oem6 = VK_OEM_6
|
|---|
| 354 | OemCloseBrackets = VK_OEM_6
|
|---|
| 355 | Oem7 = VK_OEM_7
|
|---|
| 356 | OemQuotes = VK_OEM_7
|
|---|
| 357 | Oem8 = VK_OEM_8
|
|---|
| 358 | Oem102 = VK_OEM_102
|
|---|
| 359 | OemBackslash = VK_OEM_102
|
|---|
| 360 | ProcessKey = VK_PROCESSKEY
|
|---|
| 361 | Packet = VK_PACKET
|
|---|
| 362 | Attn = VK_ATTN
|
|---|
| 363 | Crsel = VK_CRSEL
|
|---|
| 364 | Exsel = VK_EXSEL
|
|---|
| 365 | EraseEof = VK_EREOF
|
|---|
| 366 | Play = VK_PLAY
|
|---|
| 367 | NoName = VK_NONAME
|
|---|
| 368 | Zoom = VK_ZOOM
|
|---|
| 369 | Pa1 = VK_PA1
|
|---|
| 370 | OemClear = VK_OEM_CLEAR
|
|---|
| 371 |
|
|---|
| 372 | KeyCode = &hffff
|
|---|
| 373 |
|
|---|
| 374 | Shift = &h10000
|
|---|
| 375 | Control = &h20000
|
|---|
| 376 | Alt = &h40000
|
|---|
| 377 |
|
|---|
| 378 | Modifiers = &hffff
|
|---|
| 379 | End Enum
|
|---|
| 380 |
|
|---|
| 381 | Class KeyArgs
|
|---|
| 382 | Inherits Args
|
|---|
| 383 | Public
|
|---|
| 384 | Sub KeyArgs(keyData As Keys)
|
|---|
| 385 | key = keyData
|
|---|
| 386 | End Sub
|
|---|
| 387 |
|
|---|
| 388 | Const Function Alt() As Boolean
|
|---|
| 389 | Alt = key And Keys.Menu
|
|---|
| 390 | End Function
|
|---|
| 391 |
|
|---|
| 392 | Const Function Control() As Boolean
|
|---|
| 393 | Control = key And Keys.Control
|
|---|
| 394 | End Function
|
|---|
| 395 |
|
|---|
| 396 | Const Function Shift() As Boolean
|
|---|
| 397 | Shift = key And Keys.Shift
|
|---|
| 398 | End Function
|
|---|
| 399 |
|
|---|
| 400 | Const Function KeyCode() As Keys
|
|---|
| 401 | Dim k = key As DWord
|
|---|
| 402 | Dim mask = Keys.KeyCode As DWord
|
|---|
| 403 | KeyCode = (k And mask) As Keys
|
|---|
| 404 | End Function
|
|---|
| 405 |
|
|---|
| 406 | Const Function KeyData() As Keys
|
|---|
| 407 | KeyData = key
|
|---|
| 408 | End Function
|
|---|
| 409 |
|
|---|
| 410 | Const Function Modifiers() As Keys
|
|---|
| 411 | Dim k = key As DWord
|
|---|
| 412 | Dim mask = Keys.Modifiers As DWord
|
|---|
| 413 | Modifiers = (k And mask) As Keys
|
|---|
| 414 | End Function
|
|---|
| 415 |
|
|---|
| 416 | Const Function KeyValue() As Long
|
|---|
| 417 | KeyValue = key As Long
|
|---|
| 418 | End Function
|
|---|
| 419 |
|
|---|
| 420 | Sub Handled(handled As Boolean)
|
|---|
| 421 | h = handled
|
|---|
| 422 | End Sub
|
|---|
| 423 |
|
|---|
| 424 | Const Function Handled() As Boolean
|
|---|
| 425 | Handled = h
|
|---|
| 426 | End Function
|
|---|
| 427 |
|
|---|
| 428 | Private
|
|---|
| 429 | key As Keys
|
|---|
| 430 | h As Boolean
|
|---|
| 431 | End Class
|
|---|
| 432 |
|
|---|
| 433 | Delegate Sub KeyHandler(sender As Object, e As KeyArgs)
|
|---|
| 434 |
|
|---|
| 435 | Class CreateArgs
|
|---|
| 436 | Inherits Args
|
|---|
| 437 | Public
|
|---|
| 438 | Sub CreateArgs(pCreateStruct As *CREATESTRUCT)
|
|---|
| 439 | pcs = pCreateStruct
|
|---|
| 440 | End Sub
|
|---|
| 441 |
|
|---|
| 442 | Const Function HInstance() As HINSTANCE
|
|---|
| 443 | HInstance = pcs->hInstance
|
|---|
| 444 | End Function
|
|---|
| 445 |
|
|---|
| 446 | 'Menu: pcs->hMenu
|
|---|
| 447 |
|
|---|
| 448 | ' Const Function Parent() As Control
|
|---|
| 449 | ' Parent = Control.FromHandle(pcs->hwndParent)
|
|---|
| 450 | ' End Function
|
|---|
| 451 |
|
|---|
| 452 | Const Function Height() As Long
|
|---|
| 453 | Height = pcs->cy
|
|---|
| 454 | End Function
|
|---|
| 455 |
|
|---|
| 456 | Const Function Width() As Long
|
|---|
| 457 | Width = pcs->cx
|
|---|
| 458 | End Function
|
|---|
| 459 |
|
|---|
| 460 | Const Function Y() As Long
|
|---|
| 461 | Y = pcs->cy
|
|---|
| 462 | End Function
|
|---|
| 463 |
|
|---|
| 464 | Const Function X() As Long
|
|---|
| 465 | X = pcs->cx
|
|---|
| 466 | End Function
|
|---|
| 467 |
|
|---|
| 468 | Const Function Style() As DWord
|
|---|
| 469 | Style = pcs->style As DWord
|
|---|
| 470 | End Function
|
|---|
| 471 |
|
|---|
| 472 | Const Function Caption() As String
|
|---|
| 473 | Caption = New String(pcs->lpszName)
|
|---|
| 474 | End Function
|
|---|
| 475 |
|
|---|
| 476 | Const Function ClassName() As String
|
|---|
| 477 | ClassName = New String(pcs->lpszClass)
|
|---|
| 478 | End Function
|
|---|
| 479 |
|
|---|
| 480 | Const Function ExStyle() As DWord
|
|---|
| 481 | ExStyle = pcs->dwExStyle
|
|---|
| 482 | End Function
|
|---|
| 483 |
|
|---|
| 484 | Const Function CreateStruct() As *CREATESTRUCT
|
|---|
| 485 | CreateStruct = pcs
|
|---|
| 486 | End Function
|
|---|
| 487 | Private
|
|---|
| 488 | pcs As *CREATESTRUCT
|
|---|
| 489 | End Class
|
|---|
| 490 |
|
|---|
| 491 | Delegate Sub CreateHandler(sender As Object, e As CreateArgs)
|
|---|
| 492 |
|
|---|
| 493 | Class FormClosingArgs
|
|---|
| 494 | Inherits Args
|
|---|
| 495 | Public
|
|---|
| 496 | Sub FormClosingArgs()
|
|---|
| 497 | c = False
|
|---|
| 498 | End Sub
|
|---|
| 499 |
|
|---|
| 500 | Const Function Cancel() As Boolean
|
|---|
| 501 | Cancel = c
|
|---|
| 502 | End Function
|
|---|
| 503 |
|
|---|
| 504 | Sub Cancel(cancel As Boolean)
|
|---|
| 505 | c = cancel
|
|---|
| 506 | End Sub
|
|---|
| 507 | Private
|
|---|
| 508 | c As Boolean
|
|---|
| 509 | End Class
|
|---|
| 510 |
|
|---|
| 511 | Delegate Sub FormClosingHandler(sender As Object, e As FormClosingArgs)
|
|---|
| 512 |
|
|---|
| 513 | Class ResizeArgs
|
|---|
| 514 | Inherits Args
|
|---|
| 515 | Public
|
|---|
| 516 | Sub ResizeArgs(resizeType As Long, X As Long, Y As Long)
|
|---|
| 517 | rt = resizeType
|
|---|
| 518 | x = X
|
|---|
| 519 | y = Y
|
|---|
| 520 | End Sub
|
|---|
| 521 |
|
|---|
| 522 | Sub ResizeArgs(wp As WPARAM, lp As LPARAM)
|
|---|
| 523 | rt = wp As Long
|
|---|
| 524 | x = GET_X_LPARAM(lp)
|
|---|
| 525 | y = GET_Y_LPARAM(lp)
|
|---|
| 526 | End Sub
|
|---|
| 527 |
|
|---|
| 528 | Function ResizeType() As Long
|
|---|
| 529 | ResizeType = rt
|
|---|
| 530 | End Function
|
|---|
| 531 |
|
|---|
| 532 | Function X() As Long
|
|---|
| 533 | X = x
|
|---|
| 534 | End Function
|
|---|
| 535 |
|
|---|
| 536 | Function Y() As Long
|
|---|
| 537 | Y = y
|
|---|
| 538 | End Function
|
|---|
| 539 | Private
|
|---|
| 540 | rt As Long
|
|---|
| 541 | x As Long
|
|---|
| 542 | y As Long
|
|---|
| 543 | End Class
|
|---|
| 544 |
|
|---|
| 545 | Delegate Sub ResizeHandler(sender As Object, e As ResizeArgs)
|
|---|
| 546 |
|
|---|
| 547 | Class PaintBackgroundArgs
|
|---|
| 548 | Inherits Args
|
|---|
| 549 | Public
|
|---|
| 550 | Sub PaintBackgroundArgs(hdc As HDC)
|
|---|
| 551 | This.hdc = hdc
|
|---|
| 552 | End Sub
|
|---|
| 553 |
|
|---|
| 554 | Sub PaintBackgroundArgs(wp As WPARAM, lp As LPARAM)
|
|---|
| 555 | This.hdc = wp As HDC
|
|---|
| 556 | End Sub
|
|---|
| 557 |
|
|---|
| 558 | Const Function Handle() As HDC
|
|---|
| 559 | Handle = hdc
|
|---|
| 560 | End Function
|
|---|
| 561 | Private
|
|---|
| 562 | hdc As HDC
|
|---|
| 563 | End Class
|
|---|
| 564 |
|
|---|
| 565 | Delegate Sub PaintBackgroundHandler(sender As Object, e As PaintBackgroundArgs)
|
|---|
| 566 |
|
|---|
| 567 | End Namespace 'UI
|
|---|
| 568 | End Namespace 'Widnows
|
|---|
| 569 | End Namespace 'ActiveBasic
|
|---|