Thx Lexikos. I forgot to change this function. Updated Rebar version is in the repository now.
[AHK & AHK_L] Forms Framework 0.8
Started by
majkinetor
, Jan 13 2010 04:41 PM
205 replies to this topic
1. Rebar_SetBand also should be changed as follow because named parameter "T" may be used.
2.
3. Splitter: In AHK_L, seprated bar can't be dragged.
static RB_SETBANDINFO = A_IsUnicode ? 0x40B : 0x406 SendMessage, RB_SETBANDINFO, WhichBand, &BAND, ,ahk_id %hRebar%
2.
Splitter_Add2Form(HParent, Txt, Opt){ static parse = "Form_Parse"lack of : ?
3. Splitter: In AHK_L, seprated bar can't be dragged.
#62
-
Posted 01 July 2010 - 09:51 AM
Will be fixed.Rebar_SetBand also should be changed as follow because named parameter "T" may be used.
= equals to := when used with static.lack of : ?
I didn't work with Splitter in AHKL yet. Ill check out when I find time whats the problemSplitter: In AHK_L, seprated bar can't be dragged.
Thx for reports.
#63
-
Posted 01 July 2010 - 10:06 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:
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:
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% [color=red]DllCall("SetWindowLong", "uint", HClient, "int", -8, "uint", %HClient%_oldparent)[/color] 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 } [color=red]%HClient%_oldparent := [/color]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% }
#64
-
Posted 01 September 2010 - 08:11 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:
DockA(MainGuiHwnd, clienthwnd, "x(1) y()") SendMessage, 3 ,,,, ahk_id%MainGuiHwnd%
#65
-
Posted 01 September 2010 - 08:29 AM
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.
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.
#66
-
Posted 01 September 2010 - 08:58 AM
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.
#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
#67
-
Posted 01 September 2010 - 04:36 PM
In line:
just delete return word.
That should fix it.
Also, I incorporated your other change as I find it OK.
Thanks.
72: [color=red]return [/color]%HHost% .= (%HHost% = "" ? " " : "") HClient " "
just delete return word.
That should fix it.
Also, I incorporated your other change as I find it OK.
Thanks.
#68
-
Posted 03 September 2010 - 05:44 PM
*** 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.
* 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.
#69
-
Posted 27 September 2010 - 09:29 PM
*** 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?
#70
-
Posted 23 October 2010 - 04:31 AM
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.
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.
#71
-
Posted 23 October 2010 - 06:09 AM
Dlg_Save parameter DefaultExt always truncate 1 character on the right.
#72
-
Posted 09 November 2010 - 11:13 PM
Can't confirm.
I used Dlg\_Test to check it out.
With line:
The output is:
Tested in AHK(_L)
I used Dlg\_Test to check it out.
With line:
Dlg_Save(hGui, "Select several files", "All Files (*.*)|Audio (*.wav; *.mp2; *.mp3)|Documents (*.txt)", "", "c:\", "MyExt")
The output is:
C:\test.MyExt
Tested in AHK(_L)
#73
-
Posted 10 November 2010 - 12:49 PM
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
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
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
#74
-
Posted 16 November 2010 - 06:39 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.
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.
#75
-
Posted 17 November 2010 - 03:25 PM