E1M1 Posted May 30, 2010 Share Posted May 30, 2010 How to make GUI using GTK? I made my "Hello world" in C++ using GTK and found that GTK is just 11 MB DLLs. I tried to find out DLL functions but I didn't find. I tried to use "Olly dbg" to fund out what functions are called by "Hello world" program, but It was too difficult. Does anyone know what functions and what dlls I need to call to create GTK GUI? Thanks edited Link to comment Share on other sites More sharing options...
Realm Posted May 30, 2010 Share Posted May 30, 2010 How to make GUI using GTK?why do you want to use GTK, when you can easily make a GUI with AutoIt?goto scite that came with AutoIt, and under the Tools Menu, you should be able to find Koda. It's a great user-friendly GUI builder My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
E1M1 Posted May 30, 2010 Author Share Posted May 30, 2010 GTK would be just more fun and something other than traditional win32. can u make button in native autoit that has icon + text? edited Link to comment Share on other sites More sharing options...
Realm Posted May 30, 2010 Share Posted May 30, 2010 You can add an icon to a button, however I am not sure about with text, but I would'nt see why not. There is also a UDF that has a skin creator for your GUI's as well, so to get away from the standard win32 look XSkin.au3... Skin your GUI My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
taietel Posted May 30, 2010 Share Posted May 30, 2010 can u make button in native autoit that has icon + text Something like this? expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiButton.au3> #include <GuiImageList.au3> Opt("MustDeclareVars", 1) _Main() Func _Main() Local $hImage, $btn[1];, $rdo, $chk GUICreate("Buttons", 200, 200) GUISetState() $hImage = _GUIImageList_Create(32, 32, 5, 3, 6) For $x = 6 To 7 _GUIImageList_AddIcon($hImage, "shell32.dll", $x, True) Next $btn[0] = GUICtrlCreateButton("Button1", 10, 10, 90, 50) _GUICtrlButton_SetImageList($btn[0], $hImage) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $btn[0] _GUICtrlButton_SetImageList($btn[0], _GetImageListHandle("shell32.dll", 7, True)) EndSwitch WEnd Exit EndFunc ;==>_Main Func _GetImageListHandle($sFile, $nIconID = 0, $fLarge = False) Local $iSize = 16 If $fLarge Then $iSize = 32 Local $hImage = _GUIImageList_Create($iSize, $iSize, 5, 3) If StringUpper(StringMid($sFile, StringLen($sFile) - 2)) = "BMP" Then _GUIImageList_AddBitmap($hImage, $sFile) Else _GUIImageList_AddIcon($hImage, $sFile, $nIconID, $fLarge) EndIf Return $hImage EndFunc ;==>_GetImageListHandle Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
prazetto Posted April 23, 2013 Share Posted April 23, 2013 How to create GTK GUI? Here: # Button. Progressbar - Graphical AutoIt3 Control (UDF) # GTK on AutoIt3 - GTK+ Framework | Widgets Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 23, 2013 Moderators Share Posted April 23, 2013 prazetto, that's great that you have a script that you want to share in the Examples forum. But please do not resurrect a three year old post just to self-advertise. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
prazetto Posted April 24, 2013 Share Posted April 24, 2013 @JLogan3o13I'm not self-advertise. Just trying to answer.There how to create GUI with GTK.#include <Widgets.GTK.au3> $window = _gtk_window_new($GTK_WINDOW_TOPLEVEL) _gtk_window_set_title($window, 'GTK Form') _gtk_window_set_default_size($window, 400, 400) _gtk_window_set_position($window, $GTK_WIN_POS_CENTER) _gtk_window_set_icon_from_file($window, 'mac.ico') _gtk_widget_show_all($window) $hcallback = DllCallbackRegister('window_exit', 'none:cdecl', '') _g_signal_connect_object($window, 'destroy', $hcallback) _gtk_main() Func window_exit() _gtk_quit() EndFunc # Button. Progressbar - Graphical AutoIt3 Control (UDF) # GTK on AutoIt3 - GTK+ Framework | Widgets Link to comment Share on other sites More sharing options...
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