trickytroy Posted April 25, 2005 Posted April 25, 2005 (edited) hello, i am in the process of making my own web browser just for fun and i have come across this problem: when i run the program the window is not all the way maximized (which is what i want) then when i hit the resize button to make it full screen it doesnt change the size of the child gui and i end up with a bunch of space in the parent gui. well if someone could help me with making the child gui resize when the parent does it would be much apprecaited. heres the code but if you want to see and try it for yourself then then you can download the code and the dll at the bottom of this post. #include <GuiConstants.au3> ;Creates the parent gui $gui = GUICreate("MyGUI", 989, 601, (@DesktopWidth - 989) / 2, (@DesktopHeight - 601) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Button_2 = GUICtrlCreateButton("Back", 20, 30, 50, 20) $Button_3 = GUICtrlCreateButton("Forward", 80, 30, 50, 20) $Button_4 = GUICtrlCreateButton("GO", 810, 30, 40, 20) $Combo_5 = GUICtrlCreateCombo("http://www.google.com", 150, 30, 640, 21) $Progress_6 = GUICtrlCreateProgress(840, 580, 70, 15) $Date_8 = GUICtrlCreateDate("Date7", 20, 580, 200, 20) $pic = GUICtrlCreatePic("C:\Documents and Settings\boy wonder\My Documents\My Pictures\intercurve3.GIF", 890, 5, 40, 53) GUISetState() ;creates the child gui that the dll will be held in. $internetgui = GUICreate("", 970, 515, 10, 60, $WS_CHILD + $WS_BORDER, "", $gui) GUISetState() ;opens dll then calls it. $dll = DllOpen("cwebpage.dll") DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $internetgui) DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.google.com") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE; states that if the close button is it hte script will exit ExitLoop Case $msg = $Button_4;gets the message of the button DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", GUICtrlRead($Combo_5)); tells the dll to go to the web page thats in the combobox EndSelect WEnd Exit good luck figuring it out!!intercurve.zip Edited April 25, 2005 by trickytroy [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote]
jpm Posted April 25, 2005 Posted April 25, 2005 (edited) hello, i am in the process of making my own web browser just for fun and i have come across this problem: when i run the program the window is not all the way maximized (which is what i want) then when i hit the resize button to make it full screen it doesnt change the size of the child gui and i end up with a bunch of space in the parent gui. wellif someone could help me with making the child gui resize when the parent does it would be much apprecaited. heres the code but if you want to see and try it for yourself then then you can download the code and the dll at the bottom of this post.#include <GuiConstants.au3> ;Creates the parent gui $gui = GUICreate("MyGUI", 989, 601, (@DesktopWidth - 989) / 2, (@DesktopHeight - 601) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Button_2 = GUICtrlCreateButton("Back", 20, 30, 50, 20) $Button_3 = GUICtrlCreateButton("Forward", 80, 30, 50, 20) $Button_4 = GUICtrlCreateButton("GO", 810, 30, 40, 20) $Combo_5 = GUICtrlCreateCombo("http://www.google.com", 150, 30, 640, 21) $Progress_6 = GUICtrlCreateProgress(840, 580, 70, 15) $Date_8 = GUICtrlCreateDate("Date7", 20, 580, 200, 20) $pic = GUICtrlCreatePic("C:\Documents and Settings\boy wonder\My Documents\My Pictures\intercurve3.GIF", 890, 5, 40, 53) GUISetState() ;creates the child gui that the dll will be held in. $internetgui = GUICreate("", 970, 515, 10, 60, $WS_CHILD + $WS_BORDER, "", $gui) GUISetState() ;opens dll then calls it. $dll = DllOpen("cwebpage.dll") DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $internetgui) DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.google.com") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE; states that if the close button is it hte script will exit ExitLoop Case $msg = $Button_4;gets the message of the button DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", GUICtrlRead($Combo_5)); tells the dll to go to the web page thats in the combobox EndSelect WEnd Exitgood luck figuring it out!!<{POST_SNAPBACK}>Pretty soon you will get the possibliity to receive $GUI_EVENT_RESIZED so you can do whatever you want AutoIt will not do anything. Edit : $GUI_EVENT_RESIZE changed to $GUI_EVENT_RESIZED in >=3.1.1.16 not yet available Edited April 26, 2005 by jpm
FreeFry Posted April 26, 2005 Posted April 26, 2005 This was the fucking fastest web browser i've ever tried ^^ I hope to see that this evolves to something more
Encryption Posted April 26, 2005 Posted April 26, 2005 Would you mind if I edited this a bit for my own use? I think I could spruce it up a bit
trickytroy Posted April 27, 2005 Author Posted April 27, 2005 go ahead encryption [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote]
Encryption Posted April 27, 2005 Posted April 27, 2005 Is there a way I could get the Function definitions or the source to that dll?
trickytroy Posted April 27, 2005 Author Posted April 27, 2005 Is there a way I could get the Function definitions or the source to that dll?<{POST_SNAPBACK}>ya here you go [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now