News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

'marquee style' progress bar example

Started by sudoku, April 22, 2024, 04:34:50 AM

Previous topic - Next topic

Vortex

Hi sudoku,

Your example works fine. I only proposed some small improvements.

TimoVJL

@Vortex
why not just remove WS_VISIBLE from resource file.

my mistake, WS_VISIBLE is default
May the source be with you

Vortex

Hi Timo,

If you mean the following :

CONTROL "",1003,"msctls_progress32",PBS_MARQUEE|PBS_SMOOTH,12,9,114,12
I am sorry but this will not work. You can edit the original resource script with Pelles IDE : Setting the property Visible of the progress bar to No will modify the flag to NOT WS_VISIBLE.

sudoku

By NOT using SW_HIDE in the intialization, this is the result. Progress bar shows like this upon opening the program, not what is desired.   :rolleyes:


What is desired is that nothing shows until 'start' is pressed. And that is what my example does.

:cool:

sudoku

using 'NOT WS_VISIBLE' in the resource file works (without using SW_HIDE in init.), but seems unorthodox.

Deleted comment, as it did not quite sound as I intended, and it may have offended.
:cool:

Vortex

Hello,

QuoteIt's getting to be that a guy can't post a simple working example without a whole lot of drama.

Now, this statement does not welcome the efforts trying to help you. It was probably my fault. :undecided:

sudoku

Quote from: Vortex on April 23, 2024, 06:55:58 AMIt was probably my fault.
No Vortex, I didn't mean to give you that impression.  Maybe its all my fault for not seeing the forest through the trees.
I do appreciate the help.
Thanks for the tips, as well  :thumbsup:
:cool:

Vortex

Hi sudoku,

No fiasco and nothing wrong. All of us, we are here to learn and experiment. Never get discouraged. Life means trial and error for all the humans.

sudoku

:cool:

sudoku

#24
Here is a custom marquee style progress bar control.
There must be a manifest file for the program that you might use it in.

one of hutch's custom control sources was used as a template.
; ########################################################################

MarqueeProgress proto :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD

;; example
;; invoke MarqueeProgress, hWin, 20, 20, 200, 24, 2004
;; mov hMarquee, eax

MarqueeProgress proc hParent:DWORD, a:DWORD, b:DWORD, wd:DWORD, ht:DWORD, ID:DWORD

    szText mrqClass, "msctls_progress32"

    invoke CreateWindowEx, 0,
            ADDR mrqClass, 0,
            WS_CHILD or WS_VISIBLE or PBS_MARQUEE or PBS_SMOOTH,
            a, b, wd, ht, hParent, ID,
            hInstance, NULL

    ret

MarqueeProgress endp

; ########################################################################

A working example attached. (using generic.exe from masm32 examples)
I will add two buttons later, to work in the same way as my dialog box example.
I had forgotten to add the buttons in this example.
:cool:

NoCforMe

How is that a "custom" control?

A custom control is where you modify the control's default behavior or appearance, most often through the use of owner draw (or subclassing). This is just a stock progress bar, no?
Assembly language programming should be fun. That's why I do it.