SetDlgItemText function user32

Win32Result<bool> SetDlgItemText(
  1. HWND hDlg,
  2. int nIDDlgItem,
  3. PCWSTR lpString
)

Sets the title or text of a control in a dialog box.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-setdlgitemtextw.

Implementation

Win32Result<bool> SetDlgItemText(HWND hDlg, int nIDDlgItem, PCWSTR lpString) {
  final result_ = SetDlgItemTextW_Wrapper(hDlg, nIDDlgItem, lpString);
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}