PATCH: workaround for ms typo

Alexandre Julliard julliard at winehq.com
Mon Sep 16 19:13:21 CDT 2002


Michael Stefaniuc <mstefani at redhat.de> writes:

> MS made a typo in CHOOSECOLOR (commdlg.h) and kept it till today (at
> least that's what msdn says): the struct member hInstance is a HWND
> instead of a HINSTANCE. Until now it wasn't a problem in wine but with
> the conversions of the handles to void* a lot of casts are necessary.
> And this casts are looking just wrong: cast to HINSTANCE when using the
> hInstance member as rvalue and cast to HWND when using it as lvalue.
> The casts looks so wrong so that we would need comments like "Yes, this
> cast is needed, see struct CHOOSECOLOR in include/commdlg.h".
> The attached patch fixes the typo for wine (but keeps it for
> compatibility reasons for winelib) and removes the need of some ugly
> casts.

The problem is that our code would no longer be compatible with other
Windows headers, which could be a problem for instance for the ReactOS
folks. I think it's better to remain compatible and live with the ugly
casts.

-- 
Alexandre Julliard
julliard at winehq.com



More information about the wine-devel mailing list