Circle progress bar

Post a reply


In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Circle progress bar

Re: Circle progress bar

Post by joedf » 02 Apr 2015, 22:08

Another Problem solved :)

Re: Circle progress bar

Post by Guest10 » 02 Apr 2015, 16:28

A small wheel with wedges appears in Chrome browser when I download something and it is a small progress indicator that appears on the lower-left corner of my Chrome book during downloads.

Re: Circle progress bar

Post by Learning one » 02 Apr 2015, 16:23

Bruttosozialprodukt, OK ;)
FanaticGuru, yes I always use #Include LibFullPathHere.ahk in my scripts
Guest10, I'm not sure what do you have on mind... can you show me what do you imagine - how would progress bar loading look in such "Chrome's wheel with wedges" style?

toralf, I just tried to include WM_LBUTTONDOWN monitoring in the class itself, but I never did that before and it seems I don't know to do it :(
I put this in __New():

Code: [Select all]GeSHi © Codebox Plus

if (this.UseClickThrough=0)	; so it's clickable - therefore enable click & drag and handle that via WM_LBUTTONDOWN() method
OnMessage(0x201, this["WM_LBUTTONDOWN"])

Now, if i make WM_LBUTTONDOWN(wParam, lParam, msg, hwnd) method, i'll get error because it requires 5 parameters; (4 +1 hidden; this) and this is documented in OnMessage(): "Failure occurs when Function is known to require more than four parameters"

If I just make WM_LBUTTONDOWN() method (no params) I can't make use of it because this.hwnd returns blank value

Code: [Select all] [Expand]GeSHi © Codebox Plus


I could do something like OnMessage(0x201, Func("CircleProgressClass_WM_LBUTTONDOWN")) but I think that's the wrong approach...
Any advices? How to monitor WM_LBUTTONDOWN message in the class?

Edit: I asked for help here

Re: Circle progress bar

Post by Guest10 » 02 Apr 2015, 14:15

But this is a doughnut progress! :morebeard: :lol:
How about a class for a wheel with wedges like in Chrome download?

Re: Circle progress bar

Post by FanaticGuru » 02 Apr 2015, 14:08

Learning one wrote:FanaticGuru, I don't get such errors...


I imagine you do a #include <Gdip> in your script.

I typically don't do that. I generally just make sure I do a pToken := Gdip_Startup() before I start calling any other functions. After you call one library function all functions in the library are callable even if they do not follow the library naming convention.

FG

Re: Circle progress bar

Post by Bruttosozialprodukt » 02 Apr 2015, 12:20

Learning one wrote:As joedf suggested, I would like to put the following text in CircleProgressClass comments: "Credits: Bruttosozialprodukt, Learning one. This code is public domain." Is that OK with you?

Of course. ;)

Re: Circle progress bar

Post by toralf » 02 Apr 2015, 11:22

Wouldn't it be possible to include this in the class itself, since OnMessage() does now work for more then one CallBackFunc?

Re: Circle progress bar

Post by Learning one » 02 Apr 2015, 10:28

@Bruttosozialprodukt: lol :) 8-) As joedf suggested, I would like to put the following text in CircleProgressClass comments: "Credits: Bruttosozialprodukt, Learning one. This code is public domain." Is that OK with you?
fischgeek wrote:... make it move-able ...
No problem :)

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: Circle progress bar

Post by fischgeek » 02 Apr 2015, 09:17

Thank you.

Re: Circle progress bar

Post by Bruttosozialprodukt » 02 Apr 2015, 08:59

Color format should be 0xAARRGGBB
AA=Alpha (Opacity), RR=Red, GG=Green, BB=Blue
0xFFFF0000 - Red with full opacity
0x440000FF - Blue with low opacity

Re: Circle progress bar

Post by fischgeek » 02 Apr 2015, 08:31

@Learning one - That's awesome. I like that you changed the click-through style - though, I did like that I can click through it. I made some mods to my clock and it stays in the bottom left, but still allows me to click through. Also, thanks for the class implementation. Nice work! ;)

I do have a couple questions though about the capability if anyone can answer them...

1) Is there a physical window for this that would make it move-able? Usually in Gui's I do +ToolWindow -Caption and add a gLabel to a control with PostMessage, 0xA1, 2,,, A so that I can drag it around with a left click and drag. It would be nice to be able to do that with this. I'm assuming without wrapping this in some kind of gui it's not possible.

2) I cannot for the life of me figure out the color code is it hex with a transparency attached to it? What's the format here?

My mind is going crazy with all the possibilities and ideas I have planned for this.

Re: Circle progress bar

Post by Bruttosozialprodukt » 02 Apr 2015, 08:29

Learning one wrote:Bruttosozialprodukt, it seems I hijacked your thread :( I'm sorry do you want me to stop posting?

Yes, stop posting immediately and delete your account or I'm gonna sue you! xD

No, it's great to see that so many people like the idea so much. And I didn't plan to extend/improve the functions anyway. ;)

Re: Circle progress bar

Post by joedf » 02 Apr 2015, 06:55

@learningOne nonsense, Id say just add a comment header with versioning and proper credit to Bruttosozialprodukt and to you, with an open source license of your choice or public domain, etc ;)

Re: Circle progress bar

Post by Learning one » 02 Apr 2015, 05:08

I'm glad you like it guys :)
Nice example fischgeek!
Ferry, yes, you need Gdip_All.ahk, as FanaticGuru said.
FanaticGuru, I don't get such errors...
Bruttosozialprodukt, it seems I hijacked your thread :( I'm sorry do you want me to stop posting?

In v1.03 (see updated second post of this thread) I added option to disable click through style, and did some minor drawing modifications...

What about this concept - multiple circle progres;
Image

Re: Circle progress bar

Post by Ferry » 02 Apr 2015, 01:38

FanaticGuru wrote:
Ferry wrote:Nice! but it is not working on Unicode 64 bit for now.

You just need the 64 bit version of gdip.

https://www.dropbox.com/s/0e9gdfetbfa8v0o/Gdip_All.ahk

You have to rename that to Gdip.ahk and put in your lib folder.

FG


That did the trick. Thanks!

Re: Circle progress bar

Post by FanaticGuru » 01 Apr 2015, 17:34

Learning one wrote:Class:

Code: [Select all] [Expand]GeSHi © Codebox Plus


This line causes an error of Call to nonexistent function:
hbm := CreateDIBSection(this.W, this.W), hdc := CreateCompatibleDC(), obm := SelectObject(hdc, hbm)
It does not seem like this line should occur before a pToken := Gdip_Startup().

Works fine if I forgo the auto detect and insert a pToken := Gdip_Startup().

FG

Re: Circle progress bar

Post by FanaticGuru » 01 Apr 2015, 16:37

Ferry wrote:Nice! but it is not working on Unicode 64 bit for now.

You just need the 64 bit version of gdip.

https://www.dropbox.com/s/0e9gdfetbfa8v0o/Gdip_All.ahk

You have to rename that to Gdip.ahk and put in your lib folder.

FG

Re: Circle progress bar

Post by fischgeek » 01 Apr 2015, 13:58

Re: Circle progress bar

Post by joedf » 01 Apr 2015, 13:28

Somebody make a gist!
like "Circle.ahk" or something ;)

Re: Circle progress bar

Post by fischgeek » 01 Apr 2015, 10:12

I finally get to make my circle clock with ease! Thank you!

Code: [Select all] [Expand]GeSHi © Codebox Plus


Top