Find the next step in your career as a Graphisoft Certified BIM Manager!

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

How to make progress bar move?

Anonymous
Not applicable
Hi.

I am trying to use DG::ProgressBar but I don't know how to make the bar move. It just stays still. Should I rewrite some functions?
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Anonymous
Not applicable
I have solved it. To make it move, you should use class "modeless" but not class "modal". Class "modal" will block the program to wait for action like a click or something else.

View solution in original post

7 REPLIES 7
Ralph Wessel
Mentor
I haven't used that specific control, but I assume ProgressBar::SetValue would do it.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
I haven't used that specific control, but I assume ProgressBar::SetValue would do it.
Thank you. But I was wondering if the dialog can keep showing while the program call SetValue? I can only make the dialog show itself by calling "dialog.Invoke()". But the dialog shown by Invoke() seems to be a still one and the progress bar of it doesn't move.
Ralph Wessel
Mentor
scandi wrote:
I was wondering if the dialog can keep showing while the program call SetValue? I can only make the dialog show itself by calling "dialog.Invoke()". But the dialog shown by Invoke() seems to be a still one and the progress bar of it doesn't move.
What is the context? Are you displaying something like a progress window while a process is running? If so, you probably want a palette rather than a modeless dialog. You might need to call a redraw method on a progress bar if the value is changed too.

Also, if this is a progress window, you might want to use Archicad's standard process feedback UI. Take a look at the documentation for APIIo_InitProcessWindowID - it provides a code sample. There's probably a C++ wrapper for that too if you hunt around - the documentation for this is mostly absent though.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
scandi wrote:
I was wondering if the dialog can keep showing while the program call SetValue? I can only make the dialog show itself by calling "dialog.Invoke()". But the dialog shown by Invoke() seems to be a still one and the progress bar of it doesn't move.
What is the context? Are you displaying something like a progress window while a process is running? If so, you probably want a palette rather than a modeless dialog. You might need to call a redraw method on a progress bar if the value is changed too.

Also, if this is a progress window, you might want to use Archicad's standard process feedback UI. Take a look at the documentation for APIIo_InitProcessWindowID - it provides a code sample. There's probably a C++ wrapper for that too if you hunt around - the documentation for this is mostly absent though.
Thank you. I will try the palette. Is there any sample for that?
Ralph Wessel
Mentor
scandi wrote:
I will try the palette. Is there any sample for that?
Take a look at OwnerDrawnListBoxPalette in DG_Test or BrowserPalette in BrowserControl.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
scandi wrote:
I will try the palette. Is there any sample for that?
Take a look at OwnerDrawnListBoxPalette in DG_Test or BrowserPalette in BrowserControl.
Thanks a lot!
Solution
Anonymous
Not applicable
I have solved it. To make it move, you should use class "modeless" but not class "modal". Class "modal" will block the program to wait for action like a click or something else.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!