Hello,

How to set the progress bar in my evc++ (win32) Application for volume
controls??


im creating it in initinstance( ); with following code (sample code from
msdn)
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////
hwndPB = CreateWindowEx(0,
PROGRESS_CLASS,
TEXT("Progess Bar"),
WS_CHILD | WS_VISIBLE | PBS_SMOOTH,
10, 286, 220, 30,
hWnd,
NULL,
hInst,
NULL);

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////

and calling while clicking Volume+/Volume-

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////
ShowWindow(hwndPB, SW_SHOW);


SendMessage(hwndPB, PBM_SETRANGE, 0, MAKELPARAM(0,10));
SendMessage(hwndPB, PBM_SETSTEP, MAKEWPARAM(1, 0), 0);

// Send data to the progress bar to make it advance.


SendMessage(hwndPB, PBM_STEPIT, 50, 0);

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////

its not quite working right for me.how to load the progress bar with my
volume(current) setting volume (say 50) for 50%????

and when i click + once it should be 60% and if i click - it should be 40%
accordingly.

any ideas or sample code will be a great help!




Thanks,

Arvind

Re: Progress bar help! by ctacke/>

ctacke/>
Mon Jan 24 06:06:10 CST 2005

Have you called initcommoncontrols?

-Chris


"Arvind" <arvinds@erivasystems.com> wrote in message
news:%23drA5tcAFHA.1300@TK2MSFTNGP14.phx.gbl...
> Hello,
>
> How to set the progress bar in my evc++ (win32) Application for volume
> controls??
>
>
> im creating it in initinstance( ); with following code (sample code from
> msdn)
> ////////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////////
> ////////////////
> hwndPB = CreateWindowEx(0,
> PROGRESS_CLASS,
> TEXT("Progess Bar"),
> WS_CHILD | WS_VISIBLE | PBS_SMOOTH,
> 10, 286, 220, 30,
> hWnd,
> NULL,
> hInst,
> NULL);
>
> ////////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////////
> ////////////////
>
> and calling while clicking Volume+/Volume-
>
> ////////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////////
> ////////////////
> ShowWindow(hwndPB, SW_SHOW);
>
>
> SendMessage(hwndPB, PBM_SETRANGE, 0, MAKELPARAM(0,10));
> SendMessage(hwndPB, PBM_SETSTEP, MAKEWPARAM(1, 0), 0);
>
> // Send data to the progress bar to make it advance.
>
>
> SendMessage(hwndPB, PBM_STEPIT, 50, 0);
>
> ////////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////////
> ////////////////
>
> its not quite working right for me.how to load the progress bar with my
> volume(current) setting volume (say 50) for 50%????
>
> and when i click + once it should be 60% and if i click - it should be 40%
> accordingly.
>
> any ideas or sample code will be a great help!
>
>
>
>
> Thanks,
>
> Arvind
>
>
>



Re: Progress bar help! by Arvind

Arvind
Mon Jan 24 06:56:08 CST 2005

No.

but i got a solution for that.

and one more issue is

when i press a button say"Start" the Progress bar should start incrementing
and when i lift the stylus it should go to 0 immedietely.


how to use this? with the button click event

i tried the following with out success.

case WM_LBUTTONDOWN:
//Start the Progress bar
break;


case WM_LBUTTONUP:
ShowWindow(hwndTM, SW_HIDE);
break;

since the For Loop doesnt allow to break inbetween.


how to implement it?

Thanks,

Arvind

--
"eRiva Systems" - Where Technology Meets Life, Every Minute.

arvindr@erivasystems.com

www.erivasystems.com

"<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message
news:eXOms1gAFHA.4072@TK2MSFTNGP10.phx.gbl...
> Have you called initcommoncontrols?
>
> -Chris
>
>
> "Arvind" <arvinds@erivasystems.com> wrote in message
> news:%23drA5tcAFHA.1300@TK2MSFTNGP14.phx.gbl...
> > Hello,
> >
> > How to set the progress bar in my evc++ (win32) Application for volume
> > controls??
> >
> >
> > im creating it in initinstance( ); with following code (sample code from
> > msdn)
> >
////////////////////////////////////////////////////////////////////////////
> >
////////////////////////////////////////////////////////////////////////////
> > ////////////////
> > hwndPB = CreateWindowEx(0,
> > PROGRESS_CLASS,
> > TEXT("Progess Bar"),
> > WS_CHILD | WS_VISIBLE | PBS_SMOOTH,
> > 10, 286, 220, 30,
> > hWnd,
> > NULL,
> > hInst,
> > NULL);
> >
> >
////////////////////////////////////////////////////////////////////////////
> >
////////////////////////////////////////////////////////////////////////////
> > ////////////////
> >
> > and calling while clicking Volume+/Volume-
> >
> >
////////////////////////////////////////////////////////////////////////////
> >
////////////////////////////////////////////////////////////////////////////
> > ////////////////
> > ShowWindow(hwndPB, SW_SHOW);
> >
> >
> > SendMessage(hwndPB, PBM_SETRANGE, 0, MAKELPARAM(0,10));
> > SendMessage(hwndPB, PBM_SETSTEP, MAKEWPARAM(1, 0), 0);
> >
> > // Send data to the progress bar to make it advance.
> >
> >
> > SendMessage(hwndPB, PBM_STEPIT, 50, 0);
> >
> >
////////////////////////////////////////////////////////////////////////////
> >
////////////////////////////////////////////////////////////////////////////
> > ////////////////
> >
> > its not quite working right for me.how to load the progress bar with my
> > volume(current) setting volume (say 50) for 50%????
> >
> > and when i click + once it should be 60% and if i click - it should be
40%
> > accordingly.
> >
> > any ideas or sample code will be a great help!
> >
> >
> >
> >
> > Thanks,
> >
> > Arvind
> >
> >
> >
>
>