[v2] comctl32/taskdialog: Implement nDefaultButton and add tests
Fabian Maurer
dark.shadow4 at web.de
Sun Nov 5 09:46:14 CST 2017
I reworked my patch according to your suggestions.
>>> We already iterate over custom buttons and check every common button
>>> flag before this point, so it shouldn't be necessary to have another loop.
>>
>> I'm open to suggestion, but how would you do that?
>>
>> We could add three checks each time before taskdialog_init_button is
called,
>> or alternatively one check in taskdialog_init_button. Like giving it a
pointer
>> to default_button, and checking if the id equal the taskdialog default
button.
>> But I find my current solution to be cleaner to be honest, what's your
>> suggestion?
>Yes, something like that. taskdialog_init_button() has all the info to
> do that.
In the beginning I wanted to have default_button be -1 if no button was found
yet, but as the tests show this is impossible since windows accepts a negative
ID. Now we have to pass 2 pointers around..
Your thoughts on that? I find that the second loop makes things a lot cleaner.
Regards,
Fabian Maurer
More information about the wine-devel
mailing list