Re: creating dialog-like windows using win32lib or CreateWindowEx
- Posted by ed_davis2 at yahoo.com Apr 14, 2004
- 997 views
Tommy Carlier wrote: >The closest I can get: 1. style = or_all({WS_THICKFRAME, >WS_SYSMENU}), extended style = WS_EX_DLGMODALFRAME No >minimize/maximize but with a system menu (is this really a >problem?). Yes it is a problem - I don't want the system menu - I want it to look like other dialogs found in other applications. >2. style = WS_THICKFRAME, extended style = WS_EX_DLGMODALFRAME >No system menu, but also no close button. If you want the little >[?]-button, extended style = or_all({WS_EX_DLGMODALFRAME, >WS_EX_CONTEXTHELP}) Thanks for the attempts. It is interesting. If you create a resource file, using the styles DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU, and load the dialog via the normal means, and call DialogBox, you get just what I would like to have. Obviously, there must be a way to do it with the Win32 API, since Windows does it. I ran spy on notepads find dialog, and its styles were: WS_POPUP, WS_VISIBLE, WS_CLIPSIBLINGS, WS_BORDER, WS_DLGFRAME, WS_SYSMENU, 0x20c4 (what is that?). Extended styles: WS_EX_DLGMODALFRAME, WS_EX_WINDOWEDGE, WS_EX_CONTEXTHELP, WS_EX_LEFT, WS_EX_LTRREADING, WS_EX_RIGHTSCROLLBAR, WS_EX_CONTROLPARENT I tried this, but it still has the system menu. I even tried to delete the system menu as a response to WM_CREATE, via GetSystemMenu/DestroyMenu, but that didn't work either. There must be a way!