winappdbg.win32.user32

Wrapper for user32.dll in ctypes.

class winappdbg.win32.user32.GUITHREADINFO
winappdbg.win32.user32.LPGUITHREADINFO

alias of LP_GUITHREADINFO

winappdbg.win32.user32.LPWINDOWPLACEMENT

alias of LP_WINDOWPLACEMENT

winappdbg.win32.user32.MAKE_LPARAM(lParam)

Convert arguments to the LPARAM type. Used automatically by SendMessage, PostMessage, etc. You shouldn’t need to call this function.

winappdbg.win32.user32.MAKE_WPARAM(wParam)

Convert arguments to the WPARAM type. Used automatically by SendMessage, PostMessage, etc. You shouldn’t need to call this function.

winappdbg.win32.user32.PGUITHREADINFO

alias of LP_GUITHREADINFO

winappdbg.win32.user32.PWINDOWPLACEMENT

alias of LP_WINDOWPLACEMENT

class winappdbg.win32.user32.Point(x=0, y=0)

Python wrapper over the POINT class.

Variables:
  • x – Horizontal coordinate

  • y – Vertical coordinate

client_to_screen(hWnd)

Translates window client coordinates to screen coordinates.

Parameters:

hWnd (int or HWND or system.Window) – Window handle.

Return type:

Point

Returns:

New object containing the translated coordinates.

screen_to_client(hWnd)

Translates window screen coordinates to client coordinates.

Parameters:

hWnd (int or HWND or system.Window) – Window handle.

Return type:

Point

Returns:

New object containing the translated coordinates.

translate(hWndFrom=0, hWndTo=0)

Translate coordinates from one window to another.

Note

To translate multiple points it’s more efficient to use the MapWindowPoints() function instead.

Parameters:
  • hWndFrom (int or HWND or system.Window) – Window handle to translate from. Use HWND_DESKTOP for screen coordinates.

  • hWndTo (int or HWND or system.Window) – Window handle to translate to. Use HWND_DESKTOP for screen coordinates.

Return type:

Point

Returns:

New object containing the translated coordinates.

class winappdbg.win32.user32.Rect(left=0, top=0, right=0, bottom=0)

Python wrapper over the RECT class.

Variables:
  • left – Horizontal coordinate for the top left corner.

  • top – Vertical coordinate for the top left corner.

  • right – Horizontal coordinate for the bottom right corner.

  • bottom – Vertical coordinate for the bottom right corner.

  • width – Width in pixels. Same as right - left.

  • height – Height in pixels. Same as bottom - top.

client_to_screen(hWnd)

Translates window client coordinates to screen coordinates.

Parameters:

hWnd (int or HWND or system.Window) – Window handle.

Return type:

Rect

Returns:

New object containing the translated coordinates.

screen_to_client(hWnd)

Translates window screen coordinates to client coordinates.

Parameters:

hWnd (int or HWND or system.Window) – Window handle.

Return type:

Rect

Returns:

New object containing the translated coordinates.

translate(hWndFrom=0, hWndTo=0)

Translate coordinates from one window to another.

Note

To translate multiple points it’s more efficient to use the MapWindowPoints() function instead.

Parameters:
  • hWndFrom (int or HWND or system.Window) – Window handle to translate from. Use HWND_DESKTOP for screen coordinates.

  • hWndTo (int or HWND or system.Window) – Window handle to translate to. Use HWND_DESKTOP for screen coordinates.

Return type:

Rect

Returns:

New object containing the translated coordinates.

class winappdbg.win32.user32.WINDOWPLACEMENT
class winappdbg.win32.user32.WindowPlacement(wp=None)

Python wrapper over the WINDOWPLACEMENT class.