windows/user32

Windows User32 declarations for window creation, class registration, message dispatch, monitor and placement queries, cursor and capture control, device-context acquisition, and pointer-sized window-value access.


Declared schemas

Schema example

"windows/user32" use
"control" use

{} () {} [
  POINT fieldCount printStack _:;
  RECT 3 fieldName printStack _:;
  MSG 5 fieldName printStack _:;
] "main" exportFunction

Expected Output During Compilation

2
"bottom"
"pt"

Arguments and result conventions


Message and window workflow


Window lifecycle and ownership


Imported functions


Window-value access


Signature examples

Printing imported names during compilation shows the exact imported signatures. The printed window-value access signature already reflects the pointer-sized public name selected for the target.

"windows/user32" use
"control" use

{} Int32 {} [
  @CreateWindowExW printStack _:;
  @GetWindowLongPtrW printStack _:;
  @GetDC printStack _:;
  0
] "main" exportFunction

Expected Output During Compilation

{dwExStyle: Nat32; lpClassName: Natx; lpWindowName: Natx; dwStyle: Nat32; X: Int32; Y: Int32; nWidth: Int32; nHeight: Int32; hWndParent: {WND: (); unused: Int32;} Cref; hMenu: {MENU: (); unused: Int32;} Cref; hInstance: {INSTANCE: (); unused: Int32;} Cref; lpParam: Natx;} {WND: (); unused: Int32;} Cref {convention: "";} codeRef
{hWnd: {WND: (); unused: Int32;} Cref; nIndex: Int32;} Intx {convention: "";} codeRef
{hWnd: {WND: (); unused: Int32;} Cref;} {DC: (); unused: Int32;} Cref {convention: "";} codeRef

See also