Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinQueryDlgItemShort (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINDIALOGS
BOOL WinQueryDlgItemShort(hwndDlg, idItem, pResult, fSigned)
HWND hwndDlg; /* handle of the dialog box */
USHORT idItem; /* dialog-item identifier */
PSHORT pResult; /* address of variable for result */
BOOL fSigned; /* signed/unsigned flag */
The WinQueryDlgItemShort function translates the text of a dialog item into
an integer value. This function is useful in translating a numerical input
field into a numeric value for further processing.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwndDlg Identifies a dialog-box window.
idItem Identifies the dialog item whose text is translated. The
dialog-item text is assumed to be an ASCII string.
pResult Points to the integer value resulting from the translation.
fSigned Specifies whether the item text is treated as signed or unsigned.
If this parameter is TRUE, the item text is treated as signed, in
which case the translation checks for a minus sign in the text.
If it is FALSE, the item text is treated as unsigned.
Return Value
The return value is TRUE if the function is successful or FALSE if an error
occurs.
Comments
If the text string does not contain a valid representation of a number, as
in "size," or "-3" when fSigned is FALSE, then the return value will be
FALSE.
See Also
WinSetDlgItemShort
♦