---
name: "SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE"
---

# SDL\_HINT\_WINDOWS\_ERASE\_BACKGROUND\_MODE(3)

A variable controlling whether SDL will clear the window contents when the WM\_ERASEBKGND message is received.

## NAME

SDL\_HINT\_WINDOWS\_ERASE\_BACKGROUND\_MODE - A variable controlling whether SDL will clear the window contents when the WM\_ERASEBKGND message is received.

## HEADER FILE

Defined in SDL3/SDL\_hints.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**#define SDL\_HINT\_WINDOWS\_ERASE\_BACKGROUND\_MODE** *SDL\_WINDOWS\_ERASE\_BACKGROUND\_MODE"*

## DESCRIPTION

The variable can be set to the following values:

• "0"/"never": Never clear the window.

• "1"/"initial": Clear the window when the first WM\_ERASEBKGND event fires.\
   (default)

• "2"/"always": Clear the window on every WM\_ERASEBKGND event.

This hint should be set before creating a window.

## AVAILABILITY

This hint is available since SDL 3.2.0.
