JnLlnd / FoldersPopup

Popup menu to jump instantly from one folder to another. Freeware.
code.jeanlalonde.ca/folderspopup/
45 stars 7 forks source link

Option to disable folders popup on a Tabs row in Total Commander #126

Closed JnLlnd closed 9 years ago

JnLlnd commented 9 years ago

See: http://code.jeanlalonde.ca/using-folderspopup-with-total-commander/#comment-11147

JnLlnd commented 9 years ago

+1 from Jackson (see same post)

JnLlnd commented 9 years ago

Code suggested by Jackson

if (strMouseOrKeyboard = “PopupMenuMouse”)
{
    MouseGetPos, , , strWinId, strControlID, 1
    If InStr(strControlID, “TMyTabControl”)
        strWinId := false
}
else
{
    strWinId := WinExist(“A”)
    strControlID := “”
}
JnLlnd commented 9 years ago

Issue: When I inspect TC tab control ID, I get “Window6″ (left pane) and “Window11″ (right pane) but never “TMyTabControl”. What version of TC is Jackson using. Mine is: 8.51a.

JnLlnd commented 9 years ago

Seen this on TC forum dated 2014 http://forum.wincmd.ru/viewtopic.php?t=15474&sid=2605bb2b1a34956eedf375b9aef12356

WinGet, TCPID, PID, A 
TCArch := GetBitness(TCPID) 

TMyTabControl1 := TCArch=32 ? "TMyTabControl1":"SysTabControl321" 
TMyTabControl2 := TCArch=32 ? "TMyTabControl2":"SysTabControl322" 

GetBitness(Process) { 
    Process, Exist, %Process% 
    If !(PID := ErrorLevel) 
        return 0 
    hProcess := DllCall("OpenProcess", "uint", 0x400 
                               , "uint", 0, "uint", PID, "ptr") 
    If (hProcess = 0) 
        return 0 
    res := DllCall("IsWow64Process", "ptr", hProcess, "int *", Wow64Process) 
    If (res = 0) 
        return 0 
    DllCall("CloseHandle", "ptr", hProcess) 
    return Wow64Process? 32:64 
} 
JnLlnd commented 9 years ago

Searching the TC forum, I found that the 64-bit version of TC has been developed using an open source platform called Lazarus that changes the control naming convention compared to the 32-bit version. In fact, it names all controls “Window” (+ an instance number). This makes the control naming unstable from one TC version to the other, and unreliable from an external app developer point of view.

This quote from the TC author: “Unfortunately Lazarus names most of its controls “Window”, and seems to rely on that for certain functions. I manage to give at least the main forms other class names, but not for the controls”. http://www.ghisler.ch/board/viewtopic.php?t=31130

For this reason, with the info I have, I’ll have to postpone this feature request. Sorry.