Jump to content

Application within my Gui


sandyd
 Share

Recommended Posts

Hi Peeps,

Just wondering if this is possible?

Say I have a gui window, and I want to make my gui the parent of another application (say notepad), do we have commands to do this in AutoIt.

Oh and while I remember, whats the maximum amount of lines a multiline edit can hold?

Thanks in advance

----[ SandyD ]---
Link to comment
Share on other sites

You need dllcalls, but yes you can do it :)

#include <guiconstants.au3>
Run ( "notepad.exe" )
WinWait ( "Untitled - " )
$notepad = WinGetHandle ( "Untitled - " )
$style = DllCall ( "user32.dll", "long", "GetWindowLong", "hwnd", $notepad, "int", -16 )    
$style = $style[0]
DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $notepad, "int", -16, "long", BitOR ( $style, $WS_CHILD ) )
$gui = GUICreate ( "Notepad", 300, 300 )
GUISetState ( )
DllCall ( "user32.dll", "hwnd", "SetParent", "hwnd", $notepad, "hwnd", $gui )
Sleep ( 3000 )
DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $notepad, "int", -16, "long", $style)
DllCall ( "user32.dll", "hwnd", "SetParent", "hwnd", $notepad, "hwnd", 00000000 )
Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

Not quite what I had in mind.

I was looking to be able to use notepad as some sort of edit control within my gui.

I am viewing a big log file and the edit control doesn't show all the file.

Guess I'll have to spawn notepad to view it after all.

BTW, Does anyone know if autoit will be getting a richedit control?

----[ SandyD ]---
Link to comment
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
 Share

  • Recently Browsing   0 members

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