Re: Create a WS_CHILD window in another thread with its own WinPro



docschnipp wrote:
Hi Norm,

"Norman Bullen" wrote:


docschnipp wrote:

Hi,
....
mWindowClass.style = WS_CHILD | WS_VISIBLE ;
....
Any hint what I am doing wrong?

thanks
doc


You are putting _window style_ values (WS_CHILD and WS_VISIBLE) in a WNDCLASS element which should get only _class style_ values.

Use WS_CHILD and WS_VISIBLE when you call CreateWindow().

Norm



Ouch! Maybe it was just a little too late when I wrote that :)

I am using now
mWindowClass.style = CS_OWNDC | CS_NOCLOSE | CS_DBLCLKS;
Is that a suitable selection of attributes?

Thanks for your answer.

doc

Whether these are appropriate depends upon how you want the window to behave.

Read the documentation on MSDN (the page for WNDCLASS will have a link to a page with a description of the various class styles) and decide which modifies the behavior of your window in the way that you want.

Norm

--
--
To reply, change domain to an adult feline.

.



Relevant Pages

  • Re: Treating Double Clicks as Two Single Clicks
    ... CS_DBLCLKS is class style, not window style. ... > You should modify the style in PreCreateWindow.In the case of controls, ... > control from CWnd and you can make it do anything you want. ...
    (microsoft.public.vc.mfc)
  • Re: who eats my mouse click messages?
    ... I remember Window has a class style to control the translation, ... window and sleeps for 3 seconds. ... twice. ... I tried to look for an explanation but failed to ...
    (microsoft.public.dotnet.framework.windowsforms)

Loading