Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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...
Posted

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.

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.

Posted

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.

Posted

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:
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
Posted

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.

  • 3 weeks later...
Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...