---
name: "GetHWND"
section: "3"
platform: "macos"
package: "tcl"
version: "152"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/GetHWND"
---

# GetHWND(3)

manage interactions between the Windows handle and an X window

## NAME

Tk\_GetHWND, Tk\_AttachHWND - manage interactions between the Windows handle and an X window

## SYNOPSIS

```
#include <tkPlatDecls.h>

HWND
Tk_GetHWND(window)

Window
Tk_AttachHWND(tkwin, hwnd)
```

## ARGUMENTS

X token for window. Tk window for window. Windows HWND for window.

## DESCRIPTION

**Tk\_GetHWND** returns the Windows HWND identifier for X Windows window given by *window*.

**Tk\_AttachHWND** binds the Windows HWND identifier to the specified Tk\_Window given by *tkwin*. It returns an X Windows window that encapsulates the HWND.

## KEYWORDS

identifier, window
