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