GetDlgItemInt
The GetDlgItemInt function translates the text of a specified control in a dialog box into an integer value.
UINT GetDlgItemInt(
HWND hDlg, // handle to dialog box
int nIDDlgItem, // control identifier
BOOL* lpTranslated, // points to var to rec. suc/failr indicator
BOOL bSigned // specifies whether value is un/-signed
);
Returns
If the function succeeds, the variable pointed to by lpTranslated is set to TRUE, and the
return value is the translated value of the control text.
If the function fails, the variable pointed to by lpTranslated is set to FALSE, and the
return value is zero. Note that, since zero is a possible translated value, a return
value of zero does not by itself indicate failure.
If lpTranslated is NULL, the function returns no information about success or failure.
If the bSigned parameter is TRUE, specifying that the value to be retrieved is a signed
integer value, cast the return value to an int type.
|
GetDlgItemText / GetDlgItemTextA / GetDlgItemTextW
The GetDlgItemText function retrieves the title or text associated with a control in a
dialog box.
UINT GetDlgItemText(
HWND hDlg, // handle of dialog box
int nIDDlgItem, // identifier of control
LPTSTR lpString, // address of buffer for text
int nMaxCount // maximum size of string
);
Returns
If the function succeeds, the return value specifies the number of characters copied
to the buffer, not including the terminating null character.
If the function fails, the return value is zero.
|
GetWindowLong / GetWindowLongA / GetWindowLongW
The GetWindowLong function retrieves information about the specified window. The function
also retrieves the 32-bit (long) value at the specified offset into the extra window
memory of a window.
LONG GetWindowLong(
HWND hWnd, // handle of window
int nIndex // offset of value to retrieve
);
Returns
If the function succeeds, the return value is the requested 32-bit value.
If the function fails, the return value is zero. To get extended error information, call
GetLastError.
|
GetWindowText / GetWindowTextA
The GetWindowText function copies the text of the specified window's title bar
(if it has one) into a buffer. If the specified window is a control, the text
of the control is copied.
int GetWindowText(
HWND hWnd, // handle of window or control with text
LPTSTR lpString, // address of buffer for text
int nMaxCount // maximum number of characters to copy
);
Returns
If the function succeeds, the return value is the length, in characters, of the copied
string, not including the terminating null character. If the window has no title bar or
text, if the title bar is empty, or if the window or control handle is invalid, the
return value is zero. To get extended error information, call GetLastError.
This function cannot retrieve the text of an edit control in another application.
|
GetWindowWord
The GetWindowWord function retrieves a 16-bit (word) value at the specified offset into
the extra window memory for the specified window.
WORD GetWindowWord(
HWND hWnd, // handle of window
int nIndex // offset of value to retrieve
);
Returns
If the function succeeds, the return value is the requested 16-bit value.
If the function fails, the return value is zero. To get extended error information,
call GetLastError.
|
SendDlgItemMessage / SendDlgItemMessageA / SendDlgItemMessageW
The SendDlgItemMessage function sends a message to the specified control in a dialog box.
LONG SendDlgItemMessage(
HWND hwndDlg, // handle of dialog box
int idControl, // identifier of control
UINT uMsg, // message to send
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
Returns
The return value specifies the result of the message processing and depends on the message
sent.
|
|