cPostMessage

The real PostMessage (or PostMessageA if you want to get nitpicky).

Syntax:

cPostMessage(hWnd, msg, wparam, lparam)

Parameters:

(i) hWnd Window handle

(i) msg Message number

(i) wparam First message parameter

(i) lparam Second message parameter (must be numeric)

Returns:

(i) The value returned by the Windows "PostMessage" function.

 

This function is designed to allow sophisticated users to access the Windows API "PostMessage" function directly. cPostMessage calls the Windows API "PostMessage" function with the specified parameters and sends the specified message to the given window.

 

Example:

AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
Run("notepad.exe","")
SendMenusTo("~Notepad","FileOpen")
WinWaitExist("Open",5)
openwnd=DllHwnd("Open")
editwnd=cWndbyid(openwnd,1152)
mask=cSetEditText(editwnd, "*.*")
openbutton=cWndbyname(openwnd,"Open")
;cClickButton(openbutton) ;We will emulate a cClickButton using
; a PostMessage instead of the built in SendMessage the
; function actually uses
cPostMessage(openbutton,245,0,0) ; 245 == BM_CLICKED
Message("Open file mask changed to *.*","and Open button clicked.")
Exit

See Also:

IntControl 22 (WIL help file)