AutoHotkey Community

It is currently May 27th, 2012, 6:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 12  Next
Author Message
 Post subject:
PostPosted: June 29th, 2010, 9:42 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Thx Lexikos. I forgot to change this function. Updated Rebar version is in the repository now.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 1st, 2010, 10:51 am 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
1. Rebar_SetBand also should be changed as follow because named parameter "T" may be used.
Code:
static RB_SETBANDINFO = A_IsUnicode ? 0x40B : 0x406
SendMessage, RB_SETBANDINFO, WhichBand, &BAND, ,ahk_id %hRebar%


2.
Code:
Splitter_Add2Form(HParent, Txt, Opt){
   static parse = "Form_Parse"

lack of : ?

3. Splitter: In AHK_L, seprated bar can't be dragged.


Last edited by hughman on July 1st, 2010, 1:52 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 1st, 2010, 11:06 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Quote:
Rebar_SetBand also should be changed as follow because named parameter "T" may be used.

Will be fixed.

Quote:
lack of : ?

= equals to := when used with static.

Quote:
Splitter: In AHK_L, seprated bar can't be dragged.

I didn't work with Splitter in AHKL yet. Ill check out when I find time whats the problem

Thx for reports.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2010, 9:11 am 
DockA bug:

when a window is docked to an ahk gui, and you un-dock via "-" param, the window that was docked is missing from the taskbar and doesnt really update itself back to Windows.

fix, to return its parent back. i dont know what would happen if you prematurely closed your ahk window and didnt undock onexit. and i also don't know if this is the best way to do it or not:

Code:
DockA(HHost="", HClient="", DockDef="") {
   DockA_(HHost+0, HClient+0, DockDef, "")
}

DockA_(HHost, HClient, DockDef, Hwnd) {
   static
   
   if HClient && (DockDef != 3)
   {
      If !init
         init := OnMessage(3, A_ThisFunc) ; WM_MOVE    ;adrSetWindowPos := DllCall("GetProcAddress", "uint", DllCall("GetModuleHandle", "str", "user32"), "str", "SetWindowPos")

      HClient += 0, HHost += 0
      if (DockDef="-")
         if InStr(%HHost%, HClient) {
            StringReplace, %HHost%, %HHost%, %A_Space%%HClient%
            DllCall("SetWindowLong", "uint", HClient, "int", -8, "uint", %HClient%_oldparent)
            return
         } else return

      if (DockDef = "") {      ;pin
         WinGetPos hX, hY,,, ahk_id %HHost%
         WinGetPos cX, cY,,, ahk_id %HClient%
         DockDef := "x(0,0," cX - hX ")  y(0,0," cY - hY ")"
      }

      %HClient%_x1 := %HClient%_x2 := %HClient%_y1 := %HClient%_y2 := %HClient%_h1 := %HClient%_w1 := %HClient%_x3 := %HClient%_y3 := %HClient%_h2 := %HClient%_w2 := ""
      loop, parse, DockDef, %A_Space%%A_Tab%
      {
         ifEqual, A_LoopField,,continue

         t := A_LoopField, c := SubStr(t,1,1), t := SubStr(t,3,-1)
         StringReplace, t, t,`,,|,UseErrorLevel
         t .= !ErrorLevel ? "||" : (ErrorLevel=1 ? "|" : "")
         loop, parse, t,|,%A_Space%%A_Tab%
            %HClient%_%c%%A_Index% := A_LoopField ? A_LoopField : 0         
      }
      %HClient%_oldparent := DllCall("SetWindowLong", "uint", HClient, "int", -8, "uint", hHost)
      return %HHost% .= (%HHost% = "" ? " " : "") HClient " "
   }
   
   ifEqual, HHost, 0,SetEnv, HHost, %Hwnd%
   ifEqual, %HHost%,,return

   oldDelay := A_WinDelay, oldCritical := A_IsCritical
   SetWinDelay, -1
   critical 100
   
   WinGetPos hX, hY, hW, hH, ahk_id %HHost%
   loop, parse, %HHost%, %A_Space%
   {       
      ifEqual, A_LoopField,,continue
      else j := A_LoopField
      WinGetPos cX, cY, cW, cH, ahk_id %j%
      w := %j%_w1*hW + %j%_w2,  h := %j%_h1*hH + %j%_h2
      , x := hX + %j%_x1*hW + %j%_x2*(w ? w : cW) + %j%_x3
      , y := hY + %j%_y1*hH + %j%_y2*(h ? h : cH) + %j%_y3
      WinMove ahk_id %j%,,x,y, w ? w : "" ,h ? h : ""         ;   DllCall(adrSetWindowPos, "uint", hwnd, "uint", 0, "uint", x ? x : cX, "uint", y ? y : cY, "uint", w ? w : cW,

"uint", h ? h :cH, "uint", 1044) ;4 | 0x10 | 0x400
   }
   SetWinDelay, %oldDelay%
   critical %oldCritical%
}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2010, 9:29 am 
i also think that DockA should somehow auto-snap the client to the host upon the first docking. its not doing it on my winxp system, i'm having to do this:

Code:
      DockA(MainGuiHwnd, clienthwnd, "x(1) y()")
      SendMessage, 3 ,,,, ahk_id%MainGuiHwnd%


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2010, 9:58 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
I am not particularly concerned because dock is generally used with tool windows and you already found quick solution. I will look into this in the future anyway.

About auto snap, it should do that. Could you provide the sample ? In given Forms sample it obviously pins at the start unless I don't understand your problem correctly .


Thanks for your input.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2010, 5:36 pm 
majkinetor wrote:
About auto snap, it should do that. Could you provide the sample ? In given Forms sample it obviously pins at the start unless I don't understand your problem correctly .


here you go, for me it doesn't auto snap on winxp.

Code:
#include ../lib/DockA.ahk

Gui, Add, Text,, Mouse over a window and press f2 to attach
Gui, Show, h100 , mygui
Gui, +LastFoundExist
MainGuiHwnd := WinExist()

return         ;// end of autoexec


F2::
   MouseGetPos,,, win
   DockA(MainGuiHwnd, win, "x(1) y()")
   ;SendMessage, 3,,,,ahk_id%MainGuiHwnd%     ;// send WM_MOVE
return


i have to manually send the WM_MOVE from previous post to invoke the DockA OnMessage code to get an initial snap


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2010, 6:44 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
In line:

Code:
72:      return %HHost% .= (%HHost% = "" ? " " : "") HClient " "


just delete return word.
That should fix it.

Also, I incorporated your other change as I find it OK.


Thanks.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2010, 10:29 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
*** v0.7 ***

* Lots of small changes and reported bug fixes in many modules.

* All modules work with AHK_L now except RichEdit and dlls which don't support unicode by design. QHTM supports it but all 3hd party software will be removed in the future.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 23rd, 2010, 5:31 am 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
majkinetor wrote:
*** v0.7 ***

* Lots of small changes and reported bug fixes in many modules.

* All modules work with AHK_L now except RichEdit and dlls which don't support unicode by design. QHTM supports it but all 3hd party software will be removed in the future.


Would RichEdit be removed too?
Is it possible to make it be compatible with unicode AHK_L?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 23rd, 2010, 7:09 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
No, RichEdit doesn't require 3td party dll. Only non-Unicode stuff will be removed.
I will try to port it to unicode. So far I had problems to do that.
If anybody wants to look into it, I didn't succeed to make RE_SetText work.

Modules that will be removed will still be present as separate downloads.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2010, 12:13 am 
Offline

Joined: May 9th, 2009, 11:55 am
Posts: 15
Dlg_Save parameter DefaultExt always truncate 1 character on the right.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2010, 1:49 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Can't confirm.
I used Dlg\_Test to check it out.

With line:
Code:
Dlg_Save(hGui, "Select several files", "All Files (*.*)|Audio (*.wav; *.mp2; *.mp3)|Documents (*.txt)", "", "c:\", "MyExt")


The output is:
Code:
C:\test.MyExt


Tested in AHK(_L)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 16th, 2010, 7:39 pm 
Offline

Joined: September 10th, 2009, 5:54 pm
Posts: 203
Hello majkinetor,

I read the documentation but I can't figure out how to make the buttons icons bigger/smaller?, I tried "Toolbar_SetBitmapSize" but no luck.


Is it possible you demonstrate that using my code?

I appreciate that

Code:
Gui 1: +LastFound -MiniMizeBox
WIN_ID := WinExist()

Gui, color, FDF5E6
Gui, Add, text, x0 y0

CreateImageList()

hToolbarAdd := Toolbar_Add(WIN_ID, "ToolbarHandler", "Flat", hIL, "x15 y15 w570 h100")

Toolbar_Insert(hToolbarAdd, "Camel, 131")
Toolbar_Insert(hToolbarAdd, "Exit,18")

Toolbar_SetButtonSize(hToolbarAdd, 80, 80)   ;w h

Gui 1: Show, w500 h110, Toolbar
RETURN

ToolbarHandler(hCtrl, pEvent, pTxt, pPos, pId) {
   global
   ; tooltip, %pEvent%
   IF (pEvent = "click") {
      Gui 1: Destroy
      GoSub %pTxt%
      }
      ELSE RETURN
   }

CreateImageList() {
   global
   hIL := IL_Create(80, 0, 1) ;create imagelist
   Loop 250
      IL_Add(hIL, "Shell32.dll", A_Index) ;load icons from our dll
   }
; #Include Toolbar.ahk


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 17th, 2010, 4:25 pm 
To use arbitrary icon size you need to use ImageList module. AHK only supports two icon sizes - 16 & 32.

ImageList APIs are just few functions and you can either find them on the forum or do DllCalls yourself. I have them included in some of my work around.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 12  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: migz99 and 0 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group