1{ $Id: lmessages.pp 58686 2018-08-08 17:40:19Z jesus $ } 2{ 3 /*************************************************************************** 4 lMessages.pp 5 ------------ 6 7 Initial Revision : Wed Jun 30 CST 1999 8 Shane Miller 9 10 ***************************************************************************/ 11 12 ***************************************************************************** 13 This file is part of the Lazarus Component Library (LCL) 14 15 See the file COPYING.modifiedLGPL.txt, included in this distribution, 16 for details about the license. 17 ***************************************************************************** 18} 19 20unit LMessages; 21 22{$mode objfpc}{$H+} 23 24interface 25 26uses 27 Classes, SysUtils, Types, 28 // LCL 29 LCLType, GraphType 30 {$ifdef WINDOWS} 31 ,messages 32 {$endif WINDOWS} 33 ; 34 35const 36 // TODO: review this list of messages and remove obsoleted/uneeded, move 37 // internal gtk things (like LM_CONFIGUREEVENT) directly to gtk interface code 38 39 //------------- 40 // lcl messages 41 // 42 // This should be a list of LCL specific messages 43 // RECEIVED from the interface, here are no defines 44 // of messages send to the interface 45 //------------- 46 LM_USER = $400; // standard WM_USER value 47 WM_USER = LM_USER; 48 49 // reserve some space for LM_USER messages 50 LM_LCL = LM_USER + $10000; 51 52 LM_ACTIVATEITEM = LM_LCL + 04; // GTK internal. Should be removed later 53 LM_CHANGED = LM_LCL + 05; 54 LM_FOCUS = LM_LCL + 06; 55 LM_CLICKED = LM_LCL + 07; 56 LM_RELEASED = LM_LCL + 09; 57 LM_ENTER = LM_LCL + 11; 58 LM_LEAVE = LM_LCL + 12; 59 LM_CHECKRESIZE = LM_LCL + 14; 60 LM_SETEDITABLE = LM_LCL + 18; 61 LM_MOVEWORD = LM_LCL + 19; 62 LM_MOVEPAGE = LM_LCL + 20; 63 LM_MOVETOROW = LM_LCL + 21; 64 LM_MOVETOCOLUMN = LM_LCL + 22; 65 LM_KILLCHAR = LM_LCL + 23; 66 LM_KILLWORD = LM_LCL + 24; 67 LM_KILLLINE = LM_LCL + 25; 68 LM_CONFIGUREEVENT = LM_LCL + 31; // GTK internal. Should be removed later. 69 LM_EXIT = LM_LCL + 60; 70 LM_CLOSEQUERY = LM_LCL + 62; 71 LM_DRAGSTART = LM_LCL + 63; 72 LM_QUIT = LM_LCL + 65; 73 LM_MONTHCHANGED = LM_LCL + 66; 74 LM_YEARCHANGED = LM_LCL + 67; 75 LM_DAYCHANGED = LM_LCL + 68; 76 77 LM_MOUSEFIRST2 = LM_LCL + 70; 78 LM_LBUTTONTRIPLECLK = LM_MOUSEFIRST2 + 0; 79 LM_LBUTTONQUADCLK = LM_MOUSEFIRST2 + 1; 80 LM_MBUTTONTRIPLECLK = LM_MOUSEFIRST2 + 2; 81 LM_MBUTTONQUADCLK = LM_MOUSEFIRST2 + 3; 82 LM_RBUTTONTRIPLECLK = LM_MOUSEFIRST2 + 4; 83 LM_RBUTTONQUADCLK = LM_MOUSEFIRST2 + 5; 84 LM_MOUSEENTER = LM_MOUSEFIRST2 + 6; 85 LM_MOUSELEAVE = LM_MOUSEFIRST2 + 7; 86 LM_XBUTTONTRIPLECLK = LM_MOUSEFIRST2 + 8; 87 LM_XBUTTONQUADCLK = LM_MOUSEFIRST2 + 9; 88 LM_MOUSELAST2 = LM_XBUTTONQUADCLK; 89 // for triple and quad clicks see below 90 91 LM_GRABFOCUS = LM_LCL + 80; 92 LM_DRAWLISTITEM = LM_LCL + 81; 93 LM_DEFERREDEDIT = LM_LCL + 82; // used in customdbcombobox 94 95 // these IDs are reserved for internal messages in the interfaces 96 LM_INTERFACEFIRST = LM_LCL + 99; 97 LM_INTERFACELAST = LM_LCL + 199; 98 99 LM_UNKNOWN = LM_INTERFACELAST + 1; 100 101 //------------- 102 //end of messages that are sent to the interface 103 //------------- 104 105 106 //------------- 107 // Windows Compatability} 108 //------------- 109 { System Menu Commands } 110 SC_SIZE = 61440; 111 SC_MOVE = 61456; 112 SC_MINIMIZE = 61472; 113 SC_MAXIMIZE = 61488; 114 SC_NEXTWINDOW = 61504; 115 SC_PREVWINDOW = 61520; 116 SC_CLOSE = 61536; 117 SC_VSCROLL = 61552; 118 SC_HSCROLL = 61568; 119 SC_MOUSEMENU = 61584; 120 SC_KEYMENU = 61696; 121 SC_ARRANGE = 61712; 122 SC_RESTORE = 61728; 123 SC_TASKLIST = 61744; 124 SC_SCREENSAVE = 61760; 125 SC_HOTKEY = 61776; 126 SC_DEFAULT = 61792; 127 SC_MONITORPOWER = 61808; 128 SC_CONTEXTHELP = 61824; 129 SC_SEPARATOR = 61455; 130 131 132 //------------- 133 // Messages 134 //------------- 135 136 LM_NULL = $0000; 137 LM_CREATE = $0001; 138 LM_DESTROY = $0002; 139 LM_MOVE = $0003; 140 141 LM_SIZE = $0005; 142 LM_ACTIVATE = $0006; 143 LM_SETFOCUS = $0007; 144 LM_KILLFOCUS = $0008; 145 LM_ENABLE = $000A; 146 LM_GETTEXTLENGTH = $000E; 147 LM_PAINT = $000F; 148 LM_ERASEBKGND = $0014; 149 150 LM_SHOWWINDOW = $0018; 151 152 LM_CANCELMODE = $001F; 153 LM_SETCURSOR = $0020; 154 LM_DRAWITEM = $002B; 155 LM_MEASUREITEM = $002C; 156 LM_DELETEITEM = $002D; 157 LM_VKEYTOITEM = $002E; 158 LM_CHARTOITEM = $002F; 159 LM_SETFONT = $0030; 160 161 LM_COMPAREITEM = $0039; 162 LM_WINDOWPOSCHANGING = $0046; 163 LM_WINDOWPOSCHANGED = $0047; 164 LM_NOTIFY = $004E; 165 LM_HELP = $0053; 166 LM_NOTIFYFORMAT = $0055; 167 LM_CONTEXTMENU = $007B; 168 169 LM_NCCALCSIZE = $0083; 170 LM_NCHITTEST = $0084; 171 LM_NCPAINT = $0085; 172 LM_NCACTIVATE = $0086; 173 LM_GETDLGCODE = $0087; 174 LM_NCMOUSEMOVE = $00A0; 175 LM_NCLBUTTONDOWN = $00A1; 176 LM_NCLBUTTONUP = $00A2; 177 LM_NCLBUTTONDBLCLK = $00A3; 178 179 LM_KEYFIRST = $0100; 180 LM_KEYDOWN = $0100; 181 LM_KEYUP = $0101; 182 LM_CHAR = $0102; 183 184 LM_SYSKEYDOWN = $0104; 185 LM_SYSKEYUP = $0105; 186 LM_SYSCHAR = $0106; 187 188 LM_KEYLAST = $0108; 189 190 LM_COMMAND = $0111; 191 LM_SYSCOMMAND = $0112; 192 LM_TIMER = $0113; 193 LM_HSCROLL = $0114; 194 LM_VSCROLL = $0115; 195 LM_CTLCOLORMSGBOX = $0132; 196 LM_CTLCOLOREDIT = $0133; 197 LM_CTLCOLORLISTBOX = $0134; 198 LM_CTLCOLORBTN = $0135; 199 LM_CTLCOLORDLG = $0136; 200 LM_CTLCOLORSCROLLBAR = $0137; 201 LM_CTLCOLORSTATIC = $0138; 202 203 LM_MOUSEFIRST = $0200; 204 LM_MOUSEMOVE = $0200; 205 LM_LBUTTONDOWN = $0201; 206 LM_LBUTTONUP = $0202; 207 LM_LBUTTONDBLCLK = $0203; 208 LM_RBUTTONDOWN = $0204; 209 LM_RBUTTONUP = $0205; 210 LM_RBUTTONDBLCLK = $0206; 211 LM_MBUTTONDOWN = $0207; 212 LM_MBUTTONUP = $0208; 213 LM_MBUTTONDBLCLK = $0209; 214 LM_MOUSEWHEEL = $020A; 215 LM_XBUTTONDOWN = $020B; 216 LM_XBUTTONUP = $020C; 217 LM_XBUTTONDBLCLK = $020D; 218 LM_MOUSEHWHEEL = $020E; 219 LM_MOUSELAST = $020E; 220 221 LM_PARENTNOTIFY = $0210; 222 LM_CAPTURECHANGED = $0215; 223 LM_DROPFILES = $0233; 224 225 LM_SELCHANGE = $0234; 226 LM_DPICHANGED = $02E0; 227 LM_CUT = $0300; 228 LM_COPY = $0301; 229 LM_PASTE = $0302; 230 LM_CLEAR = $0303; 231 232{$I controlconsts.inc} 233 234 //------------- 235 // End of Windows Compatability and messages 236 //------------- 237 238type 239 { LCL Messages } 240 241 TLMDrawItems = record 242 Msg: Cardinal; 243{$ifdef cpu64} 244 UnusedMsg: Cardinal; 245{$endif} 246 Ctl: HWND; 247 DrawItemStruct: PDrawItemStruct; 248 Result: LRESULT; 249 end; 250 251 TLMDrawListItem = record 252 // message from the interface to the LCL 253 Msg: Cardinal; 254{$ifdef cpu64} 255 UnusedMsg: Cardinal; 256{$endif} 257 Unused: PtrInt; 258 DrawListItemStruct : PDrawListItemStruct; 259 Result: LRESULT; 260 end; 261 262 TLMMeasureItem = record 263 // message from the interface to the LCL 264 Msg: Cardinal; 265{$ifdef cpu64} 266 UnusedMsg: Cardinal; 267{$endif} 268 idCtl: PtrUint; 269 MeasureItemStruct: PMeasureItemStruct; 270 Result: LRESULT; 271 end; 272 273{$ifndef WINDOWS} 274 TLMNoParams = record 275 Msg: Cardinal; 276{$ifdef cpu64} 277 UnusedMsg: Cardinal; 278{$endif} 279 Unused: array[0..1] of PtrInt; 280 Result: LRESULT; 281 end; 282{$else} 283 TLMNoParams = TWMNoParams; 284{$endif} 285 286 TLMEraseBkgnd = record 287 Msg: Cardinal; 288{$ifdef cpu64} 289 UnusedMsg: Cardinal; 290{$endif} 291 DC: HDC; 292 Unused: PtrInt; 293 Result: LRESULT; 294 end; 295 296 TLMGetText = record 297 Msg: Cardinal; 298{$ifdef cpu64} 299 UnusedMsg: Cardinal; 300{$endif} 301 TextMax: PtrInt; 302 Text: PChar; 303 Result: LRESULT; 304 end; 305 306 TLMGetTextLength = TLMNoParams; 307 308 TLMKey = record 309 Msg: Cardinal; 310{$ifdef cpu64} 311 UnusedMsg: Cardinal; 312{$endif} 313{$IFDEF FPC_LITTLE_ENDIAN} 314 CharCode: Word; // VK_XXX constants as TLMKeyDown/Up, ascii if TLMChar 315 Unused: Word; 316{$ELSE} 317 Unused: Word; 318 CharCode: Word; // VK_XXX constants as TLMKeyDown/Up, ascii if TLMChar 319{$ENDIF} 320{$ifdef cpu64} 321 Unused2 : Longint; 322{$endif cpu64} 323 KeyData: PtrInt; 324 Result: LRESULT; 325 end; 326 327 TLMChar = TLMKey; 328 TLMKeyDown = TLMKey; 329 TLMKeyUp = TLMKey; 330 TLMSysChar = TLMKey; 331 TLMSysKeyDown = TLMKey; 332 TLMSysKeyUp = TLMKey; 333 TCMWantSpecialKey = TLMKey; 334 335 TLMGetDlgCode = record 336 Msg: Cardinal; 337{$ifdef cpu64} 338 UnusedMsg: Cardinal; 339{$endif} 340{$IFDEF FPC_LITTLE_ENDIAN} 341 CharCode: Word; // VK_XXX constants 342 Unused: Word; 343{$ELSE} 344 Unused: Word; 345 CharCode: Word; // VK_XXX constants 346{$ENDIF} 347 UnusedL: LPARAM; 348 Result: LRESULT; 349 end; 350 351 352 TLMCut = TLMNoParams; 353 TLMCopy = TLMNoParams; 354 TLMPaste = TLMNoParams; 355 356 TLMSetCursor = record 357 Msg: Cardinal; 358{$ifdef cpu64} 359 UnusedMsg: Cardinal; 360{$endif} 361 CursorWnd: HWND; 362 case Boolean of 363 False: ( 364 HitTest: SmallInt; 365 MouseMsg: Word; 366 ); 367 True: ( 368 Dummy: LPARAM; 369 Result: LRESULT; 370 ); 371 end; 372 373 TLMMouse = record 374 Msg : Cardinal; 375 Keys: PtrInt; 376 case Integer of 377 0: ( 378 XPos: SmallInt; 379 YPos: SmallInt); 380 1: ( 381 Pos : TSmallPoint); 382 2: ( 383 Dummy: LPARAM; // needed for64 bit alignment 384 Result: LRESULT); 385 end; 386 387 TLMMouseMove = TLMMouse; 388 389 TLMMove = record 390 Msg: Cardinal; 391{$ifdef cpu64} 392 UnusedMsg: Cardinal; 393{$endif} 394 MoveType: PtrInt; // 0 = update, 1 = force RequestAlign, 395 // 128 = Source is Interface (Widget has moved) 396 case Integer of 397 0: ( 398 XPos: Smallint; 399 YPos: Smallint); 400 1: ( 401 Pos : TSmallPoint); 402 2: ( 403 Dummy: LPARAM; // needed for64 bit alignment 404 Result: LRESULT); 405 end; 406 407// Active state 408const 409 WA_INACTIVE = 0; 410 WA_ACTIVE = 1; 411 WA_CLICKACTIVE = 2; 412 413type 414 TLMActivate = record 415 Msg: Cardinal; 416{$ifdef cpu64} 417 UnusedMsg: Cardinal; 418{$endif} 419{$IFDEF FPC_LITTLE_ENDIAN} 420 Active: Word; 421 Minimized: WordBool; 422{$ELSE} 423 Minimized: WordBool; 424 Active: Word; 425{$ENDIF} 426{$ifdef cpu64} 427 Unused : Longint; 428{$endif cpu64} 429 ActiveWindow: HWND; 430 Result: LRESULT; 431 end; 432 433 TLMNCActivate = record 434 Msg: Cardinal; 435{$ifdef cpu64} 436 UnusedMsg: Cardinal; 437{$endif} 438 Active: LongBool; 439{$ifdef cpu64} 440 Unused2 : Longint; 441{$endif cpu64} 442 Unused: LPARAM; 443 Result: LRESULT; 444 end; 445 446 TLMNotify = record 447 Msg: Cardinal; 448{$ifdef cpu64} 449 UnusedMsg: Cardinal; 450{$endif} 451 IDCtrl: PtrInt; 452 NMHdr: PNMHdr; 453 Result: LRESULT; 454 end; 455 456 TLMNotifyFormat = record 457 Msg: Cardinal; 458{$ifdef cpu64} 459 UnusedMsg: Cardinal; 460{$endif} 461 From: HWND; 462 Command: LPARAM; 463 Result: LRESULT; 464 end; 465 466 TLMPaint = record 467 Msg: Cardinal; 468{$ifdef cpu64} 469 UnusedMsg: Cardinal; 470{$endif} 471 DC: HDC; 472 PaintStruct: PPaintStruct; 473 Result: LRESULT; 474 end; 475 476 PWindowPos = ^TWindowPos; 477 tagWINDOWPOS = record 478 hwnd: THANDLE; //hwnd: hwnd doesnt compile on the next line 479 hwndInsertAfter: THANDLE; 480 x: Integer; 481 y: Integer; 482 cx: Integer; 483 cy: Integer; 484 flags: Cardinal; 485 end; 486 TWindowPos = tagWINDOWPOS; 487 WINDOWPOS = tagWINDOWPOS; 488 489 TLMWindowPosMsg = record 490 Msg: Cardinal; 491{$ifdef cpu64} 492 UnusedMsg: Cardinal; 493{$endif} 494 Unused: WPARAM; 495 WindowPos: PWindowPos; 496 Result: LPARAM; 497 end; 498 499 TLMWindowPosChanged = TLMWindowPosMsg; 500 TLMWindowPosChanging = TLMWindowPosMsg; 501 502 {PNCCalcSizeParams} 503 PNCCalcSizeParams = ^TNCCalcSizeParams; 504 tagNCCalcSize_Params = record 505 rgrc: array[0..2] of TRect; 506 lpPos: PWindowPos; 507 end; 508 TNCCalcSizeParams = tagNCCalcSize_Params; 509 ncCalcSizeParams = tagNCCalcSize_Params; 510 511 512 TLMNCCalcSize = record 513 Msg: Cardinal; 514{$ifdef cpu64} 515 UnusedMsg: Cardinal; 516{$endif} 517 CalcValidRects: LongBool; 518{$ifdef cpu64} 519 Unused : Longint; 520{$endif cpu64} 521 CalcSize_Params: PNCCalcSizeParams; 522 Result: LResult; 523 end; 524 525 TLMSysColorChange = TLMNoParams; 526 527 TLMSysCommand = record 528 Msg: Cardinal; 529{$ifdef cpu64} 530 UnusedMsg: Cardinal; 531{$endif} 532 case CmdType: PtrInt of 533 SC_HOTKEY: ( 534 ActivateWnd: HWND; 535 Result: LRESULT); 536 SC_KEYMENU: ( 537{$IFDEF FPC_LITTLE_ENDIAN} 538 Key: Word); 539{$ELSE} 540 Unused: Word; 541 Key: Word); 542{$ENDIF} 543 SC_CLOSE, SC_HSCROLL, SC_MAXIMIZE, SC_MINIMIZE, SC_MOUSEMENU, SC_MOVE, 544 SC_NEXTWINDOW, SC_PREVWINDOW, SC_RESTORE, SC_SCREENSAVE, SC_SIZE, 545 SC_TASKLIST, SC_VSCROLL: ( 546 XPos: Smallint; 547 YPos: Smallint); 548 end; 549 550 TLMSysDeadChar = record 551 Msg: Cardinal; 552{$ifdef cpu64} 553 UnusedMsg: Cardinal; 554{$endif} 555{$IFDEF FPC_LITTLE_ENDIAN} 556 CharCode: Word; 557 Unused: Word; 558{$ELSE} 559 Unused: Word; 560 CharCode: Word; 561{$ENDIF} 562{$ifdef cpu64} 563 Unused2 : Longint; 564{$endif cpu64} 565 KeyData: LPARAM; 566 Result: LRESULT; 567 end; 568 569 570 TLMSystemError = record 571 Msg: Cardinal; 572{$ifdef cpu64} 573 UnusedMsg: Cardinal; 574{$endif} 575{$IFDEF FPC_LITTLE_ENDIAN} 576 ErrSpec: Word; 577 Unused1 : Word; 578{$ELSE} 579 Unused1 : Word; 580 ErrSpec: Word; 581{$ENDIF} 582{$ifdef cpu64} 583 Unused2 : Longint; 584{$endif cpu64} 585 Unused: LPARAM; 586 Result: LRESULT; 587 end; 588 589 TLMTimeChange = TLMNoParams; 590 591// todo: remove TLMSetText 592 TLMSetText = record 593 Msg: Cardinal; 594{$ifdef cpu64} 595 UnusedMsg: Cardinal; 596{$endif} 597 Unused: WPARAM; 598 Text: PChar; 599 Result: LRESULT; 600 end; 601 602 // A little similar to TCMMouseWheel from Delphi, 603 // so be very careful when changing because some 604 // ported components depend on that 605 PLMMouseEvent = ^TLMMouseEvent; 606 TLMMouseEvent = record 607 Msg: Cardinal; 608{$ifdef cpu64} 609 UnusedMsg: Cardinal; 610{$endif} 611{$IFDEF FPC_LITTLE_ENDIAN} 612 Button: Word; // 1=left, 2=right, 3=middle 613 WheelDelta: SmallInt; // -1 for up, 1 for down 614{$ELSE} 615 WheelDelta: SmallInt; // -1 for up, 1 for down 616 Button: Word; // 1=left, 2=right, 3=middle 617{$ENDIF} 618{$ifdef cpu64} 619 Unused1 : Longint; 620{$endif cpu64} 621 X: Smallint; // under gtk this is longint 622 Y: Smallint; // ditto 623{$ifdef cpu64} 624 Unused2 : Longint; 625{$endif cpu64} 626 Result: LRESULT; // to fit std message size 627 UserData: pointer; // used under gtk 628 State: TShiftState; // in win is the equivalent of button 629 end; 630 631 TLMLButtonDown = TLMMouse; 632 TLMRButtonDown = TLMMouse; 633 TLMMButtonDown = TLMMouse; 634 TLMXButtonDown = TLMMouse; 635 TLMLButtonDblClk = TLMMouse; 636 TLMRButtonDblClk = TLMMouse; 637 TLMMButtonDblClk = TLMMouse; 638 TLMXButtonDblClk = TLMMouse; 639 TLMLButtonTripleClk = TLMMouse; 640 TLMRButtonTripleClk = TLMMouse; 641 TLMMButtonTripleClk = TLMMouse; 642 TLMXButtonTripleClk = TLMMouse; 643 TLMLButtonQuadClk = TLMMouse; 644 TLMRButtonQuadClk = TLMMouse; 645 TLMMButtonQuadClk = TLMMouse; 646 TLMXButtonQuadClk = TLMMouse; 647 TLMLButtonUp = TLMMouse; 648 TLMRButtonUp = TLMMouse; 649 TLMMButtonUp = TLMMouse; 650 TLMXButtonUp = TLMMouse; 651 652 TLastMouseInfo = record 653 WinHandle: THandle; 654 WinControl: TObject; // can be nil in special cases 655 MousePos: TPoint; 656 Time: QWord; 657 ClickCount: Integer; 658 Button: Byte; // 1=left, 2=right, 3=middle, 4=Extra 659 Down: Boolean; 660 end; 661 662 TLMSetFocus = record 663 Msg: Cardinal; 664{$ifdef cpu64} 665 UnusedMsg: Cardinal; 666{$endif} 667 FocusedWnd: HWND; 668 Unused: LPARAM; 669 Result: LRESULT; 670 end; 671 672{$ifndef windows} 673 TLMSize = record 674 Msg: Cardinal; 675{$ifdef cpu64} 676 UnusedMsg: Cardinal; 677{$endif} 678 SizeType: PtrInt; // see LCLType.pp (e.g. Size_Restored) 679 Width: Word; 680 Height: Word; 681{$ifdef cpu64} 682 Unused : Longint; 683{$endif cpu64} 684 Result: LResult; 685 End; 686{$else} 687 TLMSize = TWMSize; 688{$endif} 689 690 PLMessage = ^TLMessage; 691{$ifndef windows} 692 TLMessage = record 693 Msg : Cardinal; 694{$ifdef cpu64} 695 UnusedMsg: Cardinal; 696{$endif} 697 case Integer of 698 0 : ( 699 WParam: LclType.WPARAM; 700 LParam: LclType.LPARAM; 701 Result: LclType.LRESULT); 702 {$IFNDEF CPU64} 703 // on a 64 bit platform these make no sense 704 1 : ( 705{$IFDEF FPC_LITTLE_ENDIAN} 706 WParamLo: Word; 707 WParamHi: Word; 708 LParamLo: Word; 709 LParamHi: Word; 710 ResultLo: Word; 711 ResultHi: Word); 712{$ELSE} 713 WParamHi: Word; 714 WParamLo: Word; 715 LParamHi: Word; 716 LParamLo: Word; 717 ResultHi: Word; 718 ResultLo: Word); 719{$ENDIF} 720 {$endif} 721 end; 722{$else} 723 TLMessage = TMessage; 724{$endif} 725 726 TLMEnter = TLMNoParams; 727 TLMExit = TLMNoParams; 728 729// MWE: TLMScroll has not the same size as the VCL/Winapi counterpart. 730// IMO we don't have to force all widgetsets to be compatible in a shortcoming 731// in the win32 API. 732// So POS: SmallInt -> LongInt and a win32compatible smallpos is added 733// Due to this, the record is a LongInt to large. 734 735 TLMScroll = record 736 Msg: Cardinal; 737{$ifdef cpu64} 738 UnusedMsg: Cardinal; 739{$endif} 740{$IFDEF FPC_LITTLE_ENDIAN} 741 ScrollCode: SmallInt; // SB_xxx 742 SmallPos: SmallInt; 743{$ELSE} 744 SmallPos: SmallInt; 745 ScrollCode: SmallInt; // SB_xxx 746{$ENDIF} 747{$ifdef cpu64} 748 Unused : Longint; 749{$endif cpu64} 750 ScrollBar: HWND; 751 Result: LRESULT; // See remark 752 Pos: LongInt; // 753 end; 754 755 TLMHScroll = TLMScroll; 756 TLMVScroll = TLMScroll; 757 758{$ifndef windows} 759 TLMShowWindow = record 760 Msg: Cardinal; 761{$ifdef cpu64} 762 UnusedMsg: Cardinal; 763{$endif} 764 Show: LongBool; 765{$ifdef cpu64} 766 Unused : Longint; 767{$endif cpu64} 768 Status: LPARAM; 769 Result: LRESULT; 770 end; 771{$else} 772 TLMShowWindow = TWMShowWindow; 773{$endif} 774 775{$ifndef windows} 776 TLMKILLFOCUS = TLMSetFocus; 777{$else} 778 TLMKillFocus = TWMKillFocus; 779{$endif} 780 781 TLMNCHITTEST = record 782 Msg: Cardinal; 783{$ifdef cpu64} 784 UnusedMsg: Cardinal; 785{$endif} 786 Unused: WPARAM; 787 case Integer of 788 0 : ( 789 XPos : SmallInt; 790 YPos : SmallInt); 791 1 : ( 792 Pos : TSmallPoint); 793 2: ( 794 Dummy: LPARAM; // needed for64 bit alignment 795 Result: LRESULT); 796 end; 797 798 TLMDestroy = TLMNoParams; 799 800 TLMCommand = record 801 Msg: Cardinal; 802{$ifdef cpu64} 803 UnusedMsg: Cardinal; 804{$endif} 805{$IFDEF FPC_LITTLE_ENDIAN} 806 ItemID: Word; 807 NotifyCode: Word; 808{$ELSE} 809 NotifyCode: Word; 810 ItemID: Word; 811{$ENDIF} 812{$ifdef cpu64} 813 Unused : Longint; 814{$endif cpu64} 815 Ctl: HWND; 816 Result: LRESULT; 817 end; 818 819 TLMContextMenu = record 820 Msg: Cardinal; 821 {$ifdef cpu64} 822 UnusedMsg: Cardinal; 823 {$endif} 824 hWnd: HWND; 825 case Integer of 826 0: ( 827 XPos: Smallint; 828 YPos: Smallint 829 ); 830 1: ( 831 Pos: TSmallPoint; 832 ); 833 2: ( 834 Dummy: LPARAM; // needed for64 bit alignment 835 Result: LResult); 836 end; 837 838 TLMHelp = record 839 Msg: Cardinal; 840{$ifdef cpu64} 841 UnusedMsg: Cardinal; 842{$endif} 843 Unused: LCLType.WPARAM; 844 HelpInfo: PHelpInfo; 845 Result: LRESULT; 846 end; 847 848{ Combo Box Notification Codes } 849 850const 851 CBN_ERRSPACE = (-1); 852 CBN_SELCHANGE = 1; 853 CBN_DBLCLK = 2; 854 CBN_SETFOCUS = 3; 855 CBN_KILLFOCUS = 4; 856 CBN_EDITCHANGE = 5; 857 CBN_EDITUPDATE = 6; 858 CBN_DROPDOWN = 7; 859 CBN_CLOSEUP = 8; 860 CBN_SELENDOK = 9; 861 CBN_SELENDCANCEL = 10; 862 863 864function GetMessageName(const AMessage: Integer): String; 865 866 867Implementation 868 869 870function GetMessageName(const AMessage: Integer): String; 871begin 872 case AMessage of 873 //------------- 874 // lcl messages 875 // 876 // This should be a list of LCL specific messages 877 // RECEIVED from the interface, here are no defines 878 // of messages send to the interface 879 //------------- 880 881 // LM_NULL 882 LM_CREATE : Result := 'LM_CREATE'; 883 LM_DESTROY : Result := 'LM_DESTROY'; 884 LM_MOVE : Result := 'LM_MOVE'; 885 LM_SIZE : Result := 'LM_SIZE'; 886 LM_ACTIVATE : Result := 'LM_ACTIVATE'; 887 LM_SETFOCUS : Result := 'LM_SETFOCUS'; 888 LM_KILLFOCUS : Result := 'LM_KILLFOCUS'; 889 LM_ENABLE : Result := 'LM_ENABLE'; 890 LM_GETTEXTLENGTH : Result := 'LM_GETTEXTLENGTH'; 891 LM_PAINT : Result := 'LM_PAINT'; 892 LM_ERASEBKGND : Result := 'LM_ERASEBKGND'; 893 LM_SHOWWINDOW : Result := 'LM_SHOWWINDOW'; 894 895 LM_CANCELMODE : Result := 'LM_CANCELMODE'; 896 LM_SETCURSOR : Result := 'LM_SETCURSOR'; 897 LM_DRAWITEM : Result := 'LM_DRAWITEM'; 898 LM_MEASUREITEM : Result := 'LM_MEASUREITEM'; 899 LM_DELETEITEM : Result := 'LM_DELETEITEM'; 900 LM_VKEYTOITEM : Result := 'LM_VKEYTOITEM'; 901 LM_CHARTOITEM : Result := 'LM_CHARTOITEM'; 902 LM_SETFONT : Result := 'LM_SETFONT'; 903 904 LM_COMPAREITEM : Result := 'LM_COMPAREITEM'; 905 LM_WINDOWPOSCHANGING : Result := 'LM_WINDOWPOSCHANGING'; 906 LM_WINDOWPOSCHANGED : Result := 'LM_WINDOWPOSCHANGED'; 907 LM_NOTIFY : Result := 'LM_NOTIFY'; 908 LM_HELP : Result := 'LM_HELP'; 909 LM_NOTIFYFORMAT : Result := 'LM_NOTIFYFORMAT'; 910 LM_CONTEXTMENU : Result := 'LM_CONTEXTMENU'; 911 912 LM_NCCALCSIZE : Result := 'LM_NCCALCSIZE'; 913 LM_NCHITTEST : Result := 'LM_NCHITTEST'; 914 LM_NCPAINT : Result := 'LM_NCPAINT'; 915 LM_NCACTIVATE : Result := 'LM_NCACTIVATE'; 916 LM_GETDLGCODE : Result := 'LM_GETDLGCODE'; 917 LM_NCMOUSEMOVE : Result := 'LM_NCMOUSEMOVE'; 918 LM_NCLBUTTONDOWN : Result := 'LM_NCLBUTTONDOWN'; 919 LM_NCLBUTTONUP : Result := 'LM_NCLBUTTONUP'; 920 LM_NCLBUTTONDBLCLK : Result := 'LM_NCLBUTTONDBLCLK'; 921 922 // LM_KEYFIRST 923 LM_KEYDOWN : Result := 'LM_KEYDOWN'; 924 LM_KEYUP : Result := 'LM_KEYUP'; 925 LM_CHAR : Result := 'LM_CHAR'; 926 LM_SYSKEYDOWN : Result := 'LM_SYSKEYDOWN'; 927 LM_SYSKEYUP : Result := 'LM_SYSKEYUP'; 928 LM_SYSCHAR : Result := 'LM_SYSCHAR'; 929 // LM_KEYLAST 930 931 LM_COMMAND : Result := 'LM_COMMAND'; 932 LM_SYSCOMMAND : Result := 'LM_SYSCOMMAND'; 933 LM_TIMER : Result := 'LM_TIMER'; 934 LM_HSCROLL : Result := 'LM_HSCROLL'; 935 LM_VSCROLL : Result := 'LM_VSCROLL'; 936 LM_CTLCOLORMSGBOX : Result := 'LM_CTLCOLORMSGBOX'; 937 LM_CTLCOLOREDIT : Result := 'LM_CTLCOLOREDIT'; 938 LM_CTLCOLORLISTBOX : Result := 'LM_CTLCOLORLISTBOX'; 939 LM_CTLCOLORBTN : Result := 'LM_CTLCOLORBTN'; 940 LM_CTLCOLORDLG : Result := 'LM_CTLCOLORDLG'; 941 LM_CTLCOLORSCROLLBAR : Result := 'LM_CTLCOLORSCROLLBAR'; 942 LM_CTLCOLORSTATIC : Result := 'LM_CTLCOLORSTATIC'; 943 944 // LM_MOUSEFIRST 945 LM_MOUSEMOVE : Result := 'LM_MOUSEMOVE'; 946 LM_LBUTTONDOWN : Result := 'LM_LBUTTONDOWN'; 947 LM_LBUTTONUP : Result := 'LM_LBUTTONUP'; 948 LM_LBUTTONDBLCLK : Result := 'LM_LBUTTONDBLCLK'; 949 LM_RBUTTONDOWN : Result := 'LM_RBUTTONDOWN'; 950 LM_RBUTTONUP : Result := 'LM_RBUTTONUP'; 951 LM_RBUTTONDBLCLK : Result := 'LM_RBUTTONDBLCLK'; 952 LM_MBUTTONDOWN : Result := 'LM_MBUTTONDOWN'; 953 LM_MBUTTONUP : Result := 'LM_MBUTTONUP'; 954 LM_MBUTTONDBLCLK : Result := 'LM_MBUTTONDBLCLK'; 955 LM_MOUSEWHEEL : Result := 'LM_MOUSEWHEEL'; 956 LM_XBUTTONDOWN : Result := 'LM_XBUTTONDOWN'; 957 LM_XBUTTONUP : Result := 'LM_XBUTTONUP'; 958 LM_XBUTTONDBLCLK : Result := 'LM_XBUTTONDBLCLK'; 959 LM_MOUSEHWHEEL : Result := 'LM_MOUSEHWHEEL'; 960 // LM_MOUSELAST 961 962 LM_PARENTNOTIFY : Result := 'LM_PARENTNOTIFY'; 963 LM_CAPTURECHANGED : Result := 'LM_CAPTURECHANGED'; 964 LM_DROPFILES : Result := 'LM_DROPFILES'; 965 966 LM_SELCHANGE : Result := 'LM_SELCHANGE'; 967 LM_DPICHANGED : Result := 'LM_DPICHANGED'; 968 LM_CUT : Result := 'LM_CUT'; 969 LM_COPY : Result := 'LM_COPY'; 970 LM_PASTE : Result := 'LM_PASTE'; 971 LM_CLEAR : Result := 'LM_CLEAR'; 972 973 // lcl messages 974 LM_USER : Result := 'LM_USER'; 975 LM_LCL : Result := 'LM_LCL'; 976 977 LM_ACTIVATEITEM : Result := 'LM_ACTIVATEITEM'; 978 LM_CHANGED : Result := 'LM_CHANGED'; 979 LM_FOCUS : Result := 'LM_FOCUS'; 980 LM_CLICKED : Result := 'LM_CLICKED'; 981 LM_RELEASED : Result := 'LM_RELEASED'; 982 LM_ENTER : Result := 'LM_ENTER'; 983 LM_LEAVE : Result := 'LM_LEAVE'; 984 LM_CHECKRESIZE : Result := 'LM_CHECKRESIZE'; 985 LM_SETEDITABLE : Result := 'LM_SETEDITABLE'; 986 LM_MOVEWORD : Result := 'LM_MOVEWORD'; 987 LM_MOVEPAGE : Result := 'LM_MOVEPAGE'; 988 LM_MOVETOROW : Result := 'LM_MOVETOROW'; 989 LM_MOVETOCOLUMN : Result := 'LM_MOVETOCOLUMN'; 990 LM_KILLCHAR : Result := 'LM_KILLCHAR'; 991 LM_KILLWORD : Result := 'LM_KILLWORD'; 992 LM_KILLLINE : Result := 'LM_KILLLINE'; 993 LM_CONFIGUREEVENT : Result := 'LM_CONFIGUREEVENT'; 994 LM_EXIT : Result := 'LM_EXIT'; 995 LM_CLOSEQUERY : Result := 'LM_CLOSEQUERY'; 996 LM_DRAGSTART : Result := 'LM_DRAGSTART'; 997 LM_QUIT : Result := 'LM_QUIT'; 998 LM_MONTHCHANGED : Result := 'LM_MONTHCHANGED'; 999 LM_YEARCHANGED : Result := 'LM_YEARCHANGED'; 1000 LM_DAYCHANGED : Result := 'LM_DAYCHANGED'; 1001 1002 // LM_MOUSEFIRST2 1003 LM_LBUTTONTRIPLECLK : Result := 'LM_LBUTTONTRIPLECLK'; 1004 LM_LBUTTONQUADCLK : Result := 'LM_LBUTTONQUADCLK'; 1005 LM_MBUTTONTRIPLECLK : Result := 'LM_MBUTTONTRIPLECLK'; 1006 LM_MBUTTONQUADCLK : Result := 'LM_MBUTTONQUADCLK'; 1007 LM_RBUTTONTRIPLECLK : Result := 'LM_RBUTTONTRIPLECLK'; 1008 LM_RBUTTONQUADCLK : Result := 'LM_RBUTTONQUADCLK'; 1009 LM_MOUSEENTER : Result := 'LM_MOUSEENTER'; 1010 LM_MOUSELEAVE : Result := 'LM_MOUSELEAVE'; 1011 LM_XBUTTONTRIPLECLK : Result := 'LM_XBUTTONTRIPLECLK'; 1012 LM_XBUTTONQUADCLK : Result := 'LM_XBUTTONQUADCLK'; 1013 // LM_MOUSELAST2 1014 1015 LM_GRABFOCUS : Result := 'LM_GRABFOCUS'; 1016 LM_DRAWLISTITEM : Result := 'LM_DRAWLISTITEM'; 1017 1018 // these IDs are reserved for internal messages in the interfaces 1019 LM_INTERFACEFIRST : Result := 'LM_INTERFACEFIRST'; 1020 LM_INTERFACELAST : Result := 'LM_INTERFACELAST'; 1021 LM_UNKNOWN : Result := 'LM_UNKNOWN'; 1022 1023 CM_ACTIVATE : Result := 'CM_ACTIVATE'; 1024 CM_DEACTIVATE : Result := 'CM_DEACTIVATE'; 1025// CM_GOTFOCUS : Result := 'CM_GOTFOCUS'; 1026// CM_LOSTFOCUS : Result := 'CM_LOSTFOCUS'; 1027// CM_CANCELMODE : Result := 'CM_CANCELMODE'; 1028// CM_DIALOGKEY : Result := 'CM_DIALOGKEY'; 1029// CM_DIALOGCHAR : Result := 'CM_DIALOGCHAR'; 1030 CM_FOCUSCHANGED : Result := 'CM_FOCUSCHANGED'; 1031 CM_PARENTFONTCHANGED : Result := 'CM_PARENTFONTCHANGED'; 1032 CM_PARENTCOLORCHANGED : Result := 'CM_PARENTCOLORCHANGED'; 1033 CM_HITTEST : Result := 'CM_HITTEST'; 1034 CM_VISIBLECHANGED : Result := 'CM_VISIBLECHANGED'; 1035 CM_ENABLEDCHANGED : Result := 'CM_ENABLEDCHANGED'; 1036 CM_COLORCHANGED : Result := 'CM_COLORCHANGED'; 1037 CM_FONTCHANGED : Result := 'CM_FONTCHANGED'; 1038 CM_CURSORCHANGED : Result := 'CM_CURSORCHANGED'; 1039// CM_CTL3DCHANGED : Result := 'CM_CTL3DCHANGED'; 1040// CM_PARENTCTL3DCHANGED : Result := 'CM_PARENTCTL3DCHANGED'; 1041 CM_TEXTCHANGED : Result := 'CM_TEXTCHANGED'; 1042 CM_MOUSEENTER : Result := 'CM_MOUSEENTER'; 1043 CM_MOUSELEAVE : Result := 'CM_MOUSELEAVE'; 1044 CM_MENUCHANGED : Result := 'CM_MENUCHANGED'; 1045// CM_APPKEYDOWN : Result := 'CM_APPKEYDOWN'; 1046 CM_APPSYSCOMMAND : Result := 'CM_APPSYSCOMMAND'; 1047 CM_BUTTONPRESSED : Result := 'CM_BUTTONPRESSED'; 1048 CM_SHOWINGCHANGED : Result := 'CM_SHOWINGCHANGED'; 1049 CM_ENTER : Result := 'CM_ENTER'; 1050 CM_EXIT : Result := 'CM_EXIT'; 1051 CM_DESIGNHITTEST : Result := 'CM_DESIGNHITTEST'; 1052 CM_ICONCHANGED : Result := 'CM_ICONCHANGED'; 1053 CM_WANTSPECIALKEY : Result := 'CM_WANTSPECIALKEY'; 1054// CM_INVOKEHELP : Result := 'CM_INVOKEHELP'; 1055// CM_WINDOWHOOK : Result := 'CM_WINDOWHOOK'; 1056 CM_RELEASE : Result := 'CM_RELEASE'; 1057 CM_SHOWHINTCHANGED : Result := 'CM_SHOWHINTCHANGED'; 1058 CM_PARENTSHOWHINTCHANGED : Result := 'CM_PARENTSHOWHINTCHANGED'; 1059// CM_SYSCOLORCHANGE : Result := 'CM_SYSCOLORCHANGE'; 1060// CM_WININICHANGE : Result := 'CM_WININICHANGE'; 1061 CM_FONTCHANGE : Result := 'CM_FONTCHANGE'; 1062// CM_TIMECHANGE : Result := 'CM_TIMECHANGE'; 1063 CM_TABSTOPCHANGED : Result := 'CM_TABSTOPCHANGED'; 1064 CM_UIACTIVATE : Result := 'CM_UIACTIVATE'; 1065// CM_UIDEACTIVATE : Result := 'CM_UIDEACTIVATE'; 1066// CM_DOCWINDOWACTIVATE : Result := 'CM_DOCWINDOWACTIVATE'; 1067 CM_CONTROLLISTCHANGE : Result := 'CM_CONTROLLISTCHANGE'; 1068 CM_GETDATALINK : Result := 'CM_GETDATALINK'; 1069 CM_CHILDKEY : Result := 'CM_CHILDKEY'; 1070// CM_DRAG : Result := 'CM_DRAG'; 1071 CM_HINTSHOW : Result := 'CM_HINTSHOW'; 1072// CM_DIALOGHANDLE : Result := 'CM_DIALOGHANDLE'; 1073// CM_ISTOOLCONTROL : Result := 'CM_ISTOOLCONTROL'; 1074// CM_RECREATEWND : Result := 'CM_RECREATEWND'; 1075// CM_INVALIDATE : Result := 'CM_INVALIDATE'; 1076 CM_SYSFONTCHANGED : Result := 'CM_SYSFONTCHANGED'; 1077 CM_CONTROLCHANGE : Result := 'CM_CONTROLCHANGE'; 1078 CM_CHANGED : Result := 'CM_CHANGED'; 1079// CM_DOCKCLIENT : Result := 'CM_DOCKCLIENT'; 1080// CM_UNDOCKCLIENT : Result := 'CM_UNDOCKCLIENT'; 1081// CM_FLOAT : Result := 'CM_FLOAT'; 1082 CM_BORDERCHANGED : Result := 'CM_BORDERCHANGED'; 1083 CM_BIDIMODECHANGED : Result := 'CM_BIDIMODECHANGED'; 1084 CM_PARENTBIDIMODECHANGED : Result := 'CM_PARENTBIDIMODECHANGED'; 1085 CM_ALLCHILDRENFLIPPED : Result := 'CM_ALLCHILDRENFLIPPED'; 1086 CM_ACTIONUPDATE : Result := 'CM_ACTIONUPDATE'; 1087 CM_ACTIONEXECUTE : Result := 'CM_ACTIONEXECUTE'; 1088 CM_HINTSHOWPAUSE : Result := 'CM_HINTSHOWPAUSE'; 1089 CM_DOCKNOTIFICATION : Result := 'CM_DOCKNOTIFICATION'; 1090 CM_MOUSEWHEEL : Result := 'CM_MOUSEWHEEL'; 1091// CM_ISSHORTCUT : Result := 'CM_ISSHORTCUT'; 1092// CM_UPDATEACTIONS : Result := 'CM_UPDATEACTIONS'; 1093// CM_INVALIDATEDOCKHOST : Result := 'CM_INVALIDATEDOCKHOST'; 1094// CM_SETACTIVECONTROL : Result := 'CM_SETACTIVECONTROL'; 1095// CM_POPUPHWNDDESTROY : Result := 'CM_POPUPHWNDDESTROY'; 1096// CM_CREATEPOPUP : Result := 'CM_CREATEPOPUP'; 1097// CM_DESTROYHANDLE : Result := 'CM_DESTROYHANDLE'; 1098// CM_MOUSEACTIVATE : Result := 'CM_MOUSEACTIVATE'; 1099// CM_CONTROLLISTCHANGING : Result := 'CM_CONTROLLISTCHANGING'; 1100// CM_BUFFEREDPRINTCLIENT : Result := 'CM_BUFFEREDPRINTCLIENT'; 1101// CM_UNTHEMECONTROL : Result := 'CM_UNTHEMECONTROL'; 1102 CM_DOUBLEBUFFEREDCHANGED : Result := 'CM_DOUBLEBUFFEREDCHANGED'; 1103 CM_PARENTDOUBLEBUFFEREDCHANGED : Result := 'CM_PARENTDOUBLEBUFFEREDCHANGED'; 1104// CM_THEMECHANGED : Result := 'CM_THEMECHANGED'; 1105// CM_GESTURE : Result := 'CM_GESTURE'; 1106// CM_CUSTOMGESTURESCHANGED : Result := 'CM_CUSTOMGESTURESCHANGED'; 1107// CM_GESTUREMANAGERCHANGED : Result := 'CM_GESTUREMANAGERCHANGED'; 1108// CM_STANDARDGESTURESCHANGED : Result := 'CM_STANDARDGESTURESCHANGED'; 1109// CM_INPUTLANGCHANGE : Result := 'CM_INPUTLANGCHANGE'; 1110// CM_TABLETOPTIONSCHANGED : Result := 'CM_TABLETOPTIONSCHANGED'; 1111// CM_PARENTTABLETOPTIONSCHANGED : Result := 'CM_PARENTTABLETOPTIONSCHANGED'; 1112 CM_APPSHOWBTNGLYPHCHANGED : Result := 'CM_APPSHOWBTNGLYPHCHANGED'; 1113 CM_APPSHOWMENUGLYPHCHANGED : Result := 'CM_APPSHOWMENUGLYPHCHANGED'; 1114 1115 CN_CHARTOITEM : Result := 'CN_CHARTOITEM'; 1116 CN_COMMAND : Result := 'CN_COMMAND'; 1117 CN_COMPAREITEM : Result := 'CN_COMPAREITEM'; 1118 CN_CTLCOLORBTN : Result := 'CN_CTLCOLORBTN'; 1119 CN_CTLCOLORDLG : Result := 'CN_CTLCOLORDLG'; 1120 CN_CTLCOLOREDIT : Result := 'CN_CTLCOLOREDIT'; 1121 CN_CTLCOLORLISTBOX : Result := 'CN_CTLCOLORLISTBOX'; 1122 CN_CTLCOLORMSGBOX : Result := 'CN_CTLCOLORMSGBOX'; 1123 CN_CTLCOLORSCROLLBAR : Result := 'CN_CTLCOLORSCROLLBAR'; 1124 CN_CTLCOLORSTATIC : Result := 'CN_CTLCOLORSTATIC'; 1125 CN_DELETEITEM : Result := 'CN_DELETEITEM'; 1126 CN_DRAWITEM : Result := 'CN_DRAWITEM'; 1127 CN_HSCROLL : Result := 'CN_HSCROLL'; 1128 CN_MEASUREITEM : Result := 'CN_MEASUREITEM'; 1129 CN_PARENTNOTIFY : Result := 'CN_PARENTNOTIFY'; 1130 CN_VKEYTOITEM : Result := 'CN_VKEYTOITEM'; 1131 CN_VSCROLL : Result := 'CN_VSCROLL'; 1132 CN_KEYDOWN : Result := 'CN_KEYDOWN'; 1133 CN_KEYUP : Result := 'CN_KEYUP'; 1134 CN_CHAR : Result := 'CN_CHAR'; 1135 CN_SYSKEYUP : Result := 'CN_SYSKEYUP'; 1136 CN_SYSKEYDOWN : Result := 'CN_SYSKEYDOWN'; 1137 CN_SYSCHAR : Result := 'CN_SYSCHAR'; 1138 CN_NOTIFY : Result := 'CN_NOTIFY'; 1139 1140 else 1141 Result := Format('Unknown message 0x%x (%d)', [AMessage, AMessage]); 1142 end; 1143end; 1144 1145 1146end. 1147