1. Win32Lib GUI Behavior

Using the program below, if you maximize the child window, it covers
the toolbar of the parent! I don't think it's supposed to do that. Is
there something I can do to prevent that, or is it Win32Lib related?

Thanks!

include Win32Lib.ew
without warning

constant win_Main = createEx( Window, "GUI Test", 0, Default, Default, 528, 415,
0, 0 )
constant menu_File = createEx( Menu, "File", win_Main, 0, 0, 0, 0, 0, 0 )
constant menu_File_Exit = createEx( MenuItem, "Exit", menu_File, 0, 0, 0, 0, 0,
0 )
constant ToolBar4 = createEx( ToolBar, "ToolBar4", win_Main, 0, 0, 528, 34, 0, 0
)
constant StatusBar2 = createEx( StatusBar, "StatusBar2", win_Main, 0, 0, 0, 0,
0, 0 )
constant bttn_Project_New = createEx( PushButton, "New", ToolBar4, 0, 0, 30, 30,
0, 0 )
constant CWindow8 = createEx( Window, "CWindow8", win_Main, 176, 88, 200, 100,
or_all({WS_CHILD}), 0 )
openWindow(CWindow8, Normal)

procedure menu_File_Exit_onClick (integer self, integer event, sequence
params)--params is ()
	closeWindow( win_Main )
end procedure
setHandler( menu_File_Exit, w32HClick, routine_id("menu_File_Exit_onClick"))

WinMain( win_Main,Maximize )

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » topic index » view message » categorize

2. Re: Win32Lib GUI Behavior

> Using the program below, if you maximize the child window, it covers
> the toolbar of the parent! I don't think it's supposed to do that. Is
> there something I can do to prevent that, or is it Win32Lib related?
> 
> Thanks!

Not having good luck with this I take it?

Actually, I believe that *is* standard behaviour.  Normally maximize
means to fill as much as possible into the parent Window, not fill as
much as possible except for other children.  Maximizing (in this case)
wont help.  You will have to resize it and account for all children
you dont want ran over.

You should consider doing this application in an MDI interface.  Matter
of fact (since I can now over-ride Win32Lib's internal message handler)
I might just add a new MDI xControl interface.  That would be cool.  I
need to look into that when I have the time.


Don Phillips - aka Graebel
     National Instruments
     mailto: eunexus @ yahoo.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32Lib GUI Behavior

Don wrote:
> 
> > Using the program below, if you maximize the child window, it covers
> > the toolbar of the parent! I don't think it's supposed to do that. Is
> > there something I can do to prevent that, or is it Win32Lib related?
> > 
> > Thanks!
> 
> Not having good luck with this I take it?
> 
> Actually, I believe that *is* standard behaviour.

Have you ever used an application that covered the toolbar with a
child window? I haven't! I just looked at paint shop pro, and here's
how they do it...

This first one is a restored child window.
http://www.cklester.com/ss_1.jpg

This second one is a maximized child window. Notice how the child
window's buttons are placed what looks like on the menu bar of the
parent!
http://www.cklester.com/ss_2.jpg

> Normally maximize
> means to fill as much as possible into the parent Window,

I agree... it should fill the clientRect, not the rect.

> not fill as
> much as possible except for other children.

We're not talking about other child windows. We're talking about
toolbars. Or are those children, too? :)

Ah, well! Just workin' it.

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win32Lib GUI Behavior

> > Not having good luck with this I take it?
> > 
> > Actually, I believe that *is* standard behaviour.
> 
> Have you ever used an application that covered the toolbar with a
> child window? I haven't! I just looked at paint shop pro, and here's
> how they do it...
> 
> This first one is a restored child window.
> <a
> href="http://www.cklester.com/ss_1.jpg">http://www.cklester.com/ss_1.jpg</a>
> 
> This second one is a maximized child window. Notice how the child
> window's buttons are placed what looks like on the menu bar of the
> parent!

No, personally I have not =)
But then again (like Paint Shop Pro) most applications of this nature
are using an MDI interface which takes care of these details automatically.

You are trying to do it manually so I would expect problems would arise =)

> > Normally maximize
> > means to fill as much as possible into the parent Window,
> 
> I agree... it should fill the clientRect, not the rect.
> 
> > not fill as
> > much as possible except for other children.
> 
> We're not talking about other child windows. We're talking about
> toolbars. Or are those children, too? :)
> 
> Ah, well! Just workin' it.

Everything is a child Window =).  Well the possible exception to this
rule would pop-up windows and menus.  


Don Phillips - aka Graebel
     National Instruments
     mailto: eunexus @ yahoo.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu