From ff4da9cac3901ed398bc95d23d12517e964fa011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Tue, 8 Sep 2026 23:52:12 +0200 Subject: [PATCH] GetDlgItem reports no control instead of panicking Dialog boxes are stubbed out, so a program asking for one of their controls gets a null HWND and a warning, the way the other dialog stubs answer, rather than a panic. Co-Authored-By: Claude Fable 5.1 --- win32/winapi/src/user32/dialog.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win32/winapi/src/user32/dialog.rs b/win32/winapi/src/user32/dialog.rs index a93cd68d..6b3eb1d1 100644 --- a/win32/winapi/src/user32/dialog.rs +++ b/win32/winapi/src/user32/dialog.rs @@ -63,7 +63,9 @@ pub fn IsDlgButtonChecked(_ctx: &mut Context, _hDlg: HWND, _nIDButton: i32) -> u #[win32_derive::dllexport] pub fn GetDlgItem(_ctx: &mut Context, _hDlg: HWND, _nIDDlgItem: i32) -> HWND { - todo!() + // Dialog boxes are stubbed out (see DialogBoxParamA), so there are no + // controls to find. + stub!(HWND::null()) } #[win32_derive::dllexport]