Sign in to follow this  
Followers 0

Autoit-gui 101.18 Available

105 posts in this topic

Posted

Time for fixes only ...

  • Fixed : GuiSetControlData with item length greater than 255 now max 4096.
  • Fixed : GuiSetControlEx repaint control when modified.
  • Added : GuiSetControlEx($tabitem,$GUI_SHOW) will set the first tab to display (for Josbe).
  • Fixed : Highlight of Combo control during resizing. (Thanks CyberSlug).
  • Fixed : GuiCreate/GuiSetControl Doc for Drag&Drop on "input" control. (Thanks Kot)
  • Fixed : White background of label on tab control. I hope (Thanks Kot)
  • Fixed : GDI leaks after hour of run. (Thanks Holger)
  • Added : GuiSetControlEx($nInput, $GUI_ACCEPTFILES)
  • Changed : GuiRead, GuiWrite work with 65535 string length.
download as usual from http://www.hiddensoft.com/fileman/users/jpm/AutoIt3-gui/

Happy testing :D

Share this post


Link to post
Share on other sites



Posted

Is there a version of this I can apply to the unstable source files? I've not touched them in weeks due to fairly all-consuming personal problems :D

Light at the end of the tunnel now though so I will be adding any GUI stuff you send me and some changes from Valik and David too.

Share this post


Link to post
Share on other sites

Posted

Is there a version of this I can apply to the unstable source files?  I've not touched them in weeks due to fairly all-consuming personal problems  :D

Light at the end of the tunnel now though so I will be adding any GUI stuff you send me and some changes from Valik and David too.

I hope your personal problems are really over.

I clean the code and I send you :huh2:

Share this post


Link to post
Share on other sites

Posted (edited)

YEA! The memory leaks are fixed :D And thanks for increasing the GuiRead/Write max to 65535

But I still have the problem of "Highlight of Combo control during resizing" :huh2:

Edited by CyberSlug

Share this post


Link to post
Share on other sites

Posted

Why is there a limit on GuiRead/Write at all? Why not just allocate the memory at run-time?

Share this post


Link to post
Share on other sites

Posted

jpm, I looked at GUIAcceptfiles.au3 (and your other examples), but I am having a problem. I cannot make a control inside a tab control accept files :D

1) If you call GuiSetControlEx(...) on any control inside a tab, then display problems can result!!! For example, new tabs could appear empty!

2) It seems that you cannot set the $WS_EX_ACCEPTFILES or $GUI_ACCEPTFILES style on a tab control.

Look especially at lines commented with *** in the following code:

; Based upon your post <www.hiddensoft.com/forum/index.php?showtopic=2090>

; Tab control messages
Global $TCM_SETCURFOCUS   = 0x1330
Global $TCM_SETCURSEL     = 0x130C
Global $WS_EX_ACCEPTFILES = 0x0018
Global $GUI_ACCEPTFILES   = 8

Opt("GUINotifyMode", 1)
$count = -1

GuiCreate("TitleFoo", 500, 400, 100, 100, -1, $WS_EX_ACCEPTFILES)
WinActivate("TitleFoo")

$Add = GUISetControl("button", "New tab", 300, 300)
$drop = GUISetControl("edit", "This drop works...", 350, 50, 100, 100)
    GuiSetControlEx($drop, $GUI_ACCEPTFILES)
$tab = GUISetControl("tab", "", 0, 0, 300, 300)
    GuiSetControlEx($tab, $GUI_ACCEPTFILES);;;or should that be WS_EX_;***

AddTab()
GuiShow()

While 1
  sleep(100)
  $msg = GuiMsg(0)
  If $count >= 50 Then GuiWrite($Add, 128);disable the button

  Select
  Case -3 = $msg
      Exit

  Case $Add = $msg
      AddTab()
  EndSelect

WEnd
Exit

Func AddTab()
    GuiSendMsg($tab, $TCM_SETCURSEL, $count, 0)
    $count = $count + 1

   ; Create new tab with Edit box that *should* accept files...
    Local $tabH = GUISetControl("tabitem", $count, 0, 0)
        GuiSetControlEx($tabH, $WS_EX_ACCEPTFILES);***
    Local $editH = GUISetControl("edit","Edit on tab #" & $count, 40,40,150,150)
        GuiSetControlEx($editH, $GUI_ACCEPTFILES);*** breaks new tabs
    GUISetControl("tabitem", "", 0, 0); close tab definition

    GuiSendMsg($tab, $TCM_SETCURFOCUS, $count, 0)
EndFunc

Share this post


Link to post
Share on other sites

Posted

YEA!  The memory leaks are fixed :D  And thanks for increasing the GuiRead/Write max to 65535

But I still have the problem of "Highlight of Combo control during resizing"  :huh2:

THe following code for hightlight is working
; Resizable window style borrowed from Windows Notepad
GUICreate("title", 400, 400, 50, 10, 0x04CF0000)

$combo = GUISetControl ( "combo", "", 0, 0)
GUISetControlData( $combo, "one|two|three", "one")

$edit = GUISetControl ( "edit", "Resize the Window", 30, 30)
GUISetControlEx ($edit, 256);control has focus

GUIWaitClose()

Can you post a bad example? :)

Share this post


Link to post
Share on other sites

Posted

Why is there a limit on GuiRead/Write at all?  Why not just allocate the memory at run-time?

lasy approach :D Sometime difficult what the size have to be.

I have double the other AutoIt limit

#define AUT_WINTEXTBUFFER 32767

Share this post


Link to post
Share on other sites

Posted (edited)

THe following code for hightlight is working ...

Can you post a bad example? :D

I get the problem in AutoPad.

Edit: Well, I found something, and found another problem...

