Hello,
Does anyone know how I can add a progress bar to a listview cell using "pure" api. The only examples I've found are either in c# or outdated mfc
Hello,
Does anyone know how I can add a progress bar to a listview cell using "pure" api. The only examples I've found are either in c# or outdated mfc
You would need to overlay the progress bar onto the list view. You will need to handle column resize and scrolling messages to resize it properly.
Alternatively, you can use DrawThemeBackground() to draw a scroll bar onto the listview, without needing an actual control.
PAINTSTRUCT ps;
HDC hDC = BeginPaint(hwnd,&ps);
RECT r;
HTHEME theme = OpenThemeData(hwnd,L"PROGRESS");
SetRect(&r,10,10,100,25);
DrawThemeBackground(theme,hDC,11, 2 ,&r,NULL);
SetRect(&r,10,10,50,25);
DrawThemeBackground(theme,hDC,5, 4 ,&r,NULL);
CloseThemeData(theme);
EndPaint(hwnd,&ps);
This draws a meter. For a green progress bar, change the 2 and 4 to other numbers (1 and 1 I think).
You could take a look at WTL, there are some nice templates there that may give you some inspiration.