AutoHotkey Community

It is currently May 25th, 2012, 1:13 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: GUI
PostPosted: July 26th, 2007, 1:05 am 
How can i make a window with another window in it that i can minimize and maximize and close?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2007, 3:02 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8647
Location: Salem, MA
you are talking about a multiple document interface or MDI. please search the forum for related topics. AFAIK, you can fake this behavior, but you will not get a true MDI from AHK.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject: GUI
PostPosted: July 27th, 2007, 12:33 am 
just like the SmartGUI. I want to make my GUI support multiple windows


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 1:39 am 
Offline

Joined: November 26th, 2005, 10:35 pm
Posts: 196
Well, multiple GUIs and MDI are two fairly different things. For MDI, I would start here.

To create multiple GUIs per script, though, is much simpler. Here is an example:

Code:
Gui, Add, Text,, This is GUI 1.
Gui, Show,, GUI 1
Gui, 2: Add, Text,, This is GUI 2.
Gui, 2: Show,, GUI 2


You may also want to look into Gui, #:Default for a script using multiple GUIs.

_________________
http://thedbdclan.com/public/pingrep


Report this post
Top
 Profile  
Reply with quote  
 Post subject: GUI
PostPosted: July 27th, 2007, 2:26 am 
Tnx TDMedia for your help. Anyways this one solved my problem... DllCall("SetParent", "uint", SubhWnd, "uint", MainhWindow). My problem right now is that ifwinexist cannot detect a child window owned by a parent. Do you know any solution??


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 2:46 am 
Offline

Joined: November 26th, 2005, 10:35 pm
Posts: 196
That's a good question. I myself haven't had to use child windows yet, so I don't know if such a thing is possible through AHK. Intuitively, though, you would probably have to use some DLLCalls to get that done too. However, take what I say with a grain of salt, as I have no experience in the area.

[EDIT]
Afterthought - you may be able to work around this issue by setting a variable when a specific GUI is made within the script itself. I don't know for sure, but AHK probably receives some sort of "grabbable" notification when a child is closed (are "children" still considered GUIs - able to have GUI#Close: labels?), so if you can dump it to a variable, it would be possible to tell when a window doesn't exist either.
[/EDIT]

_________________
http://thedbdclan.com/public/pingrep


Report this post
Top
 Profile  
Reply with quote  
 Post subject: GUI
PostPosted: July 27th, 2007, 2:56 am 
Tnx again! I would do as you said :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 2:59 am 
Offline

Joined: November 26th, 2005, 10:35 pm
Posts: 196
Be sure to tell me how it goes - now I'm interested :D

_________________
http://thedbdclan.com/public/pingrep


Report this post
Top
 Profile  
Reply with quote  
 Post subject: GUI
PostPosted: July 27th, 2007, 3:06 am 
I think winactive() can be used, let me try.... :lol:


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Amandaville, Google Feedfetcher, KenC, krajan and 24 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group