Windows 10 progress bar api

This forum is for eXpress++ general support.
Message
Author
User avatar
Auge_Ohr
Posts: 1440
Joined: Wed Feb 24, 2010 3:44 pm

Re: Windows 10 progress bar api

#11 Post by Auge_Ohr »

hi,
unixkd wrote: Sun Apr 06, 2025 2:35 am I could nod download the attached DXE_PBAR.ZIP, it say no longer available
have you try download/file.php?id=2320 include /phpbb3 ?
greetings by OHR
Jimmy

User avatar
Auge_Ohr
Posts: 1440
Joined: Wed Feb 24, 2010 3:44 pm

Re: Windows 10 progress bar api

#12 Post by Auge_Ohr »

hi,
unixkd wrote: Sun Apr 06, 2025 3:01 am However, I already have something like that.

My question is about windows 10 progressbar that showns graph of the speed of the process. You see this when copying a big directory to another.
this API i do´nt have a Idea what it is
Image

have ask Copilot and he say : it come from Windows Shell API, specifically the IProgressDialog interface.

If you're looking to implement similar functionality in your own applications, you might explore libraries like Microsoft.WindowsAPICodePack or use the Windows SDK for more advanced customization.
greetings by OHR
Jimmy

User avatar
unixkd
Posts: 601
Joined: Thu Feb 11, 2010 1:39 pm

Re: Windows 10 progress bar api

#13 Post by unixkd »

Jimmy

Thanks for your response. That's the control I am talking about. I am not good at winapi

Joe

User avatar
Auge_Ohr
Posts: 1440
Joined: Wed Feb 24, 2010 3:44 pm

Re: Windows 10 progress bar api

#14 Post by Auge_Ohr »

hi,

since 5 Years i do not use Xbase++ any more, i use Fivewin/harbour instead

this CODE is working under Fivewin/harbour, but NOT under Xbase++

Code: Select all

#include "FiveWin.ch"

FUNCTION Main()

   Test()

RETURN NIL

#pragma BEGINDUMP

#include <windows.h>
#include <shlobj.h>
#include <hbapi.h>

void test( void )
{
    CoInitialize(NULL);

    IProgressDialog* pProgress;
    HRESULT hr = CoCreateInstance(CLSID_ProgressDialog, NULL, CLSCTX_INPROC_SERVER, IID_IProgressDialog, (void**)&pProgress);

    if (SUCCEEDED(hr))
    {
        pProgress->SetTitle(L"Copying file...");
        pProgress->StartProgressDialog(NULL, NULL, PROGDLG_NORMAL, NULL);

        for (ULONG i = 0; i <= 100; i++)
        {
            pProgress->SetProgress(i, 100);
            Sleep(50);
        }

        pProgress->StopProgressDialog();
        pProgress->Release();
    }

    CoUninitialize();
}

HB_FUNC( TEST )
{
   test();
}

#pragma ENDDUMP    
greetings by OHR
Jimmy

User avatar
Tom
Posts: 1255
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Windows 10 progress bar api

#15 Post by Tom »

this CODE is working under Fivewin/harbour, but NOT under Xbase++
So it is useless.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
SlavkoDam
Posts: 132
Joined: Wed Apr 27, 2022 10:12 am
Location: Negotin, Serbia
Contact:

Re: Windows 10 progress bar api

#16 Post by SlavkoDam »

Hi,

IProgressDialog shell interface can be created in Xbase++ with Xbase++ CAPI interface. The same code as in Jimmy's Harbour example, can be used. The code can be upgraded with SetAnimation and SetLine methods.
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs

User avatar
unixkd
Posts: 601
Joined: Thu Feb 11, 2010 1:39 pm

Re: Windows 10 progress bar api

#17 Post by unixkd »

Hi Slavkodam and Jimmy.

Thanks for your response and valuable contributions. You people are great.

Happy to hear that it is doable.

Slavkodam we will greatly appreciate it if you could provide us a sample solution. And more importantly how to use xbase++ capi. I couldn't find the documentation for Alaska capi anywhere.

Thanks

Joe

User avatar
SlavkoDam
Posts: 132
Joined: Wed Apr 27, 2022 10:12 am
Location: Negotin, Serbia
Contact:

Re: Windows 10 progress bar api

#18 Post by SlavkoDam »

Joe,

I don't have a sample solution in Xbase++. As I said, it would be like the Jimmy's code in his test() function.
In Xbase++ 2.0, CAPI documentation is in the file xpp-dev.chm, topic Specific APIs->The Xbase++ C-API.
In Xbase++ 1.9, CAPI documentation is in the file xppcapi.hlp.

Slavko
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs

User avatar
Tom
Posts: 1255
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Windows 10 progress bar api

#19 Post by Tom »

Joe, there is no sample solution. Using the C-API for stuff like that is a little complicated. You need to know how to program in C+/++. You need to install a C-compiler, create the code (where ChatGPT may help you with) and use it with "EXTERN" in your application. You need to integrate the control in your eXpress++-code, which is not simple.

Edit:
I couldn't find the documentation for Alaska capi anywhere.
Open the (complete) docs, search for "C-API". Start at the overview.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
unixkd
Posts: 601
Joined: Thu Feb 11, 2010 1:39 pm

Re: Windows 10 progress bar api

#20 Post by unixkd »

Thanks to you all. I appreciate all your contributions.

Joe

Post Reply