---
name: "d_slider_proc"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/d_slider_proc"
---

# d\_slider\_proc(3alleg)

Dialog procedure implementing a slider control object. Allegro game programming library.

## NAME

d\_slider\_proc - Dialog procedure implementing a slider control object. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int d\_slider\_proc(int msg, DIALOG \*d, int c);**

## DESCRIPTION

A slider control object. This object holds a value in d2, in the range  from 0 to d1. It will display as a vertical slider if h is greater than  or equal to w, otherwise it will display as a horizontal slider. The dp  field can contain an optional bitmap to use for the slider handle, and  dp2 can contain an optional callback function, which is called each time  d2 changes. The callback function should have the following prototype:

```
   int function(void *dp3, int d2);
```

The d\_slider\_proc object will return the value of the callback function.

## SEE ALSO

[**exgui**(3alleg)](/exgui/3alleg.md), [**exrgbhsv**(3alleg)](/exrgbhsv/3alleg.md)
