GetDlgItem function Null safety user32

int GetDlgItem(
  1. int hDlg,
  2. int nIDDlgItem
)

Retrieves a handle to a control in the specified dialog box.

HWND GetDlgItem(
  HWND hDlg,
  int  nIDDlgItem
);

Implementation

int GetDlgItem(int hDlg, int nIDDlgItem) {
  final _GetDlgItem = _user32.lookupFunction<
      IntPtr Function(IntPtr hDlg, Int32 nIDDlgItem),
      int Function(int hDlg, int nIDDlgItem)>('GetDlgItem');
  return _GetDlgItem(hDlg, nIDDlgItem);
}