wating progressbar

how can i create a wating progress bar or busy progress bar where the progressbar dont now when the work will finshe in mfc c++ do i need to use the CProgressCtrl or another way

thanks




Answer this question

wating progressbar

  • rauland

    The MSDN discussion groups should be used to ask Win32 programming questions, not this Visual C++ forum. (This forum is about the tool, not what you do with it.)

    Brian


  • Malleswar

    CreateEx(....|PBS_SMOOTH|PBS_MARQUEE, rect, this, IDC_PROGRESS1);



  • Rainadaman

    You'd want to use a "marquee" style progress bar, it has a bars continuously moving from left to right. You probably saw it before. If you use the .NET framework, you can set the Style = Marquee property on the ProgressBar control...


  • chongqing

    fst thanks  but how can i use this style i have the manifrest i the style of XP and i am using the  comctl32 version 6.0  but how can i use thos style do i need to any thing else

    my code is

    m_Progress.CreateEx( WS_EX_APPWINDOW|WS_EX_CLIENTEDGE|WS_EX_CONTROLPARENT,

    WS_VISIBLE |WS_CHILD|PBS_SMOOTH , rect, this, IDC_PROGRESS1 );

    m_Progress.SetRange( 0,100 );

    m_Progress.SendMessage(PBM_SETBARCOLOR, 0, RGB(255,0,0));

     thanks



  • Michaelliu

    Yes, Marquee style (PBS_MARQUEE  progress bar style in C++) is the way to go but watch out that it is only supported on Windows XP and later (it also requires comctl32 version 6.0 so you need to have a manifest for your app).

     

     


  • StarsFire

    If your application doesn't know when the work will be finished, it doesn't make sense to use a progress bar. The progress bar should be used for cases where you know how many tasks need to be completed -- an installer which needs to copy 300 files, or a data routine that processes 10,000 records, for example. If it's unknown how much long your process might need to finish, you're better off just putting up a modal "Please wait" window (perhaps with a "Cancel" button in case users get antsy).



  • Casino Game Developer

    yes i tryed to use it but the compiler tel me he cant find the PBS_MARQUEE what i have to do in mfc 7

  • sorcer1

    Put this at the top of the file where you #include the MFC/Windows header files (probably stdafx.h):
    #define _WIN32_WINNT 0x0501

    That tells the header files that you're making a program that will only run correctly on Windows XP...


  • wating progressbar