News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Create a Flat window with Create WindowEX

Started by hfheatherfox07, May 17, 2012, 07:47:09 PM

Previous topic - Next topic

hfheatherfox07

Is it possible to do ...I tried and I can not get it .... what is the command?

Thank you  :dazzled:

qWord

What do you mean with a Flat window? No frame?
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

No buttons nothing .... I use ResEd So there a flat means flat

if you can view rsrc.rc with ResEd than it is like the dialog here http://www.masm32.com/board/index.php?action=dlattach;topic=18854.0;id=10784


that is what I need it for

qWord

well, WS_VISIBLE+WS_POPUP creates a monochrome rectangle on the desktop ... this what I would call flat  :lol

EDIT: corrected...
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

thank you ....
how do I break the child .... if you look at that example in the link..... the minute I add the WS_CHILD it takes the same characteristics as the parent window ....

Is there another way?

qWord

sorry my fault: it mean WS_VISIBLE+WS_POPUP
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

Thank I will try this ...So something like :

INVOKE CreateWindowEx,  WS_EX_TRANSPARENT , \
   OFFSET szClassName, NULL, WWS_VISIBLE+WS_POPUP, 0, 0, 280, 175,NULL,NULL,_hInstance,NULL
push eax
invoke ShowWindow, eax,SW_SHOW ;SW_SHOWDEFAULT
pop eax
ret

qWord

yes ... but pleas replace the '+' with 'or'  :wink
FPU in a trice: SmplMath
It's that simple!

dedndave

if you do not want a child window to inherit properties of the parent,
use the WS_EX_NOINHERITLAYOUT extended style flag in the parent window

if you want to create a child window, use WS_CLIPCHILDREN in the parent
and WS_CHILD in the child (and possibly WS_CLIPSIBLINGS)

so - in the child window, use WS_CHILD or WS_VISIBLE
and assign a unique control ID number in the hMenu parameter of CreateWindowEx

of course, you need a window class of some sort - probably register your own

the child will have no borders or caption
if you want to be able to see it - lol - use a different background color than you use in the client of the parent

hfheatherfox07

Thank you I will try both these things tonight ......

hfheatherfox07

Quote from: qWord on May 17, 2012, 08:35:34 PM
sorry my fault: it mean WS_VISIBLE+WS_POPUP

Thanks qWord, :U

here is an example if anybody wants to do that too

hfheatherfox07

Quote from: dedndave on May 17, 2012, 08:50:04 PM
if you do not want a child window to inherit properties of the parent,
use the WS_EX_NOINHERITLAYOUT extended style flag in the parent window

if you want to create a child window, use WS_CLIPCHILDREN in the parent
and WS_CHILD in the child (and possibly WS_CLIPSIBLINGS)

so - in the child window, use WS_CHILD or WS_VISIBLE
and assign a unique control ID number in the hMenu parameter of CreateWindowEx

of course, you need a window class of some sort - probably register your own

the child will have no borders or caption
if you want to be able to see it - lol - use a different background color than you use in the client of the parent

Ok I have no Idea how to do what you are saying to....
Here is a blank canvas ...can you please show me ?

dedndave

i just modified an old project   :P
Edit menu - Add Button
you can even move them around, if you don't go too fast - lol
in the CreateWin function, i removed the WS_THICKFRAME style flag so they do not have sizing borders

RHL


hfheatherfox07

OK but were do you put the WS_EX_NOINHERITLAYOUT ? I still do not get were to put that .....?