Hi,
On Mon, Dec 15, 2003 at 02:32:39PM +0100, Fabian Cenedese wrote:
I have an application where I get the styles from a window with
GetWindowLong(m_hWnd, GWL_EXSTYLE);
In Windows I get 0x00000110 but in wine I get 0x40000110. From the wine headers (mine seem to old) I get this means 'managed by the system'. Is this something wine specific? Do I need to pay attention to this? If it's a valid Windows flag why isn't it set in Windows? If it's just wine specific can I just mask it out?
Ok, I should look closer at the source :) It's wine internal. Am I on the safe side if I mask the upper flags (0x4..., 0x8...) out?
Three is the number, now I finally come to the reason of my questions :)
In our application we have a streaming mechanism where we save all info about a window (title, size, position, styles...) so upon loading we can recreate it exactly as it was before. On Windows I get some styles back, save them and can use them to create the window with
CreateWnd(Text, ExtStyle, Style, WndRect, MinPos, Parent);
On wine the extended styles are different as described above. If I now try to create a window with these different flags it fails for both Windows and wine. But it works if I mask them out.
As these flags are only wine internal I don't know if it's right to give them to the user. On the other hand (if this is needed/usefull) wine should be capable of disregarding them if they are given to the CreateWnd function. As it is now I need to change my application for wine (which I did to continue work) but that shouldn't be desirable.
I'd say internal Wine flags should definitely get masked out. And NOT by your external program, but by Wine itself (since it needs to be as compatible with Windows as possible).
Whatever workaround you come up with in your program to make it Wine-compatible, rest assured that in > 95% of all cases it's a bad idea: we really need to get Wine fixed instead.
Feel free to submit a patch correcting GetWindowLong and similar functions.
Greetings,
Andreas Mohr