Prob #1: Click the program's taskbar icon 3 times, then resize the window.

Prob #2: Click the maximize button twice. The combo box loses it's border and arrow.

Opt("GuiNotifyMode",1)
; Resizable window style borrowed from Windows Notepad
GUICreate("title", 400, 400, 50, 10, 0x04CF0000)

$combo = GUISetControl ( "combo", "", 0, 0)
GUISetControlData( $combo, "one|two|three", "one")
GUISetControlEx($combo, 0, 768+32+4)

$edit = GUISetControl ( "edit", "Resize the Window", 30, 30)
GUISetControlEx ($edit, 256);control has focus

GUIShow()
While 1
    sleep(100)
    If GUIMsg(0) = -3 Then Exit
WEnd
Edited by CyberSlug

Share this post


Link to post
Share on other sites

Posted

I get the problem in AutoPad.

Edit:  Well, I found something, and found another problem...

Prob #1:  Click the program's taskbar icon 3 times, then resize the window.

Prob #2:  Click the maximize button twice.  The combo box loses it's border and arrow.

Opt("GuiNotifyMode",1)
; Resizable window style borrowed from Windows Notepad
GUICreate("title", 400, 400, 50, 10, 0x04CF0000)

$combo = GUISetControl ( "combo", "", 0, 0)
GUISetControlData( $combo, "one|two|three", "one")
GUISetControlEx($combo, 0, 768+32+4)

$edit = GUISetControl ( "edit", "Resize the Window", 30, 30)
GUISetControlEx ($edit, 256);control has focus

GUIShow()
While 1
    sleep(100)
    If GUIMsg(0) = -3 Then Exit
WEnd
Now I hope I can solve it :D

Share this post


Link to post
Share on other sites

Posted

@jpm: thanks a lot for solving the gdi-resource-problem :D

Share this post


Link to post
Share on other sites

Posted

lasy approach :D  Sometime difficult what the size have to be.

I have double the other AutoIt limit

#define AUT_WINTEXTBUFFER  32767

JP, should be easy. In writing, the buffer should come from the variant, so you don't have to worry about memory there, in reading, it could look something like this:

char *buffer;
uint size;

size = SendMessage(hWndControl, WM_GETTEXTLENGTH, 0, 0)
if (size)
{
    buffer = new char[size+1];
    SendMessage(hWndControl, WM_GETTEXT, (WPARAM)size+1, (LPARAM)buffer)
    vResult = buffer;
    delete[] buffer;
}
else
    vResult = "";

Share this post


Link to post
Share on other sites

Posted

JP, should be easy.  In writing, the buffer should come from the variant, so you don't have to worry about memory there, in reading, it could look something like this:

char *buffer;
uint size;

size = SendMessage(hWndControl, WM_GETTEXTLENGTH, 0, 0)
if (size)
{
    buffer = new char[size+1];
    SendMessage(hWndControl, WM_GETTEXT, (WPARAM)size+1, (LPARAM)buffer)
    vResult = buffer;
    delete[] buffer;
}
else
    vResult = "";
Thanks Valik,

I will try to incorporate it :D

Share this post


Link to post
Share on other sites

Posted

upload a 102.18A to correct

  • Fixed : Drag&Drop on tab control. (Thanks CyberSlug)
  • Changed: GuiRead no limits size. (Thanks Valik)
  • Fixed : again Highlight of Combo control during resizing. (Thanks CyberSlug).
:D

Share this post


Link to post
Share on other sites

Posted (edited)

@jpm: thanks :huh2: please could you upload the Autoitsc.bin too - to compile the scripts or maybe a new zipfile for version 18?

Ahhh forgot: your new files still shown version 17! :D

Edited by Holger

Share this post


Link to post
Share on other sites

Posted

Tab Controls work great! :D

BUT... Combo control is still buggy.

- Whenver I resize AutoPad, the combo control always highlights...

- In the example posted above, the combo box loses it's border and arrow when you click on the maximize button twice.

jpm, I'll look at the source code to see if I can create a patch.

Share this post


Link to post
Share on other sites

Posted (edited)

Tab Controls work great! :huh2:

BUT... Combo control is still buggy.

- Whenver I resize AutoPad, the combo control always highlights...

- In the example posted above, the combo box loses it's border and arrow when you click on the maximize button twice.

jpm, I'll look at the source code to see if I can create a patch.

I cannot reproduce the combo/maximize/resize bug with 102.18A :D

EDITdo you mean if the combo has the focus it loose it when maximize

Opt("GuiNotifyMode",1)
; Resizable window style borrowed from Windows Notepad
GUICreate("title", 400, 400, 50, 10, 0x04CF0000)

$combo = GUISetControl ( "combo", "", 0, 0)
GUISetControlData( $combo, "one|two|three", "one")
GUISetControlEx($combo, 0, 768+32+4)

$edit = GUISetControl ( "edit", "Resize the Window", 30, 30)
GUISetControlEx ($edit, 256);control has focus

GUIShow()
While 1
   sleep(100)
   If GUIMsg(0) = -3 Then Exit
WEnd
Edited by jpm

Share this post


Link to post
Share on other sites

Posted

@jpm: thanks  :) please could you upload the Autoitsc.bin too - to compile the scripts or maybe a new zipfile for version 18?

Ahhh forgot: your new files still shown version 17!  :huh2:

Done :D

Share this post


Link to post
Share on other sites

Posted

The main reason I care about the combo box is because your change-log says it is "fixed." Remove the change-log entry and I'll be happy :D

I posted screen shots here. Tested with AutoGUI 102.18A on Windows XP Pro sp1 (but using windows 2000 theme)

Share this post


Link to post
Share on other sites

Posted

@jpm: where? :D there's still the 'old' version...

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