Sending or posting a Windows messageΒΆ

send_message()

Send a Windows message

post_message()

Post a Windows message


SYNTAX

send_message(hwin, msg, wparam, lparam)

post_message(hwin, msg, wparam, lparam)

These advanced functions are for the purpose of sending standard Windows messages to C programs, and are therefore not relevant to programmers who develop only in Sculptor. They have no effect if executed on UNIX and Linux versions of Sculptor.

hwin

The handle to a window returned by the Windows CreateWindow() function. The handle could be supplied in a file or in a shared memory segment. This value can be saved in an i4 field.

MSG

A Windows API message code. These are defined by Microsoft and have the prefix WM_.

wparam

An i2 value as required by the particular message code.

lparam

An i4 value as required by the particular message code.

The return value from send_message() is an i4 value specifying the result of the message processing. It varies according to the message sent.

The return value from post_message() is non-zero if successful or zero if it fails. The function only fails if an argument is not valid. A precise error code is available in Windows.

See the documentation for these functions in the Windows API for more information.


RELATED TOPICS

create_shared_memory()

create_msg queue()