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.
case CDDS_ITEMPREPAINT:
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;
ListView_GetItemRect(hListView,lplvcd->nmcd.dwItemSpec,&ItemRect,LVIR_BOUNDS);
bgRgn = CreateRectRgnIndirect(&ItemRect);
MyBrush = CreateSolidBrush(RGB(100,100,100));
FillRgn(lplvcd->nmcd.hdc, bgRgn, MyBrush);
DeleteObject(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);
ListView_GetItemText(hListView,lplvcd->nmcd.dwItemSpec,0,iSubTxt1,64);
SetRect(&textRect, ItemRect.left+5,ItemRect.top, ItemRect.right, ItemRect.bottom);
DrawText(lplvcd->nmcd.hdc,iSubTxt1,-1,&textRect, DT_LEFT | DT_NOCLIP);
ListView_GetItemText(hListView,lplvcd->nmcd.dwItemSpec,1,iSubTxt2,64);
SetRect(&textRect, ItemRect.left+Width/3+5,ItemRect.top, ItemRect.right, ItemRect.bottom);
DrawText(lplvcd->nmcd.hdc,iSubTxt2,-1,&textRect, DT_LEFT | DT_NOCLIP);
SelectObject(lplvcd->nmcd.hdc,oldFont);
DeleteObject(newFont);
return CDRF_SKIPDEFAULT;
}