Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: Custom color for row selection.

Thanks. Though custom drawing is something I'd like to avoid.

Yes, you need Embarcadero C++ Builder XE6 Professional:

Re: Custom color for row selection.

Hi Martin.

Thanks for the info. I assume you are using List view. There was a discussion on this.. code below:

Now I'm also thinking to change the colors globally, but I need to figure it out how these theming stuff works.

Anyway have seen that WinSCP is on GitHub... do you need whole Embarcadero C++ Builder XE6 Professional to build it or would some free option of theirs do the work also?
I would be glad to write this on my own but have no wish to pay another 500eur for another IDE when I already own VS2022.


    if (ListView_GetItemState(hListView,lplvcd->nmcd.dwItemSpec,LVIS_FOCUSED|LVIS_SELECTED) == (LVIS_FOCUSED|LVIS_SELECTED))
        RECT textRect;
        wchar_t iSubTxt1[64];
        wchar_t iSubTxt2[64];
        HFONT oldFont, newFont;
        bgRgn = CreateRectRgnIndirect(&ItemRect);
        MyBrush = CreateSolidBrush(RGB(100,100,100));
        FillRgn(lplvcd->nmcd.hdc, bgRgn, MyBrush);
        SetTextColor(lplvcd->nmcd.hdc, RGB(255,255,255));
        newFont = CreateFont(16, 0, 0, 0, FW_NORMAL, TRUE, FALSE, FALSE,
                                EASTEUROPE_CHARSET, 0, 0, CLEARTYPE_NATURAL_QUALITY,
                                DEFAULT_PITCH | FF_DONTCARE, L"Times New Roman");
        oldFont = (HFONT)SelectObject(lplvcd->nmcd.hdc,newFont);
        SetRect(&textRect, ItemRect.left+5,, ItemRect.right, ItemRect.bottom);
        DrawText(lplvcd->nmcd.hdc,iSubTxt1,-1,&textRect, DT_LEFT | DT_NOCLIP);
        SetRect(&textRect, ItemRect.left+Width/3+5,, ItemRect.right, ItemRect.bottom);
        DrawText(lplvcd->nmcd.hdc,iSubTxt2,-1,&textRect, DT_LEFT | DT_NOCLIP);
        return CDRF_SKIPDEFAULT;

Custom color for row selection.

Hi guys.

First thank you for the awesome program.

Second can you give us the option to change the row selection color (font and background).
As if you use dark mode the selection is hardly visible on a low brightness screen.
If you look very, very closely you will see that there are two rows selected on the right screen.

Anyway it's a real pain and any help is welcomed.

Best regards