get_child_integer


unsigned get_child_integer(handle window,
                           unsigned identity,
                           bool* translated,
                           bool is_signed)

This function returns the integer equivalent of numeric text contained in a child window.

Parameters

handle window

The handle of the parent window.

unsigned identity

The identity of the child being queried.

bool* translated

A pointer to a variable that is updated to be true when the function succeeded and false otherwise. If this pointer is null, no such information is returned.

bool is_signed

true The text within the window is treated as signed.
false The text within the window is treated as unsigned.

Return

unsigned

The translated integer value of the child window text. When being treated as a signed integer, the returned value should be cast to type int.

Notes

The text of the child window is obtained via sending message::get_text. The retrieved text is modified by stripping leading spaces and converting the decimal digits. Translation is halted upon reaching the end of the text or a non-numeric character.

When returning a signed integer (is_signed is true), a check is made for a minus sign (-) at the beginning of the text; otherwise, an unsigned integer value is created and no such check is made.

Zero is returned if the translated value is: