http://bugs.winehq.org/show_bug.cgi?id=11657
Summary: Problems with MessageBox API Product: Wine Version: 0.9.55. Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: lightning_uk@imgburn.com
Created an attachment (id=10859) --> (http://bugs.winehq.org/attachment.cgi?id=10859) Screenshots
When using the 'MessageBox' API, wine doesn't handle the flag 'MB_CANCELTRYCONTINUE' correctly.
It ends up displaying every button possible rather than just...
'Cancel', 'Try Again', 'Continue'.
Also, when using MB_RETRYCANCEL it puts the two buttons like this...
'Cancel', 'Retry'.
rather than...
'Retry', 'Cancel'
Screenshots of both issues have been attached.
There may be other inconsistencies, I've not tried them all.
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #1 from Lei Zhang thestig@google.com 2008-02-22 14:00:03 --- What application(s) does this affect?
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #2 from LIGHTNING UK! lightning_uk@imgburn.com 2008-02-22 14:47:38 --- Well my program - ImgBurn - calls the MessageBox API with both those flags at one point or another. Obviously this isn't application specific though.
Those screenshots were taken having just done this quickly in code to test wine's handling of it (because I'd noticed it earlier on when I was doing something else)...
MessageBox(NULL, "Bug in wine?", "ImgBurn", MB_CANCELTRYCONTINUE);
and
MessageBox(NULL, "Bug in wine?", "ImgBurn", MB_RETRYCANCEL);
http://bugs.winehq.org/show_bug.cgi?id=11657
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine-bugs@winehq.org, | |us@edmeades.me.uk AssignedTo|wine-bugs@winehq.org |us@edmeades.me.uk Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #3 from Jason Edmeades us@edmeades.me.uk 2008-03-07 15:53:34 --- Confirmed
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #4 from Jason Edmeades us@edmeades.me.uk 2008-03-07 17:21:17 --- Created an attachment (id=11184) --> (http://bugs.winehq.org/attachment.cgi?id=11184) Patch
Should fix this - please test
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #5 from Jason Edmeades us@edmeades.me.uk 2008-03-07 17:21:48 --- Created an attachment (id=11185) --> (http://bugs.winehq.org/attachment.cgi?id=11185) Sample C pgm for testing
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2008-03-08 02:10:50 ---
- /* Index the order the buttons need to appear to an ID* constant */
- static int buttonOrder[10] = { 6, 7, 1, 3, 4, 2, 5, 10, 11, 9 };
Should be 'const'
- for (i=1; i < 12; i++)
/* No button 8 (Close) */
if (i != 8) {
SendDlgItemMessageW (hwnd, i, WM_SETFONT, (WPARAM)hFont, 0);
}
- for (buttons = 0, i = 1; i < 8; i++)
- for (buttons = 0, i = 1; i < 12; i++) {
if (i == 8) continue; /* No CLOSE button */
What's so special about Close button?
- for (buttons = i = 0; i < (sizeof(buttonOrder) / sizeof(int)); i++) {
Should be 'sizeof(buttonOrder) / sizeof(buttonOrder[0])'
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #7 from Jason Edmeades us@edmeades.me.uk 2008-03-08 08:17:15 ---
Should be 'const' Should be 'sizeof(buttonOrder) / sizeof(buttonOrder[0])'
Thanks
What's so special about Close button?
I cant see a way for the API to provide such a button! Its got an ID value in the range used for the other buttons, but we dont need a close button - hence its skipped.
Thanks - I'll make the changes and submit as soon as I get a chance
http://bugs.winehq.org/show_bug.cgi?id=11657
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, testcase
--- Comment #8 from Austin English austinenglish@gmail.com 2008-06-09 14:20:10 --- Is this still an issue in current (1.0-rc4 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=11657
johne53 johne53@tiscali.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johne53@tiscali.co.uk
--- Comment #9 from johne53 johne53@tiscali.co.uk 2008-06-12 04:30:24 --- This might be related to a problem I've just found this morning.... Windows itself seems to create message boxes based on the supplied type / icontype etc. So, for example, a message box created with MB_YESNO|MB_ICONSTOP will have a button with IDYES and a button with IDNO. But it WOULDN'T have buttons with IDs of (say) IDOK and IDCANCEL.
However, Wine seems to create message boxes with all the standard button IDs predefined - but then it only uses (i.e. displays) the ones that are relevant. Therefore, given a suitable handle to a messagebox, GetDlgItem(hMsgBox, IDOK) will return a seemingly valid handle - even if the message box DOESN'T have an OK button.
Is this something that the developers are aware of?
P.S. Congratulations on a great and impressive product.
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #10 from Austin English austinenglish@gmail.com 2008-12-13 17:31:02 --- Is this still an issue in current (1.1.10) or newer wine?
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #11 from LIGHTNING UK! lightning_uk@imgburn.com 2009-03-12 13:21:46 --- The buttons are fixed in that the right ones show up when they should do and in the correct order. (This is with 1.1.16)
I did notice that the keyboard accelerators don't look right when 'MB_CANCELTRYCONTINUE' is specified though. The 'Cancel' and 'Continue' buttons both have the underscore under the 'C'.
When that box is displayed under Windows (Vista SP1), the 'Cancel' button doesn't have an accelerator and 'C' is used for the 'Continue' button.
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #12 from Dmitry Timoshkov dmitry@codeweavers.com 2009-03-15 23:46:14 --- (In reply to comment #11)
When that box is displayed under Windows (Vista SP1), the 'Cancel' button doesn't have an accelerator and 'C' is used for the 'Continue' button.
That's a simple patch for dlls/user32/resources/user32_En.rc, feel free to submit to wine-patches.
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #13 from Dmitry Timoshkov dmitry@codeweavers.com 2009-03-15 23:47:24 --- If this bug is fixed please mark it as FIXED.
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #14 from LIGHTNING UK! lightning_uk@imgburn.com 2009-03-16 05:17:01 --- Changing it in dlls/user32/resources/user32_En.rc would then make it apply to all the MessageBox calls though wouldn't it?
It just needs to lose the 'C' accelerator on the 'Cancel' button when 'MB_CANCELTRYCONTINUE' is used.
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #15 from Austin English austinenglish@gmail.com 2009-09-15 15:33:26 --- Is this still an issue in current (1.1.29 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=11657
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|us@edmeades.me.uk |wine-bugs@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #16 from LIGHTNING UK! lightning_uk@imgburn.com 2009-12-29 08:29:00 --- Still an issue in 1.1.35 with the keyboard accelerator being on the letter 'C' for both 'Continue' and 'Cancel' when the message box is displayed with the 'MB_CANCELTRYCONTINUE' layout.
http://bugs.winehq.org/show_bug.cgi?id=11657
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |minor
http://bugs.winehq.org/show_bug.cgi?id=11657
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #17 from Austin English austinenglish@gmail.com 2011-03-29 18:57:41 CDT --- (In reply to comment #16)
Still an issue in 1.1.35 with the keyboard accelerator being on the letter 'C' for both 'Continue' and 'Cancel' when the message box is displayed with the 'MB_CANCELTRYCONTINUE' layout.
Still in 1.3.16.
http://bugs.winehq.org/show_bug.cgi?id=11657
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #18 from Bruno Jesus 00cpxxx@gmail.com 2011-11-23 20:21:38 CST --- Still present in 1.3.33. Is it possible to fix this in a simple way? In portuguese the Cancel also does not display the accelerator.
https://bugs.winehq.org/show_bug.cgi?id=11657
--- Comment #19 from Ken Sharp imwellcushtymelike@gmail.com --- Is this still an issue in Wine 1.7.45 or later?
https://bugs.winehq.org/show_bug.cgi?id=11657
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |leslie_alistair@hotmail.com Resolution|--- |FIXED
--- Comment #20 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- This issue appears to be fixed in 1.9.2.
If the problem still exists, please re-open.
https://bugs.winehq.org/show_bug.cgi?id=11657
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #21 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.4.