CreateWindow issue?

Bill Medland medbi01 at accpac.com
Thu Jul 12 11:50:12 CDT 2001


For Information Only

Bill Medland <medbi01 at accpac.com> wrote in article
<01c10025$bb647f00$6f0c10ac at medbi01>...
> Can anyone shed any light on this?
> 
> 1.
> If I take Petzold's POPPAD1 project and slightly modify it so that the
> style is
> WS_CHILD | WS_BORDER | WS_VISIBLE | ES_AUTOHSCROLL
> and then spy on the WM_NCCREATE and WM_CREATE it tells me that the style
> passed in is
> WS_OVERLAPPEDWINDOW | WS_CHILDWINDOW | WS_VISIBLE | ES_AUTOHSCROLL
> which is not the same thing.
> 
> Does anyone know if
> a. The Windows Spy++ is telling fibs
> b. (Win95) CreateWindow patches them up in some way.
> 
> 
> 2. (Why I was even looking at 1)
> In the application I am working on we open Edit controls almost as above
> inside dialogs and they appear with a single pixel solid frame under
> Windows whereas under Wine they appear with a 2-pixel sunken frame. 
There
> are several changes I can make in the controls/edit.c to get the same
> behaviour under Wine but so far they all "mess up" normal sunken ones.
> 
> (Under windows the resulting windows end up with zero extended style and
> 50000088 style.)
> 
> Any thoughts would be appreciated.
> 
> Bill
> 
> 
> 
> 
> 

Guess what. Microsoft Spy++ lies!!

When it displays the parameters of the WM_CREATE and WM_NCCREATE messages
it gives the actual pointer value and also the contents pointed to by that
pointer.  In general it is correct but for the style and extended style it
doesn't give the hex value; it goes ahead and politely translates it for
you into WS_VISIBLE, WS_BORDER etc.  However it gets it wrong.  You can see
that it is wrong by 
1. creating your own class and a window of that class and see what it sends
you
or
 2. get the source code for the original spy program, modifying it a little
and using it.

Of course you can't get hold of the source for spy++ and correct it, as far
as I am aware.  (I'm getting to like this Open Source idea!!)

I wonder how many other lies spy++ tells us.

Bill





More information about the wine-devel mailing list