[PATCH 04/18] comctl32: Extend TaskDialog, add simple callback and tests

Nikolay Sivov bunglehead at gmail.com
Sun Feb 26 14:12:12 CST 2017


On 26.02.2017 22:17, Fabian Maurer wrote:
>>> For that please use msg.h from comctl32/tests.
>>
>> I'd love to, but I'm not sure how this would work.
>> After all, the message lists for the taskdialogs use a different struct with
>> additional values, like the return value it should give, and a sync value.
>> I agree that the current way isn't too elegant, how would you go about
>> that?
> 
> Thought about it a while longer, but it's not easy.
> The current code uses
>> while (expected->message && actual->message)
> to process the messages.
> However, the problem is that TDN_CREATED is zero, terminating the loop way to 
> early. That's why I added TDN_NO_MORE_MESSAGES in the first place. If I should 
> use msg.h from comctl32, then I need to rewrite a bunch of its code.
> 
> How do we want to handle it?

Right, that's because it was meant for testing actual window messages.
We can easily abuse it. You can make up a new message above WM_USER or
even WM_APP, like WM_TD_CALLBACK, and use existing 'id' flag like
WM_NOTIFY messages are already using. After that you'll only need to set
id to TDN_CREATED, and add_message() with resulting structure. This 'id'
field does not have any special meaning in generic code in msg.h and is
only checked for equality.

> 
> Regards,
> Fabian Maurer
> 




More information about the wine-devel mailing list