PythonWin event handling args?

Mark Hammond MarkH at ActiveState.com
Tue Nov 27 22:26:15 EST 2001


Keith Farmer wrote:

> What are the contents of the params argument in a PythonWin event handler?
> 
> Example:
>     def on_size (self, params):
>         lparam = params[3]
>         w = win32api.LOWORD(lparam)
>         h = win32api.HIWORD(lparam)
>         self.GetDlgItem (win32ui.IDC_LIST1).MoveWindow((0,0,w,h))
> 
> lparam I recognize, but what are the other elements of params?


It is a tuple representing a Win32 MSG structure:

typedef struct tagMSG {     // msg
     HWND   hwnd;
     UINT   message;
     WPARAM wParam;
     LPARAM lParam;
     DWORD  time;
     POINT  pt;
} MSG;

Mark.




More information about the Python-list mailing list