Easy language calls Windows message functions

Source: Internet
Author: User

1, Sendmessagecallbacka method of invocation

. Version 2. DLL commands send a message back _, Integer, "user32.dll", "Sendmessagecallbacka", Sendmessagecallback, the function that is most specific is can be returned immediately. When the target window function finishes executing, the result is returned in the form of a callback function Long,true indicates success, and False indicates failure.    The GetLastError is set. parameter window handle, integer type, hwnd, handle to the window to receive the message. Parameter message identifier, integer type, wmsg, message identifier. parameter message 1, Integer,, WParam, depending on message . The parameter message 2, Integer,, LParam, depends on the message. The parameter specifies the function address, integer type, lpresultcallback, specifying the function address. Available in VB5 with the AddressOf operator. Parameter custom value, integer type, dwdata, user-defined value 2, Sendnotifymessagea call method
. Version 2

. The DLL command sends a notification message _, Integer type, "User32.dll", "Sendnotifymessagea", and sendnotifymessage, sending a message to the window. If the target window is within the same thread as the caller, the function will behave as a sendmessage function. And the function does not return unless the message is processed. If the target window is subordinate to a different thread, the function immediately returns long,true to indicate success, and false to indicate an error. Will set GetLastError
. parameter window handle, integer type, hwnd, handle of a window used to receive messages
. parameter identifier, integer type, wmsg, identifier of the message
. parameter message 1, Integer,, WParam, determined by message
. parameter message 2, Integer,, LParam, determined by message
3, Sendmessagetimeouta method of invocation
. Version 2

. DLL command synchronously sends a message _, Integer, "user32.dll", "Sendmessagetimeouta", Sendmessagetimeout,long, returns true on success, and false on failure. Will set GetLastError
. parameter window handle, integer type, hwnd, handle of a window to receive messages
. parameter identifier, integer type, MSG, identifier of the message
. parameter message 1, integer type, wparam, determined by message
. parameter message 2, integer type, lparam, determined by message
. parameter type, integer type, fuflags, one or more Smto_abortifhung of the following constants, as the target process hangs, the function immediately returns
. parameter timeout, integer,, Utimeout, time-out value, in milliseconds
. parameter result, integer type, lpdwresult, a variable used to load the function result

Easy language calls Windows message functions

Related Article

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.