NTLinks + NTLinksMaker: NTFS links creation and information

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Dalai
Power Member
Power Member
Posts: 9943
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *Dalai »

I get the two-colored MessageBox dialogs on Win10 (tested 1709 and 21H2) just like on Win7. However, it's possible that MS changed the design in later releases of Win10 again, but I somewhat doubt that. But I'm pretty sure that the colors themselves depend on the active theme/design; I tested the default design, of course.

[ADD]
Just for reference, here's a thread on StackOverflow that shows the design that I also see on the systems I tested: https://stackoverflow.com/questions/17686981/message-boxes-with-windows-7-look-and-feel

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *MVV »

My Win7 with classic theme shows me dialogs that look like this. Same light background for text and background of buttons' color for buttons bar. And if I enlarge this window size, I see light background below the buttons bar.
https://i.ibb.co/fxLx7Hc/tcabdlg.png

Adding the "Skip All" button at the right side of buttons bar is bad too, I would need to make entire dialog much larger and buttons bar background would end too:
https://i.ibb.co/6BKPGgw/ntldlg.png

And I'm pretty sure that I shouldn't make any assumptions regarding dialog look and paint anything manually.
User avatar
AntonyD
Power Member
Power Member
Posts: 1554
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *AntonyD »

Adding the "Skip All" button at the right side of buttons bar
so IF you have the opportunity to choose a place - WHERE you need to place
an additional button, then please add it first - it has a more logical place there.

Btw do you use MessageBox or TaskDialog form?
#146217 personal license
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *MVV »

What is TaskDialog? If it's .NET class, it can't be used in native applications. I use MessageBox function and modify its dialog.

I add button manually when all standard buttons already exist, so I enlarge window and create my button then. It is easy to add button to the bottom or to the right, but adding a button to the left requires moving all standard buttons right, and coloured rectangle will still be too small to hold all buttons.
Last edited by MVV on 2023-10-18, 19:08 UTC, edited 1 time in total.
User avatar
AntonyD
Power Member
Power Member
Posts: 1554
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *AntonyD »

What is TaskDialog?
https://learn.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-taskdialog

Code: Select all

#include <windows.h>
#include <commctrl.h>

int main() {
    // Initialize the common controls library
    INITCOMMONCONTROLSEX icex;
    icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
    icex.dwICC = ICC_STANDARD_CLASSES;

    InitCommonControlsEx(&icex);

    // Define the TaskDialog configuration
    TASKDIALOGCONFIG taskDialogParams = {};
    taskDialogParams.cbSize = sizeof(TASKDIALOGCONFIG);
    taskDialogParams.hwndParent = NULL;
    taskDialogParams.dwFlags = TDF_USE_COMMAND_LINKS;

    taskDialogParams.pszMainIcon = TD_INFORMATION_ICON;
    taskDialogParams.pszMainInstruction = L"Sample TaskDialog";
    taskDialogParams.pszContent = L"This is a custom TaskDialog with four buttons.";

    TASKDIALOG_BUTTON buttons[] = {
        { IDOK, L"OK" },
        { IDCANCEL, L"Cancel" },
        { IDABORT, L"Abort" },
        { 1000, L"SkipAll" }  // Use a custom ID for the SkipAll button
    };

    taskDialogParams.cButtons = ARRAYSIZE(buttons);
    taskDialogParams.pButtons = buttons;

    // Show the TaskDialog
    int buttonId = 0;
    TaskDialogIndirect(&taskDialogParams, &buttonId, NULL, NULL);

    // Handle the button click
    switch (buttonId) {
        case IDOK:
            // OK button clicked
            break;
        case IDCANCEL:
            // Cancel button clicked
            break;
        case IDABORT:
            // Abort button clicked
            break;
        case 1000:
            // SkipAll button clicked
            break;
        default:
            // Handle other buttons or cases
            break;
    }

    return 0;
}
Make sure to link against the Comctl32.lib library when compiling your C++ program.
#146217 personal license
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *MVV »

Well, I tried this code and unfortunately it doesn't work even on my Windows 7, it can't find TaskDialogIndirect function by ordinal in comctl32.dll. That's strange because MSDN states that the function is available since Windows Vista. MessageBox is available on all Windows versions meanwhile...
User avatar
Dalai
Power Member
Power Member
Posts: 9943
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *Dalai »

2MVV
%SystemRoot%\system32\comctl32.dll is version 5.x. The v6 is located somewhere in %SystemRoot%\winsxs, and these files indeed export the TaskDialog and TaskDialogIndirect functions (by name). Not sure if Windows somehow automagically loads the v6 DLL upon calling a function like this.

[ADD]
Windows might load comctl32.dll v6 automatically if an application tells Windows about it in the application manifest. NTLinks Maker doesn't have a manifest, so it's probably not possible to use the newer comctl32.
[/ADD]

Since this function is limited to Vista+ you would need to check for the export of this function before calling it if you want to make sure the program still works on XP (and older).

Anyway, since it's only a (minor) visual glitch I honestly wouldn't bother too much about it.

Regards
Dalai
Last edited by Dalai on 2023-10-22, 12:11 UTC, edited 1 time in total.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *MVV »

It is funny but even 6.1 versions found in my winsxs folder don't have required exported function. So I would say that this function is incompatible with most Windows versions.
Anyway, since it's only a (minor) visual glitch I honestly wouldn't bother too much about it.
Of course, but if there could be an easy and still compatible way, I would use it.
User avatar
Dalai
Power Member
Power Member
Posts: 9943
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *Dalai »

