Sign in to follow this  
Followers 0
t0ddie

window in gui

14 posts in this topic

i think i have seen this before, but i dont have any code

i want to put a window inside of a gui.

is there an easy way to do this?


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



i think i have seen this before, but i dont have any code

i want to put a window inside of a gui.

is there an easy way to do this?

what do you mean 'a window'?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

i mean can you wrap a gui around a window, like internet explorer. or any window

you would have to resize the window of course.


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

i mean can you wrap a gui around a window, like internet explorer. or any window

you would have to resize the window of course.

you can create an IE object and display it within a GUI, if that's what you mean...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

well i have a window for a game that i want to put inside a console.


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

this is kind of like what i mean.

i have moved the window, and placed a gui along side of it and a splashscreen on top.

i want something like this, but the splashscreen area should be gui instead of splashscreen.

it should be part of the gui, so when i minimize/maximize the gui, the window will also minimize/maximize.

EDIT: i uploaded screenshot as attachment but its not showing up.

here is a pic http://www.angelfire.com/ex/u/test.html

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

a gui wrapper for a window. is it possible?


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

so its NOT possible then?? lol BUMP :P


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

so its NOT possible then?? lol BUMP :P

just out of curiousity, i'll give you a free bump to ask how much you've researched this yourself while waiting on someone else to do it for you... :lmao:

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

t0ddie,

I think maybe you need to explain more what you want. Why can't you just put a child window in your main GUI?

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Sample (Beta-Version needed):

#include <GUIConstants.au3>

$hGUI = GUICreate("Test", 800, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))

$PID    = Run(@WindowsDir & "\regedit.exe", "", @SW_HIDE)
$hWnd   = 0
$stPID  = DllStructCreate("int")

Do
    $WinList = WinList()
    For $i = 1 To $WinList[0][0]
        If $WinList[$i][0] <> "" Then
            DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $WinList[$i][1], "ptr", DllStructGetPtr($stPID))
            If DllStructGetData($stPID, 1) = $PID Then
                $hWnd = $WinList[$i][1]
                ExitLoop
            EndIf
        EndIf
    Next
    Sleep(100)
Until $hWnd <> 0

$stPID = 0

If $hWnd <> 0 Then
    $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20)
    $nExStyle = $nExStyle[0]
    DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOr($nExStyle, $WS_EX_MDICHILD))
    DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI) 
    WinSetState($hWnd, "", @SW_SHOW)
    WinMove($hWnd, "", 0, 0, 600, 400)
EndIf

GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then ExitLoop
WEnd

Maybe there are some other ways, easier...don't know...

So long

Holger

Edited by Holger

Share this post


Link to post
Share on other sites

Im pretty sure what he wants is like nesting the program inside his GUI like that, but with no System Bar and no moving etc.

Share this post


Link to post
Share on other sites

Im pretty sure what he wants is like nesting the program inside his GUI like that, but with no System Bar and no moving etc.

yes. exactly that.


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

Sample (Beta-Version needed):

#include <GUIConstants.au3>

$hGUI = GUICreate("Test", 800, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))

$PID    = Run(@WindowsDir & "\regedit.exe", "", @SW_HIDE)
$hWnd   = 0
$stPID  = DllStructCreate("int")

Do
    $WinList = WinList()
    For $i = 1 To $WinList[0][0]
        If $WinList[$i][0] <> "" Then
            DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $WinList[$i][1], "ptr", DllStructGetPtr($stPID))
            If DllStructGetData($stPID, 1) = $PID Then
                $hWnd = $WinList[$i][1]
                ExitLoop
            EndIf
        EndIf
    Next
    Sleep(100)
Until $hWnd <> 0

$stPID = 0

If $hWnd <> 0 Then
    $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20)
    $nExStyle = $nExStyle[0]
    DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOr($nExStyle, $WS_EX_MDICHILD))
    DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI) 
    WinSetState($hWnd, "", @SW_SHOW)
    WinMove($hWnd, "", 0, 0, 600, 400)
EndIf

GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then ExitLoop
WEnd

Maybe there are some other ways, easier...don't know...

So long

Holger

I didn't knew what I was trying before I ran this program.

:lmao: amazing...Just what I needed some time ago, but never thought possible.

Nice one Holger.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0