This function retrieves the title or text associated with a control in a dialog box.
UINT GetDlgItemText( HWND hDlg, int nIDDlgItem, LPTSTR lpString, int nMaxCount );
[in] Handle to the dialog box that contains the control.
[in] Specifies the identifier of the control whose title or text is to be retrieved.
[out] Long pointer to the buffer to receive the title or text.
[in] Specifies the maximum length, in characters, of the string to be copied to the buffer pointed to by lpString. If the length of the string exceeds the limit, the string is truncated.
The number of characters copied to the buffer, not including the terminating null character, indicates success. Zero indicates failure. To get extended error information, call GetLastError.