Delphi related issues

xiaoxiao2021-03-06  50

1. Dynamic stored procedure call sp_Exec.Parameters.Clear; sp_Exec.ProcedureName: = 'sp_TransTo'; sp_Exec.Parameters.CreateParameter ( '@ mailId', ftString, pdInput, 50, MailId); sp_Exec.Parameters.CreateParameter ( '@ Result ', ftinteger, pdoutput, 0, rowid; sp_exec.execproc; 2. Display pop-up menu Var xy: tpoint; begin xy: = btnflow.clientorigin; xy.y: = xy btnflow. Height; windows.clienttoscreen (hwnd_desktop, xy); mmMenu.popup (xy.x, xy.y); 3.Windows message

The message means a notification issued by Wi N D O W S to tell the application something happens. For example, click the mouse, change the window size, press a key on the keyboard to send Wi N D O W S to the application. The message itself is passed to the application as a record, and this record contains the type of message and other information. For example, for messages generated by clicking on the mouse, this record contains the coordinates when clicking the mouse. This record type is called TM SG, which is declared in the Wi NDOWS unit: Typ etmsg = Packed RecordhWnd: hwnd; / / window handle Message: uint; / / message constant identifier WPARAM: WPA RAM; // 32 Bit message Specific additional information LPARAM: LPA RAM; // 32-bit messages Specific additional information Time: DWORD; / / message creation time Pt: tpoint; / / message creation mouse position END; what is there? Do you feel that the information in a message record is like Greek? If this is the case, then take a look at the explanation below: HWND 32-bit window handle. The window can be any type of screen object because Win32 is able to maintain the handle of most visual objects (windows, dialogs, buttons, edit boxes, etc.). Message is used to distinguish constant values ​​for other messages, which may be predefined in the Windows unit, or they can be custom constants. WPARAM is usually a constant value related to messages or a handle of a window or control. LPARAM is usually a pointer to data in memory. Since W p A r a m, L P A R A M and P O i N t E r are 3 2 bits, so they can be converted between them.

WM_NULL = 0000; WM_CREATE = $ 0001; application creates a window WM_DESTROY = $ 0002; one window is destroyed WM_MOVE = $ 0003; moving a window WM_SIZE = $ 0005; change a window of the size WM_ACTIVATE = $ 0006; one window is activated or lost activation state; WM_SETFOCUS = $ 0007; WM_KILLFOCUS = $ 0008 after getting focus; lost focus WM_ENABLE = $ 000A; change Enable Status WM_SETREDRAW = $ 000B; Settings Window can redraw WM_SETTEXT = $ 000c; the application sends this message to set the text WM_Gettext = $ 000d; application sends this message to copy the text to the buffer wm_gettextLength = $ 000E for the corresponding window; get the length of the text related to a window (not including empty characters) WM_Paint = $ 000F; ask one window to call yourself WM_CLOSE = $ 0010; send a signal WM_QUERYENDSESSION = $ 0011 when a window or application is to be turned off; when the user selects the end dialog or the program you call the exitwindows function wm_quit = $ 0012; used to end the program to run or when the program calls PostquitMessage function wm_quitMessage function wm_quitMessage function WM_QUERYOPEN = $ 0013; When the user window restores the previous size position, send this message to an icon WM_ERASEBKGND = $ 0014; when the window background must be erased (case change the size of the window) WM_SYSCOLORCHANGE = 0015; send this message when the system color changes, send this message Give all top windows WM_ENDSESSION = $ 0016; After the system process issues a WM_QueryEndSession message, this message is sent to the application, informs it to end if the conversation ends WM_SYSTEMERROR = $ 0017; WM_SHOWI NDOW = $ 0018; When the hidden or display window is sent to this message to this message to this message, which window is activated to the application, which is an activated; WM_FONTCHANGE = $ 001d; when the system's font resource library changes Send this message to all top windows WM_TIMECHANGE = $ 001E; send this message when the system changes to all top-level windows WM_CANCELMODE = $ 001F; send this message to cancel some of the ongoing touch state (operation) WM_SETCURSOR = $ 0020; If the mouse causes the cursor to move in a window and when the mouse input is not captured, send a message to a window WM_MouseActivate = $ 0021; when the cursor is in a non-activated window and the user is in accordance with a key to the mouse The message gives the current window WM_CHILDACTIVATE = $ 0022; send this message to the MDI sub-window When the user clicks on this window, or when the window is activated, move, change the size WM_QUEUESYNC = 0023; this message is sent by a computer-based training program,

Separate the user input message wm_getminMaxinfo = $ 0024 via the WH_Journalpalyback's hook program; this message is sent to the window When it will change the size or position; WM_PAINTICON = $ 0026; Send to the minimization window When it will be edited by WM_ICONERASEBKGND = $ 0027; this message is sent Give a minimization window, only when it is drawn, its background must be saved WM_NEXTDLGCTL = $ 0028; send this message to a dialog program to change the focus position wm_spoolerstatus = $ 002a; Whenever the print management column increases or decreases This message is issued when a homework is sent to the owner of these empty parts when the visual appearance changes of Button, ComboBox, ListBox, and Menu; when Button, Combo Box, List Box, List view control, or menu item when it is created to send this message to the owner of the control WM_DELETEITEM = $ 002D; when the list box or combo box is destroyed or when certain items are deleted by LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT news WM_VKEYTOITEM = $ 002E; This message has a LBS_WANTKEYBOARDINPUT style to give it owners to respond to WM_KeyDown messages WM_CHARTOITEM = $ 002F; this message is sent to his owner by a LBS_WANTKEYBOARDINPUT style list box to respond to WM_CHAR messages WM_SETFONT = $ 0030; Text-time program sends this message to get the color wm_getfont = $ 0031 for the control; the application sends this message to get the current control to draw the text of the text WM_SETHOTKEY = $ 0032; the application sends this message to make a window with a hot key related to WM_GETHOTKEY = $ 0033; The application sends this message to determine if the hotkey is associated with a window. WM_QueryDragicon = $ 0037; This message is sent to the minimization window, when this window will be drag and drop, it is not defined in its class, the application can return an icon or cursor handle, when the user drag and drop the icon, the system displays this icon or Cursor WM_CompareItem = $ 0039; Send this message to determine the relative position of ComboBox or Listbox added items wm_getobject = $ 003d; wm_compacting = $ 0041; Show memory has rarely wm_windowposchanging = $ 0046; send this message to the size and location of the window When it is changed, call the SETWINDOWPOS function or other window management function wm_windowposchanged = 0047; send this message to the size and location of the window have been changed to call the SETWINDOWPOS function or other window management function wm_power = $ 0048; (for 16 bits) Windows) When the system will send this message when the system will send this message WM_COPYDATA = $ 004a; send this message when an application delivers the data to another application WM_CANCELJournall = $ 004B; when a user cancels the program log activation,

Submit this message to the program WM_NOTIFY = $ 004E; send this message to its parent window WM_INPUTLANGCHANGEREQUEST = $ 0050 when a control is required or this control needs to get some information; when the user selects a certain input language, or Enter the hotkey of the language changes WM_INPUTLANGCHANGE = $ 0051; when the platform has been changed, then send this message to the affected top window WM_TCARD = $ 0052; send this message when the program has initialized the Windows Help routine to send this message to the application WM_HELP = $ 0053; This message displays the user presses F1. If a menu is activated, send this message and this window is associated with the menu, otherwise send a window with focus, if there is no focus, just send this message to the current Activated window wm_userchanged = $ 0054; send this message to all windows when the user has logged in or exit Public control, custom controls, and their parent window to determine the control with ansi or the Unicode structure in the WM_NOTIFY message, using this control to communicate with its parent controls WM_CONTEXTMENU = $ 007B When you click on the right button in a window to send this message to this message to this message to send this message when the calling setWindowlong function will change the style of one or more windows to the window WM_Stylechanged = $ 007d; Setwindowlong function After one or more windows of the window send this message to that window WM_DISPLAYCHANGE = $ 007E; send this message to all windows wm_geticon = $ 007f when the resolution change changes; this message is sent to a window to return to Some windows related to the big icon or small icon handle; WM_seticon = $ 0080; program sends this message to let a new big icon or small icon associate with a window; WM_NCCREATE = 0081; when a window is created for the first time When this message is sent before the WM_CREATE message is sent; WM_NCDESTR OY = $ 0082; This message notifies a window, the non-client area is destroying WM_NCCALCSIZE = $ 0083; when a window's customer area must be asked to send this message WM_NCHITTEST = $ 0084; // Move the mouse, hold down or release the mouse WM_NCPAINT = $ 0085; Program Send this message to a window When it (window) framework must be drawn; wm_ncactivate = $ 0086; This message is sent to a window only when its non-client area needs to be changed to display is activated or Non-activated state; WM_GETDLGCODE = $ 0087; Send this message to a control associated with the dialog program, the Widdows Control orientation key and Tab keys make the input into this control by responding to the WM_GETDLGCODE message, the application can treat him as a special input control And can handle it WM_NCMOUSEMOVE = $ 00A0; send this message when the cursor moves in a window's non-client area to this window // Non-client is:

The edge of the form of the form and the edge of the window WM_NCLBUTTONDOWN = $ 00A1; when the cursor is pressed at the non-client area of ​​a window, submit this message WM_NCLBUTTONUP = $ 00A2; when the user releases the left mouse button, the point is a window Send this message in the non-client zone; WM_NCLBUTTONDBLCLK = $ 00A3; When the non-client district is sent, WM_NCRBUTTONUP = $ 00a5; when the user releases the mouse button while the cursor is sent this message when the cursor is in the non-client district of the window, WM_NCRBUTTONDBLCLK = $ 00A6; when the user doubles the mouse button, the target is a window in the non-client area ten Send this message wm_ncmbuttondown = $ 00A7; When the user presses the mouse button while the cursor is in the window of the window WM_NCMBUTTONUP = $ 00A8; when the user releases the mouse button, the cursor is sent when the cursor is sent in the window of the window This message wm_ncmbuttondblclk = $ 00A9; When the user doubles the mouse button while the cursor is sent to this message when the cursor is in the non-client district of the window, WM_KEYFIRST = $ 0100; WM_KEYDOWN = $ 0100; // Press a key WM_KEYUP = $ 0101; // Release a button WM_CHAR = $ 0102; // Press a key and issue WM_KEYDOWN, WM_Keyup message WM_DEADCHAR = $ 0103; send this message when translating the WM_KEYUP message with the translateMessage function to send this message to the window WM_SYSKEYDOWN = $ 0104; when the user presses the Alt button Other keys Submit this message to the window with focus; WM_SYSKEYUP = $ 0105; when the user releases a button while the Alt key is pressed, submit this message to the window WM_SYSCHAR = $ 0106; when the WM_SyskeyDown message is translated by the translateMessage function, submit this message Window, WM_SYSDEADCHAR = $ 0107; when the WM_SYSKEYDOWN message is translated by the translateMessage function to send this message to the window WM_KEYLAST = $ 0108; WM_INITDIALOG = $ 0110; send this message before a dialog program is displayed, usually use this message Initializing control and execution of other tasks WM_COMMAND = $ 0111; when the user selects a menu command item or when a control sends a message to the parent window, a shortcut is translated by the message; when the user selects a command or when the user selects the window menu or when When the user selects maximizes or minimizes the message, the message will receive this message wm_timer = $ 0113; // The timer event WM_HSCROLL = $ 0114; when a window standard horizontal scroll bar generates a scrolling event to send this message to that window,

Also sent to the control WM_VScroll = $ 0115; when a window standard vertical scroll bar generates a scrolling event to send this message to that window, send it to the control WM_INITMENU = $ 0116; when a menu will be activated Message, it happens in a user menu bar or presses a menu button, which allows the program to change the menu WM_InitMenupupup = $ 0117 before display; when a drop-down menu or submenu will be activated, it allows the program Change the menu before it is displayed, not to change all WM_MENUSELECT = $ 011f; send this message to the menu when the user selects a menu item (general window) WM_MenuChar = $ 0120; when the menu has been activated by the user A key (different from the accelerator), send this message to the owner of the menu; WM_EnterIdle = $ 0121; send this message to the owner, a modal dialog or a modal dialog or a modal dialog or menu enter the idling state is not after one or several previous message processed message from its queue waiting WM_MENURBUTTONUP in = $ 0122; WM_MENUDRAG = $ 0123; WM_MENUGETOBJECT = $ 0124; WM_UNINITMENUPOPUP = $ 0125; WM_MENUCOMMAND = $ 0126; WM_CHANGEUISTATE = $ 0127; WM_UPDATEUISTATE = $ 0128; wm_quryuistate = $ 0129; WM_CTLCOLORMSGBOX = $ 0132; Send this message to the owner window of the message box before the Windows Draw Message box, by responding to this message, the owner window can set the message by using the handle of the given related display device Box text and background color wm_ctlcoloredit = $ 0133; When a editing control will send this message to its parent window; by responding to this message, the owner window can be set by using the handle of the given related display device. Edit box text and background color wm_ctlcolorListbox = $ 0134; When a list box control will send this message to its parent window before drawn; by responding to this message, the owner window can be used by the handle of a given related display device. Set the list of list boxes Ben and background color wm_ctlcolorbtn = $ 0135; when a button control will send this message to the parent window; by responding to this message, the owner window can set the button by using the handle of the given related display device. Text and background color WM_CTLCOLORDLG = $ 0136; When a dialog control will send this message to its parent window before being drawn; by responding to this message, the owner window can set the dialog box by using the handle of a given related display device. Text Background Color WM_CTLCOLORSCROLLBAR = $ 0137; When a scroll bar control will be drawn to the parent window; by responding to this message, the owner window can set the scroll bar by using the handle of a given related display device. Background color WM_CTLCOLORSTATIC = $ 0138; When a static control will send this message to its parent window; by responding to this message, the owner window can set the text of the static control by using the handle of a given related display device. And background color wm_mousefirst = $ 0200; wm_mousemove = $ 0200;

// Move mouse wm_lbuttondown = $ 0201; // Press the left mouse button wm_lbuttonup = $ 0202; // Release the left mouse button WM_LButtondblclk = $ 0203; // Double click the left mouse button WM_RBUTTONDOWN = $ 0204; // Press the right mouse button WM_RBUTTONUP = $ 0205; / / release the right mouse button WM_RBUTTONDBLCLK = $ 0206; // double right mouse button WM_MBUTTONDOWN = $ 0207; // middle mouse button WM_MBUTTONUP = $ 0208; // release the mouse button WM_MBUTTONDBLCLK = $ 0209; // double-click the mouse button WM_MOUSEWHEEL = $ 020A; when When the mouse wheel rotates, the currently focused control WM_MouseLast = $ 020A; WM_ParentNotify = $ 0210; when the MDI sub-window is created or destroyed, or the user presses the mouse button and the cursor will send this message when the cursor is on the sub-window. Its parent window WM_ENTERMENULOOP = $ 0211; Send this message to notify the application's main window That has entered the menu loop mode WM_EXITMENULOOP = $ 0212; send this message to notify the application's main window That has exited menu loop mode WM_NEXTMENU = $ 0213; wm_sizing = 532; When the user is adjusting the window size to the window; you can monitor the window size and position can also modify their wm_capturechanged = 533; send this message to the window when it lost the captured mouse; WM_MOVING = 534 ; When the user sends this message when the window, this message application can monitor the window size and position can also modify them; WM_P OwerBroadcast = 536; This message is sent to the application to notify it about power management events; WM_DeviceChange = 537; send this message to the application or device driver WM_IME_StartComposition = $ 010D when the device's hardware configuration changes; wm_ime_composition = $ 010e; wm_ime_composition = $ 010F; WM_IME_KEYLAST = $ 010F; WM_IME_SETCONTEXT = $ 0281; WM_IME_NOTIFY = $ 0282; WM_IME_CONTROL = $ 0283; WM_IME_COMPOSITIONFULL = $ 0284; WM_IME_SELECT = $ 0285; WM_IME_CHAR = $ 0286; WM_IME_REQUEST = $ 0288;

WM_IME_KEYDOWN = $ 0290; WM_IME_KEYUP = $ 0291; WM_MDicReate = $ 0220; application sends this message to a multi-document client window to create a MDI sub-window WM_MDIDESTROY = $ 0221; application sends this message to a multi-document client window to close a MDI child window WM_MDIAACTIVATE = $ 0222; Application Send this message to inform the client window to inform the client window to activate another MDI sub-window, after the customer window receives this message, it issues a WM_MDIACTIVE message to the MDI sub-window (not activated) to activate it; WM_MDIRESTORE = $ 0223; Program Send this message to the MDI Customer window to restore the sub-window to the maximum size of the original size WM_MDINEXT = $ 0224; the program sends this message to the MDI customer window to activate the next or the previous window WM_MDIMAXIMIZE = $ 0225; program Send this message The MDI customer window maximizes an MDI sub-window; WM_MDITILE = $ 0226; program sends this message to the MDI customer window to rearrange all MDI sub-window WM_MDICASCADE = $ 0227; program sends this message to the MDI customer window to rearrange All MDI sub-windows WM_MDIICONARRANGE = $ 0228; Program Send this message Re-arrange all minimized MDI sub-window WM_MDiGetActive = $ 0229; program sends this message to the MDI customer window to find the handle of the activated sub-window WM_MDisetMenu = $ 0230; program sends this message to the MDI client window instead of the sub-window with MDI menu WM_ENTERSIZEMOVE = $ 0231; WM_EXITSIZEMOVE = $ 0232; WM_DROPFILES = $ 0233; WM_MDIREFRESHMENU = $ 0234; WM_MOUSEHOVER = $ 02A1; WM_MOUSELEAVE = $ 02A3; WM_CUT = $ 0300; program sends the message to An edit box or ComboBox to delete the currently selected text wm_copy = $ 0301; program sends this message to a edit box or ComboBox to copy the currently selected text to the clipboard WM_PASTE = $ 0302; program Send this message to EditControl or ComboBox from the clipboard WM_CLEAR = $ 0303; program sends the message to editcontrol or combobox clear the currently selected content; WM_UNDO = $ 0304; program sends the message to editcontrol or combobox undo the last operation WM_RENDERFORMAT = $ 0305; WM_RENDERALLFORMATS = $ 0306; WM_DESTROYCLIPBOARD = $ 0307; transmitted when calling ENPTYCLIPBOARD function This message gives the owner of the clipboard WM_DRAWCLIPBOARD = $ 0308; send this message to the first window of the clipboard to observe the chain when the content changes of the clipboard; it allows the window to display the new content of the clipboard; WM_PaintClipboard = $ 0309; When the clipboard contains data in the CF_OWNERDIPLAY format and the clipboard observed the customer area needs to be redrawn;

WM_VSCROLLLCLIPBOARD = $ 030A; WM_SIZECLIPBOARD = $ 030B; when the clipboard contains the data of the CF_OWNERDIPLAY format and the size of the client area of ​​the clipboard observation window has changed this message is sent to the owner of the clipboard via the clipboard watch window; WM_ASKCBFORMATNAME = $ 030c The message to the clipboard is sent to the owner of the clipboard to request a clipboard of the clipboard by the clipboard observation window. WM_CHANGECBCHAIN ​​= $ 1030D; when a window is removed from the clipboard observation chain to send this message to the clipboard observation chain The first window; WM_HScrollClipboard = $ 030E; This message sends the owner of the clipboard through a clipboard watch window; it occurs when the clipboard contains data in the CFOWNERDISPALY format and has an event horizontally rolled over the clipboard On the bar; the owner should scroll the clipboard image and update the value of the scroll bar; WM_QUERYNEWPALETTTE = $ 030F; this message is sent to the window to receive the focus, this message can make the window when you receive the focus, have the opportunity to achieve his Logical palette WM_PALETTEISCHANGING = $ 0310; When an application is to implement its logical palette, you send this message to notify all applications WM_PALETTECHANGED = $ 0311; this message implements its logical palette after a focus window Send this message to all top-level and overlapping windows to change the system palette WM_HOTKEY = $ 0312; submit this message when the user presses the hotkey registered by the RegisterhotKey function; Application Send this message only when Windows or other applications issuing a request requires drawing a portion of an application; WM_PRINTCLIENT = 792; WM_HANDHELDFIRST = 856; WM_HANDHELDLAST = 863; WM_PENWINFIRST = $ 0380; WM_PENWINLAST = $ 038F; WM_COALESCE_FIRST = $ 0390; WM_COALESCE_LAST = $ 039F; WM_DDE_FIRST = $ 03E0; Wm_dde_initiate = wm_dde _First 0; a DDE client submits this message to start a session of the server to respond to the specified program and theme name; WM_DDE_TERMINATE = WM_DDE_FIRST 1; a DDE application (whether a customer or server) submits this message to terminate A session; WM_DDE_ADVISE = WM_DDE_FIRST 2; a DDE client submits this message to a DDE service program to request the server whenever the data item is updated when the data item changes it WM_DDE_UNADVISE = WM_DDE_FIRST 3; a DDE client invides a DDE service program not updated item or a specified special clipboard format entry WM_DDE_ACK = WM_DDE_FIRST 4; this message informs a DDE (dynamic data exchange) program has been received and is being processed WM_DDE_POKE, WM_DDE_EXECUTE, WM_DDE_DATA, WM_DDE_ADVISE, WM_DDE_UNADVISE, or WM_DDE_INITIAT message WM_DDE_DATA = WM_DDE_FIRST 5;

A DDE service program submits this message to the DDE client to deliver a data item to a customer or notifying the customer's available data item WM_DDE_REQUEST = WM_DDE_DDE_REQUEST = WM_DDE_FIRST 6; a DDE client submits this message to a DDE service program to request a data item Value; WM_DDE_POKE = WM_DDE_FIRST 7; a DDE client submits this message to a DDE service program, the customer uses this message to request the server to receive an unadcoming data item; the server passes the answer WM_DDE_ACK message prompt whether it receives this data item WM_DDE_EXECUTE = WM_DDE_EXECUTE = WM_DDE_FIRST 8; a DDE client submits this message to a DDE service program to send a string to the server as the serial command is processed as the serial command, the server responds by submitting the WM_DDE_ACK message; WM_DDE_LAST = WM_DDE_First 8 WM_APP = $ 8000; WM_USER = $ 0400; this message can help the application custom private message; / notification message (notification message) refers to such a message, and the child control in one window has some things, you need to notify the parent window. The notification message is only available for standard window controls such as buttons, list boxes, combo boxs, edit boxes, and Windows 95 public controls such as tree views, list views, etc. For example, click or double-click a control, select some text in the control, and the scroll bar of the operating control will generate a notification message.

转载请注明原文地址:https://www.9cbs.com/read-110095.html

New Post(0)