[Max GUI] window within a window

BlitzMax Forums/BlitzMax Programming/[Max GUI] window within a window

T-Light(Posted 2006) [#1]
Wow this is embarrassing.
I'm sure this is easy but after two hours of searching through the docs and the community I can't even find a reference to it, (woods for the trees is probably apt)...

I'm looking for a way to create a child window with MaxGUI that sits within its parent window and will not cross the parents window boundaries. It seems that wether a new window has a parent or not, it's free to roam about the entire desktop.

Example of standard child window setup...
ChildWindow=CreateWindow("Mini Window",300,300,300,300,Mainwindow)

What I'd like to create would be something like a photoshop interface for my app. It would need windows which are locked within the main app window.

Any ideas?


SebHoll(Posted 2006) [#2]
T-Light,

I believe what you want is a MDI interface. (Multiple Document Interface) as used in Microsoft Word, Photoshop etc.

multiple-document interface (MDI) A technique for managing a set of windows whereby documents are opened into windows (sometimes called child windows) that are constrained to a single primary (parent) window. See also child window and parent window.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/gloss.asp

I tried looking for a way to do this but then ended up using tabs instead. You draw a separate "window" to each tab so your user can tab between instances of the program.

Just a suggesion,

Seb


T-Light(Posted 2006) [#3]
Cheers Seb.

Wasn't sure if this may have been a bug or not so I posted the question there. Skidracer came up with an undocumented flag...
WINDOW_CHILD
It does the business. :)

ps I am using tabs, just didn't come across a way of attaching the various windows to the tabs without having to hide each window when a new tab was pressed.

Cheers.