[python-win32] win32gui.PostMessage(hwnd, win32con.WM_CLOSE, 0, 0) - What are the last two Parameters?

Gregory Piñero gregpinero at gmail.com
Thu Aug 3 18:34:16 CEST 2006


On 8/3/06, Simon Brunning <simon at brunningonline.net> wrote:
> Much of the win32 stuff fairly thinly wraps the Windows API, so MSDN
> is often a good place to look. For example:
> <http://tinyurl.com/m8yrj>.

Thanks Simon that worked!

FYI, future readers the answer is that those two parameters are
message specific and for wm_close they don't do anything.  Probably
just search for your message on MSDN to find out what the parameters
are for other messages:

WM_CLOSE Notification

The WM_CLOSE message is sent as a signal that a window or an
application should terminate.

A window receives this message through its WindowProc function.

Syntax

WM_CLOSE

    WPARAM wParam
    LPARAM lParam;

Parameters

    wParam
        This parameter is not used.
    lParam
        This parameter is not used.

Return Value

    If an application processes this message, it should return zero.

Greg


More information about the Python-win32 mailing list