Page 1 of 2
MessageRequester bug
Posted: Thu Apr 17, 2025 10:29 pm
by tua
Code: Select all
If MessageRequester("Title", "Press a button!", #PB_MessageRequester_YesNo) = #PB_MessageRequester_Yes
Debug "Yes"
Else
Debug "No"
EndIf
Pressing the [X] button from the system menu in the caption bar results in no visible action, when it should close the dialog, as it does in all Windows applications known to mankind.
Re: MessageRequester bug
Posted: Thu Apr 17, 2025 10:52 pm
by kenmo
YesNo forces the user to select Yes or No, you can use YesNoCancel instead to allow canceling out of it.
Re: MessageRequester bug
Posted: Thu Apr 17, 2025 11:25 pm
by BarryG
tua wrote: Thu Apr 17, 2025 10:29 pmPressing the [X] button from the system menu in the caption bar results in no visible action
How are you doing that when the [X] isn't even enabled? Or is that your point? Regardless, this is not a bug.
tua wrote: Thu Apr 17, 2025 10:29 pmas it does in all Windows applications known to mankind
Not true. Any app that uses the system Yes/No dialog (not a custom one) will have the [X] disabled.
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 1:18 am
by tua
It's certainly enabled on my setup - precisely why I filed this ... Win 11 Pro, latest beta
The state of the Close button in the system menu (caption bar) of a message dialog in Windows 11 depends on how the dialog is configured by the application or system.
Typically, the Close button is active unless one of the following applies:
Dialog Type: Some system modal dialogs, such as critical system alerts or confirmation dialogs, disable the Close button to ensure the user addresses the dialog content explicitly.
Window Style Flags: Developers can set specific window style flags (like WS_SYSMENU for having a system menu or WS_DISABLED to disable user interaction) in the dialog's creation process. Omitting or disabling these features can make the Close button inactive.
Custom Behavior: Applications might use event handling to override the functionality or state of the Close button, preventing it from working even when it's visible.
Thus, if the button is active, it should close the dialog - which it does NOT. I stand by my bug classification.
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 3:31 am
by DeanH
I have both Win 10 and 11 systems. Win 11 is 23H2.
Both behave the same for me, the way BarryG describes.
With #PB_MessageRequesterYesNo the cross is grey and inactive.
With #PB_MessageRequesterYesNoCancel the cross is active and returns a Cancel.
Could it be something to do with 24H2? Or maybe a setting somewhere? I'm not cluey enough but what I am seeing does not match what you have shown.
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 4:36 am
by BarryG
DeanH wrote: Fri Apr 18, 2025 3:31 amCould it be something to do with 24H2?
Yes - it is. I just tried Win 11 Pro (24H2) now and I get the same red [X] when I hover over it.
@tua: Please include your OS and PureBasic version in future reports, so we know what to test with. I initially tested with Win 10.
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 7:59 am
by Fred
The raw API call does the same here, can you confirm ?
Code: Select all
MessageBox_(0, "Hello", "World", #MB_YESNO)
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 8:32 am
by Little John
Confirmed with PB 6.21 beta 5 (x64) on Windows 11 Pro 24H2.
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 8:57 am
by Lord
Both snippets show the same result:
Close button turns red when hovered on over the button.
A click doesn't take any action.
Both Boxes only resonses to "Yes" or "No".
Win11pro 24H2, (still) PB v6.20(x64)
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 10:08 am
by Fred
Thanks so it seems to be a Windows 22H4 issue
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 10:55 am
by BarryG
It's definitely a Win 11 (24H2) issue. The raw API code you gave shows a red [X] when hovered over it, but not on Win 10.
So not a PureBasic bug after all.
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 11:04 am
by Quin
Can confirm that it's 24H2 only, can also get it to happen on IoT 2024, based on 24H2.
Oh Microsoft...thanks for being consistently inconsistent.
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 3:10 pm
by Piero
Wish I could post a sarcastic comment, but I'm scared by macos sequoia
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 3:17 pm
by Quin
Piero wrote: Fri Apr 18, 2025 3:10 pm
Wish I could post a sarcastic comment, but I'm scared by macos sequoia
After the mess that is System Settings and modern VoiceOver, all the big companies have some weirdness on their plate:D
Re: MessageRequester bug
Posted: Fri Apr 18, 2025 3:44 pm
by Little John
Piero wrote: Fri Apr 18, 2025 3:10 pm
Wish I could post a sarcastic comment, but I'm scared by macos sequoia
If you have nothing to say on topic, why don't you just shut up?
