Wmsg of vb api sendmessage (2)

Source: Internet
Author: User

Wmsg of vb api sendmessage (2)

Wm_menuselect = $ 011f;
This message is sent to the menu owner (usually a window) when a menu item is selected)
Wm_menuchar = $0120;
When the menu has been activated, the user presses a key (different from the acceleration key) and sends the message to the menu owner;
Wm_enteridle =$ 0121;
When a modal dialog box or menu enters the no-load status, this message is sent to its owner, when a modal dialog box or menu enters the no-load status, it waits for no messages in the queue after processing one or more previous messages.
Wm_menurbuttonup =$ 0122;
Wm_menudrag =$ 0123;
Wm_menugetobject =$ 0124;
Wm_uninitmenupopup =$ 0125;
Wm_menucommand =$ 0126;
Wm_changeuistate = $0127;
Wm_updateuistate =$ 0128;
Wm_queryuistate = $0129;
Wm_ctlcolormsgbox = $0132;
Send the message to the owner window of the message box before drawing a message box in windows, in the owner window, you can set the text and background color of the message box by using the given handle of the display device.
Wm_ctlcoloredit = $0133;
The parent window to which the message is sent when an edit control is to be drawn, in the owner window, you can set the text and background color of the edit box by using the given handle of the display device.
Wm_ctlcolorlistbox =$ 0134;
When a list box control sends this message to its parent window before being drawn; by responding to this message, in the owner window, you can set the text and background colors of the list box by using the given handle of the display device.
Wm_ctlcolorbtn = $0135;
When a button control is to be drawn, this message is sent to its parent window. By responding to this message, in the owner window, you can set the text and background color of the button by using the handle of the specified display device.
Wm_ctlcolordlg =$ 0136;
When a dialog box control sends this message to its parent window before being drawn; by responding to this message, in the owner window, you can set the text background color of the dialog box by using the corresponding display device handle.
Wm_ctlcolorscrollbar = $0137;
When a scroll bar control is to be drawn, this message is sent to its parent window. By responding to this message, the owner window can set the background color of the scroll bar by using the corresponding display device handle.
Wm_ctlcolorstatic =$ 0138;
When a static control is to be drawn, this message is sent to its parent window. By responding to this message, in the owner window, you can set the text and background color of the static control by using the given handle of the display device.
Wm_mousefirst =$ 0200;
Wm_mousemove =$ 0200;
// Move the 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;
// Right-click
Wm_rbuttonup = $0205;
// Right-click release
Wm_rbuttondblclk = $0206;
// Right-click
Wm_mbuttondown = $0207;
// Press the middle mouse button
Wm_mbuttonup =$ 0208;
// Release the middle mouse button
Wm_mbuttondblclk =$ 0209;
// Double-click the middle mouse button
Wm_mousewheel = $ 020a;
This message is sent when the mouse wheel is turned with a focus control
Wm_mouselast = $ 020a;
Wm_parentnotify = $0210;
When the MDI child window is created or destroyed, or the user presses the mouse key and the cursor sends this message to its parent window
Wm_entermenuloop = $0211;
Send this message to the application Program The main window that has entered the menu loop mode
Wm_exitmenuloop =$ 0212;
The notification application's main window that has exited the menu loop mode
Wm_nextmenu = $0213;
Wm_sizing = 532;
When the user is adjusting the window size, send this message to the window; through this message application, you can monitor the window size and position and modify them
Wm_capturealtered = 533;
Send this message to the window when it loses the captured mouse;
Wm_moving = 534;
This message is sent when you move the window. You can use this message application to monitor the window size and position and modify them;
Wm_powerbroadcasting = 536;
This message is sent to the application to notify it of power management events;
Wm_devicechange = 537;
Send this message to the application or device driver when the hardware configuration of the device changes.
Wm_ime_startcomposition = $ 010d;
Wm_ime_endcomposition = $ 010e;
Wm_ime_composition = $ 010f;
Wm_ime_keylast = $ 010f;
Wm_ime_setcontext = $0281;
Wm_ime_policy = $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;
The application sends this message to the customer window of multiple documents to create an MDI subwindow.
Wm_mdidestroy =$ 0221;
The application sends this message to the customer window of multiple documents to close an MDI subwindow.
Wm_mdiactivate =$ 0222;
The application sends this message to the customer window of multiple documents to notify the customer window to activate another MDI subwindow. When the customer window receives this message, it sends the wm_mdiactive message to the MDI subwindow (not activated) activate it;
Wm_mdirestore =$ 0223;
The program sends this message to the MDI customer window so that the sub-window can be restored from the maximum to the original size.
Wm_mdinext =$ 0224;
The program sends this message to the MDI customer window to activate the next or previous window.
Wm_mdimaximize =$ 0225;
The program sends this message to the MDI customer window to maximize an MDI subwindow;
Wm_mditile =$ 0226;
The program sends this message to the MDI customer window to rearrange all MDI child windows in Tiled Mode
Wm_mdicascade = $0227;
The program sends this message to the MDI customer window and rearranges all MDI child windows in cascade mode.
Wm_mdiiconarrange =$ 0228;
The program sends this message to the MDI customer window to rearrange all the minimized MDI child windows.
Wm_mdigetactive = $0229;
The program sends this message to the MDI customer window to find the handle of the activated Child Window.
Wm_mdisetmenu =0230;
The program sends this message to the MDI customer window, replacing the sub-Window Menu With the MDI menu
Wm_entersizemove = $0231;
Wm_exitsizemove =$ 0232;
Wm_dropfiles =$ 0233;
Wm_mdirefreshmenu =0234;
Wm_mousehover = $02a1;
Wm_mouseleave = $02a3;

