[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 04/18] comctl32: Extend TaskDialog, add simple callback and tests
From:       Nikolay Sivov <bunglehead () gmail ! com>
Date:       2017-02-26 20:12:12
Message-ID: e1c7894b-258b-8ad2-ef14-4f068dc1a785 () gmail ! com
[Download RAW message or body]

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
> 




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic