News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Spinner Control

Started by fearless, December 30, 2012, 02:25:24 AM

Previous topic - Next topic

fearless

A spinner control. Source code and 2 examples included.




Add the following to your project:
include Spinner.inc
includelib Spinner.lib


The spinner is comprised of a number of images, that when incremented via a timer, step to the next image. Add each spinner step to the control before enabling it. For example:
; Call to create and initialize spinner control
Invoke SpinnerControlCreate, hWin, 125, 86, 32, 32
mov hSpinner1, eax
       
; Add spinner step images to your newly created control
Invoke LoadBitmap, hInstance, 101
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap
Invoke LoadBitmap, hInstance, 102
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap
Invoke LoadBitmap, hInstance, 103
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap
Invoke LoadBitmap, hInstance, 104
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap
Invoke LoadBitmap, hInstance, 105
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap
Invoke LoadBitmap, hInstance, 106
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap
Invoke LoadBitmap, hInstance, 107
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap
Invoke LoadBitmap, hInstance, 108
mov hBitmap, eax
Invoke SpinnerAddStepImage, hSpinner1, hBitmap


Enable (start & show) or disable (stop & hide) the spinner control with SpinnerEnable or SpinnerDisable.

All spinners where generated from http://www.ajaxload.info, saved as a gif and each frame extracted to a bmp. See that site for more examples of types of spinners that can be generated.

six_L

nice interface.
thanks for sharing.
Say you, Say me, Say the codes together for ever.

guga

Very, very nice :t
Many tks
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

José Roca


jj2007


dedndave

that's him - a great site to learn from - many great examples   :t

Gunther

Quote from: jj2007 on October 22, 2014, 08:50:46 AM
Your name rings a bell, José - is that you?

Yes he's José Roca from the PowerBasic forum. He's a rock solid coder.

Gunther
You have to know the facts before you can distort them.