Wm_cut = $0300;
The program sends this message to an edit box or ComboBox to delete the selected text.
Wm_copy =$ 0301;
The program sends this message to an edit box or ComboBox to copy the selected text to the clipboard.
Wm_paste =$ 0302;
The program sends this message to editcontrol or ComboBox to obtain data from the clipboard.
Wm_clear=$ 0303;
The program sends this message to editcontrol or ComboBox to clear the selected content;
Wm_undo =$ 0304;
The program sends this message to editcontrol or ComboBox to cancel the last operation.
Wm_renderformat = $0305;

Wm_renderallformats = $0306;
Wm_destroyclipboard =$ 0307;
This message is sent to the clipboard owner when the enptyclipboard function is called.
Wm_drawclipboard =$ 0308;
This message is sent to the first window of the clipboard observation chain when the content of the clipboard changes; it allows the clipboard observation window
Display the new content of the clipboard;
Wm_paintclipboard =$ 0309;
When the Clipboard contains data in the cf_ownerdiplay format and the client area of the clipboard observation window needs to be re-painted;
Wm_vscrollclipboard = $ 030a;
Wm_sizeclipboard = $ 030b;
When the Clipboard contains data in the cf_ownerdiplay format and the size of the client area in the clipboard observation window has changed, the message is sent to the clipboard owner through the clipboard observation window;
Wm_askcbformatname = $ 030c;
Send this message to the clipboard owner in the clipboard observation window to request the name of the clipboard in cf_ownerdisplay format.
Wm_changecbchain = $ 030d;
Send this message to the first window of the clipboard observation chain when a window is moved from the clipboard observation chain;
Wm_hscrollclipboard = $ 030e;
This message is sent to the clipboard owner through a clipboard observation window; it occurs when the Clipboard contains data in the cfownerdispaly format and an event is on the horizontal scroll bar of the clipboard observation window; the owner should scroll the clipboard image and update the value of the scroll bar;
Wm_querynewpalette = $ 030f;
This message is sent to the window that will receive the focus, which gives the window the opportunity to implement its logical palette when receiving the focus.
Wm_paletteischanging =$ 0310;
This message notifies all applications when an application is about to implement its logical palette
Wm_palettechanged = $0311;
This message is sent to all top-level and overlapping windows after implementing its logical palette in a window with focus to change the system palette.
Wm_hotkey =$ 0312;
This message is submitted when you press the hotkey registered by the registerhotkey function.
Wm_print = 791;
The application sends this message only when Windows or other applications send a request requesting to draw a part of an application;
Wm_prints client = 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 program submits this message and starts a session with the server program to respond to the specified program and topic name;
Wm_dde_terminate = wm_dde_first + 1;
A dde application (whether a client or server) submits this message to terminate a session;
Wm_dde_advise = wm_dde_first + 2;
A dde client program submits this message to a DDE Service Program to request the server to update the data whenever the data item changes.
Wm_dde_unadvise = wm_dde_first + 3;
A dde client notifies a DDE Service Program through this message that it does not update a specified item or an item in a special clipboard format.
Wm_dde_ack = wm_dde_first + 4;
This message notifies a DDE (Dynamic Data Exchange) program that it has received and is processing wm_dde_poke, wm_dde_execute, wm_dde_data, wm_dde_advise, wm_dde_unadvise, or wm_dde_initiat messages
Wm_dde_data = wm_dde_first + 5;
A dde Service Program submits this message to the DDE client program to transmit a data item to the customer or to notify the customer of an available data item.
Wm_dde_request = wm_dde_first + 6;
A dde client program submits this message to a DDE Service Program to request the value of a data item;
Wm_dde_poke = wm_dde_first + 7;
A dde client program submits the message to a DDE Service Program. The client uses the message to request the server to receive an unapproved data item. The server replies to the wm_dde_ack message to indicate whether the server receives the data item;
Wm_dde_execute = wm_dde_first + 8;
A dde client program submits this message to a DDE Service Program to send a string to the server for processing like a serial command. The server responds by submitting a wm_dde_ack message;
Wm_dde_last = wm_dde_first + 8;
Wm_app =$ 8000;
Wm_user =$ 0400;
This message can help the application customize private messages;
//////////////////////////////////////// /////////////////////////////
A notification message refers to a message in which a child control in a window has something to notify the parent window. The notification message is only applicable to standard window controls such as buttons, list boxes, Combo boxes, and edit boxes, as well as Windows 95 public controls such as tree views and list views. For example, clicking or double-clicking a control, selecting some text in the control, and the scroll bar of the operation control will generate a notification message.
Button
B n _ c l I C K e d // The user clicked the button.
B n _ d I s a B L E // The button is disabled.
B n _ d o u B l e c l I C K e d // double-click the button.
B n _ h I l I t E // The button is highlighted by the user
Button B n _ Pa I n t should be repainted
B n _ u n h I L I t e should be removed
Combo box
The list box of the c B N _ c l o s e u p combo box is closed.
C B n _ d B L C L K the user double-clicked a string
The list box of the c B N _ D R o p D O W n combo box is pulled out.
C B n _ e d I t C H a N G E user modified the text in the edit box
The text in the c B n _ e d I t u p D at E edit box is about to be updated.
C B n _ E R S PA C E combo has insufficient memory
C B n _ k I l f o c u s combo box loses the input focus
C B n _ S E L C H a N G E select
C B n _ s e l e n d C A N C E L user selection should be canceled
C B n _ s e l e n d o K user selection is legal
C B n _ s e t f o c u s combo box to get the input focus
Edit box
The text in the e n _ c h a n g e edit box has been updated.
Insufficient memory in the e n _ e r s pa c e edit box
E n _ h s c r o l the user clicks the horizontal scroll bar
The e n _ k I l f o c u s editing box is losing the input focus.
Content inserted by e n _ m a X t e x T is truncated.
E n _ s e t f o c u s edit box to get the input focus
The text in the e n _ u p D at E edit box will be updated
E n _ v s c r o l the message meaning of the vertical scroll bar clicked by the user
List box
L B n _ d B L C L K the user double-clicked an item
L B N _ E R S PA C E list box with insufficient memory
L B n _ k I l f o c u s list box is losing the input focus
L B N _ S E L C A N C E L selected to be canceled
L B N _ S E L C H a n g e selected another item
L B N _ s e t f o c u s list box to obtain the input focus

There are 4294967295 in total.

Note:
The sendmessage API sends messages to the window control with the address of the available handle on a daily basis.

VB statement

Private declare function sendmessage lib "USER32" aliad "sendmessagea "-
(Byval hwnd as long, byval wmsg as long ,-
Byval wparam as long, lparam as any) as long

Parameters
Parameter description
Handle of the window to which the hwnd message is sent.
Message to be sent by wmsg.
The usage of wparam is determined by the message sent.
The usage of lparam depends on the message sent.

Note
Before returning control to the application, the sendmessage API waits for its view to process the message.

Example
The following example shows how to use the wm_settext message to set the title of the VB form.
Private sub commandementclick ()
Dim RC as long
Dim cap as string
CAP = "sent text" & CHR $ (0)
Rc = sendmessage (hwnd, wm_settext, 0, byval cap)
End sub


2007-6-8 8:42:00

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.