diff --git a/windows/win.c b/windows/win.c index 79bc061fd18..469416e94e6 100644 --- a/windows/win.c +++ b/windows/win.c @@ -881,6 +881,106 @@ static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw) } } +/*********************************************************************** + * dump_window_styles + */ +static void dump_window_styles( DWORD style, DWORD exstyle ) +{ + TRACE( "style:" ); + if(style & WS_POPUP) DPRINTF(" WS_POPUP"); + if(style & WS_CHILD) DPRINTF(" WS_CHILD"); + if(style & WS_MINIMIZE) DPRINTF(" WS_MINIMIZE"); + if(style & WS_VISIBLE) DPRINTF(" WS_VISIBLE"); + if(style & WS_DISABLED) DPRINTF(" WS_DISABLED"); + if(style & WS_CLIPSIBLINGS) DPRINTF(" WS_CLIPSIBLINGS"); + if(style & WS_CLIPCHILDREN) DPRINTF(" WS_CLIPCHILDREN"); + if(style & WS_MAXIMIZE) DPRINTF(" WS_MAXIMIZE"); + if((style & WS_CAPTION) == WS_CAPTION) DPRINTF(" WS_CAPTION"); + else + { + if(style & WS_BORDER) DPRINTF(" WS_BORDER"); + if(style & WS_DLGFRAME) DPRINTF(" WS_DLGFRAME"); + } + if(style & WS_VSCROLL) DPRINTF(" WS_VSCROLL"); + if(style & WS_HSCROLL) DPRINTF(" WS_HSCROLL"); + if(style & WS_SYSMENU) DPRINTF(" WS_SYSMENU"); + if(style & WS_THICKFRAME) DPRINTF(" WS_THICKFRAME"); + if(style & WS_GROUP) DPRINTF(" WS_GROUP"); + if(style & WS_TABSTOP) DPRINTF(" WS_TABSTOP"); + if(style & WS_MINIMIZEBOX) DPRINTF(" WS_MINIMIZEBOX"); + if(style & WS_MAXIMIZEBOX) DPRINTF(" WS_MAXIMIZEBOX"); + + /* FIXME: Add dumping of BS_/ES_/SBS_/LBS_/CBS_/DS_/etc. styles */ +#define DUMPED_STYLES \ + (WS_POPUP | \ + WS_CHILD | \ + WS_MINIMIZE | \ + WS_VISIBLE | \ + WS_DISABLED | \ + WS_CLIPSIBLINGS | \ + WS_CLIPCHILDREN | \ + WS_MAXIMIZE | \ + WS_BORDER | \ + WS_DLGFRAME | \ + WS_VSCROLL | \ + WS_HSCROLL | \ + WS_SYSMENU | \ + WS_THICKFRAME | \ + WS_GROUP | \ + WS_TABSTOP | \ + WS_MINIMIZEBOX | \ + WS_MAXIMIZEBOX) + + if(style & ~DUMPED_STYLES) DPRINTF(" %08lx", style & ~DUMPED_STYLES); + DPRINTF("\n"); +#undef DUMPED_STYLES + + TRACE( "exstyle:" ); + if(exstyle & WS_EX_DLGMODALFRAME) DPRINTF(" WS_EX_DLGMODALFRAME"); + if(exstyle & WS_EX_DRAGDETECT) DPRINTF(" WS_EX_DRAGDETECT"); + if(exstyle & WS_EX_NOPARENTNOTIFY) DPRINTF(" WS_EX_NOPARENTNOTIFY"); + if(exstyle & WS_EX_TOPMOST) DPRINTF(" WS_EX_TOPMOST"); + if(exstyle & WS_EX_ACCEPTFILES) DPRINTF(" WS_EX_ACCEPTFILES"); + if(exstyle & WS_EX_TRANSPARENT) DPRINTF(" WS_EX_TRANSPARENT"); + if(exstyle & WS_EX_MDICHILD) DPRINTF(" WS_EX_MDICHILD"); + if(exstyle & WS_EX_TOOLWINDOW) DPRINTF(" WS_EX_TOOLWINDOW"); + if(exstyle & WS_EX_WINDOWEDGE) DPRINTF(" WS_EX_WINDOWEDGE"); + if(exstyle & WS_EX_CLIENTEDGE) DPRINTF(" WS_EX_CLIENTEDGE"); + if(exstyle & WS_EX_CONTEXTHELP) DPRINTF(" WS_EX_CONTEXTHELP"); + if(exstyle & WS_EX_RIGHT) DPRINTF(" WS_EX_RIGHT"); + if(exstyle & WS_EX_RTLREADING) DPRINTF(" WS_EX_RTLREADING"); + if(exstyle & WS_EX_LEFTSCROLLBAR) DPRINTF(" WS_EX_LEFTSCROLLBAR"); + if(exstyle & WS_EX_CONTROLPARENT) DPRINTF(" WS_EX_CONTROLPARENT"); + if(exstyle & WS_EX_STATICEDGE) DPRINTF(" WS_EX_STATICEDGE"); + if(exstyle & WS_EX_APPWINDOW) DPRINTF(" WS_EX_APPWINDOW"); + if(exstyle & WS_EX_LAYERED) DPRINTF(" WS_EX_LAYERED"); + +#define DUMPED_EX_STYLES \ + (WS_EX_DLGMODALFRAME | \ + WS_EX_DRAGDETECT | \ + WS_EX_NOPARENTNOTIFY | \ + WS_EX_TOPMOST | \ + WS_EX_ACCEPTFILES | \ + WS_EX_TRANSPARENT | \ + WS_EX_MDICHILD | \ + WS_EX_TOOLWINDOW | \ + WS_EX_WINDOWEDGE | \ + WS_EX_CLIENTEDGE | \ + WS_EX_CONTEXTHELP | \ + WS_EX_RIGHT | \ + WS_EX_RTLREADING | \ + WS_EX_LEFTSCROLLBAR | \ + WS_EX_CONTROLPARENT | \ + WS_EX_STATICEDGE | \ + WS_EX_APPWINDOW | \ + WS_EX_LAYERED) + + if(exstyle & ~DUMPED_EX_STYLES) DPRINTF(" %08lx", exstyle & ~DUMPED_EX_STYLES); + DPRINTF("\n"); +#undef DUMPED_EX_STYLES +} + + /*********************************************************************** * WIN_CreateWindowEx * @@ -905,6 +1005,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom, cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy, cs->hwndParent, cs->hMenu, cs->hInstance, cs->lpCreateParams ); + if(TRACE_ON(win)) dump_window_styles( cs->style, cs->dwExStyle ); + TRACE("winproc type is %d (%s)\n", type, (type == WIN_PROC_16) ? "WIN_PROC_16" : ((type == WIN_PROC_32A) ? "WIN_PROC_32A" : "WIN_PROC_32W") );