---
name: "object_message"
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/object_message"
---

# object\_message(3alleg)

Sends a message to an object and returns the answer. Allegro game programming library.

## NAME

object\_message - Sends a message to an object and returns the answer. Allegro game programming library.

## SYNOPSIS

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

**int object\_message(DIALOG \*dialog, int msg, int c);**

## DESCRIPTION

Sends a message to an object and returns the answer it has generated. Remember that the first parameter is the dialog object (not a whole array) that you wish to send the message to. For example, to make the second object in a dialog draw itself, you might write:

```
   object_message(&dialog[1], MSG_DRAW, 0);
```

The function will take care of scaring and unscaring the mouse if the message is MSG\_DRAW.

## SEE ALSO

[**dialog\_message**(3alleg)](/dialog_message/3alleg.md), [**scare\_mouse**(3alleg)](/scare_mouse/3alleg.md), [**scare\_mouse\_area**(3alleg)](/scare_mouse_area/3alleg.md), [**unscare\_mouse**(3alleg)](/unscare_mouse/3alleg.md), [**excustom**(3alleg)](/excustom/3alleg.md), [**exrgbhsv**(3alleg)](/exrgbhsv/3alleg.md)
