annoying EndDialog "feature"
gerard.patel at asi.fr
Mon Feb 5 16:17:19 CST 2001
At 02:38 PM 5/2/01 -0600, you wrote:
>Well, examining how Windows does it can be done,
>but I don't think it's too useful, as I think that the current approach
>with that fix should work fine.
>> Now I think I see : this can only be useful if EndDialog is called from
>> another thread, right ? If yes, you really *should* mention this in the
>> remark before the code. No need to be mysterious IMHO.
>I don't think the "other thread" is important.
>What is important is the fact that if we don't get frequent messages,
>the dialog will stay open without that fix.
Well, if the current thread is active, it's in the dialog code I guess since
DialogBox is, well, modal.
And if it's in the dialog code, the code run should be in dialog box
procedure, so it should be in a message handling. So any EndDialog
is followed by a return to the dialog loop. I am not quite sure of
>Windows definitely does NOT do it this way, of course
>(well, I'd be surprised if it actually did ;-).
>This is just a (crude, if you want) hack to make it work.
>And I figured sending WM_NULL shouldn't hurt.
>I'm open to suggestions on how to rewrite the whole dialog handling
>(e.g. to do it like Windows), but I don't think it matters at all
>at the moment.
>There are much more important things to do.
Possibly, but it's important at least to add a comment saying that it is a hack....
Correct documentation can wait you think ? Wine is full of strange code
that nobody knows why it's here already :-/
More information about the wine-devel