🏁 support defaultId for dialog boxes on Windows

This commit is contained in:
leethomas 2016-01-10 15:55:26 -08:00
parent ae5c6add11
commit 803b06b7de

View file

@ -88,6 +88,7 @@ int ShowMessageBoxUTF16(HWND parent,
config.hwndParent = parent;
config.hInstance = GetModuleHandle(NULL);
config.dwFlags = flags;
config.nDefaultButton = default_id ? (kIDStart + default_id) : 0;
// TaskDialogIndirect doesn't allow empty name, if we set empty title it
// will show "electron.exe" in title.