News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

ListView Progressbar

Started by WiiLF23, October 16, 2023, 02:47:28 AM

Previous topic - Next topic

WiiLF23

If anyone wants to play with another way, which in my project this paints directly and allows a lot more to customize.

Taken from:
https://www.codeproject.com/Articles/646482/Custom-Controls-in-Win-API-Control-Customization


John Z

Good work, nice visual.

John Z

P.S. When you come back to this code in 10 years having at least a few comments might be appreciated  :)
just a suggestion ......  ;)

John Z

#17
Hi WiiLF23,

You did such a good job with your ListView ProgressBar I could not help myself but to tweak it a bit - sorry...

It was ready to be UNICODE with all the work that you did so I 'finished' it with minor changes to be UNICODE when:
#define UNICODE
#define _UNICODE
are included.

Without the two defines then it is in the original ANSI :)


Also add a bit of flexibility to color the 4 defined states text easier without changing the base routine.

Could also be interesting to color the progress bar the same as the text (but I've not done that  ;))

John Z


WiiLF23

#18
You would be shocked what I have done with Pelles C. I cant thank this compiler/IDE enough! I completely removed the entire Visual Studio stack just days ago, this is a dedicated C dev machine now. WinAPI and we are clear sailing! Boy am I glad I put a torch to the .NET installations, never again.

Just so some of you see what can be done with attached progress code (I'm using the same code).



@John Z

"Without the two defines then it is in the original ANSI" - that makes complete sense! While im dealing a fair bit of narrow/wide conversion between server DLL and the application itself. That is very helpful, thank you.

"Could also be interesting to color the progress bar the same as the text" - I was at this for about 15 minutes going through different color ranges for visual appeal (I've been building complete websites for 21 years) so its easy for me and I get very anal on even a pixel out in my presentation. It came down to

100: RGB(255, 255, 255)
<100: RGB(36, 36, 36)

It was a tough call as I would prefer white progress text the entire time, but it just doesnt look good (I'm on a 2003 19" widescreen TFT). High resolution pictures of the app on the iPad looks amazing (deep pixel density), so I just go off of that after a day of UI updates so I know it looks good.

Realistically, I have plans to draw within the progressbar and inherit the design pattern of Windows8+ file copy dialog. I wish the GDI control on that was open source, but the drawing procedures are likely buried deep in the operating system, if not entirely unavailable. I see it on Task Manager too, so its clearly in the operating system.

So that within the progress (measuring speeds within) would be a heck of an accomplishment. If I can pull it off, I'll put it on here and you guys can review the code.



Vortex

Hi WiiLF23,

QuoteI completely removed the entire Visual Studio stack just days ago.

You did well. The VS IDE is a monster consuming a lot of resources.
Code it... That's all...

John Z

Hi WiiLF23,

Looks nice, good aesthetics,

Quote from: WiiLF23 on December 03, 2023, 06:40:22 AM
It was a tough call as I would prefer white progress text the entire time, ....
Yup, I find a white font color really limits the background color range. Personally I prefer a dark grey background (128,128,128) when using a white font.

John Z