Newsgroups: comp.windows.ms.programmer
Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: How to open two windows from one application
Message-ID: <1991Apr14.175803.26045@hyper.hyper.com>
Keywords: multiple windows
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <1991Apr12.181046.14531@ux1.cso.uiuc.edu>
Date: Sun, 14 Apr 1991 17:58:03 GMT

In article <1991Apr12.181046.14531@ux1.cso.uiuc.edu> koziol@yoyodyne.ncsa.uiuc.edu (Quincey Koziol) writes:
>
>Ok, I'm stumped.  How does one open two windows from one Windows App?  I have
>tried so many combinations I'm really getting sick of this problem.  Attached
>below is the relevant section of my current iteration of the code:
>
>DWORD dwPalStyle = DS_MODALFRAME | WS_OVERLAPPED | DS_NOIDLEMSG | WS_CAPTION | WS_BORDER ;
>
.
.
.
>
>    hPaletteWnd = CreateWindow(szPalName,szPalName,dwPalStyle,0,
>                yScreen-(24+CaptionHeight+10),256+2,24+CaptionHeight+8,NULL,NULL,hInstance,NULL);
>
The problem is you have not used the WS_VISIBLE style with
the palette window.  Either call ShowWindow() after creating
it, or use the WS_VISIBLE style when creating it.

Also, you may prefer to use the WS_POPUP style, since this
type of window will "follow" its parent around, instead of
appearing as if two different applications are present.

cheers - Paul Bonneau.