MVV wrote: 2023-10-22, 07:13 UTCIt is funny but even 6.1 versions found in my winsxs folder don't have required exported function.
You looked at the wrong ones. I removed duplicates with a newer Windows build number and got this list:

Code: Select all

C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll
C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\comctl32.dll
C:\Windows\winsxs\amd64_microsoft-windows-shell-comctl32-v5_31bf3856ad364e35_6.1.7601.17514_none_97c2246fee970dbb\comctl32.dll
C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll
C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll
C:\Windows\winsxs\x86_microsoft-windows-shell-comctl32-v5_31bf3856ad364e35_6.1.7601.17514_none_3ba388ec36399c85\comctl32.dll
You need to ignore "comctl32-v5" and "common-controls_*_5.*" as both of them refer to comctl32 v5. That leaves just one of each architecture in case of the list above. And both of them export the appropriate functions. Another way is to let TC search for the text "TaskDialogIndirect" in any comctl32.dll ;)
Of course, but if there could be an easy and still compatible way, I would use it.
See my addition above: include a manifest and Windows will most likely use the newer comctl32.dll automatically. Then you can test it to see if it's any help.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re:

Post by *MVV »

Hi, I've just fixed modifying targets for reparse points, and there were some other small changes.

NTLinks 1.6.1.290 32/64
* fixed modifying target attribute for links
* 'Compare indexes' field renamed to 'Compare indices'
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *petermad »

Language file with updated Danish translation for NTLinks v 1.6.1.290 can be downloaded at https://tcmd.madsenworld.dk/NTLinks_1.6.1.290_Dan.zip
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *MVV »

Thanks, I've updated the package.
supra107
Junior Member
Junior Member
Posts: 5
Joined: 2015-08-29, 15:16 UTC

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *supra107 »

Newest version has a new bug where RP_IsValid will always return "No" on valid symlinks that are relative rather than absolute.

Now this might be a bit odd of an ask, but in the previous version, when I made a symlink to another symlink, it would always return it as valid, even though the second symlink was invalid. Would it be possible to make the validity check recursive, so that rather than checking that whichever path it's referring to exists, it would check if the potential NTFS recursion actually points to a file/folder?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *MVV »

Well, as I see, RP_IsValid logic had always handled relative links incorrectly, thank you for your report! It just checked if link target exists but in case of a relative link it is simply wrong because relative path must be combined with link path.

Regarding your request, it isn't an easy question how RP_IsValid should handle valid links to invalid links... According to its readable name, it isn't clear also. I agree that it would be much better to check the actual target, and also Readme states that this field checks all reparse points in path.

BTW I've found another bug, real path field can't handle relative links to links too...

NTLinks 1.6.1.294 32/64
* Obj_RealPath field now handles relative links to links
* RP_IsValid field is recursive now, like Obj_RealPath
User avatar
panos78
Junior Member
Junior Member
Posts: 22
Joined: 2005-01-07, 17:33 UTC
Location: Thessaloniki

Re: NTLinks + NTLinksMaker: NTFS links creation and information

Post by *panos78 »

I have made the translation for Hellenic (Greek).

Code: Select all

; NTLinksMaker 1.4.0.402, μετάφραση Δρ. Παναγιώτης Ε. Παπάζογλου

[NTLinks Maker]
; Ελληνικά μηνύματα (1253) - προσοχή με τις παραμέτρους μορφοποίησης όπως «%s» και «%X»
1=&Ναί
2=&Όχι
3=&Εντάξει
4=&Άκυρο
5=Να&ι σε Όλα
6=Ό&χι σε Όλα
7=Α&γνόηση όλων
8=&Δημιουργία συνδέσμου(ων) για %d αντικείμενο(α) ως:
9=Α&ριθμός επιπέδων για διπλότυπα ως φακέλους:
10=Σφάλμα δημιουργίας συνδέσμου:\n%s\n\nΠροορισμός συνδέσμου:\n%s\n\nΠεριγραφή σφάλματος:\n
11=Η δημιουργία συμβολικού συνδέσμου απαιτεί αναβάθμιση (δικαιώματα διαχειριστή).
12=Φαίνεται ότι τα Windows δεν υποστηρίζουν συμβολοσυνδέσμους (προ-Vista εκδόσεις χωρίς εγκατεστημένο πρόγραμμα οδήγησης Masatoshi Kimura).\n\nΘέλετε να δημιουργήσετε διασταυρώσεις και σκληρούς συνδέσμους;
13=Διατήρηση τμηματικών διαδρομών των στοιχείων σε σχέση με τον ακόλουθο φάκελο &βάσης:
14=&Τύπος συνδέσμου για αρχεία:
15=Σκληροί σύνδεσμοι
16=Συμβολικοί σύνδεσμοι (αν απαιτείται)
17=Συμβολικοί σύνδεσμοι μόνο
18=Διασταυρώσεις
19=Σχετικοί συμβολικοί σύνδεσμοι
20=Τύπος σ&υνδέσμου για αρχεία:
21=Η διατήρηση σχετικών διαδρομών θα απενεργοποιηθεί διότι απαιτεί όνομα αρχείου που εκκινεί με αστερίσκο.
22=Σχετικοί συμβολικοί σύνδεσμοι (αν είναι δυνατό)
:)
Post Reply