Hi everybody,
I was confused and still I am confused but anyhow I overcame with the
problem.Holger suggested that there could be problem with the *short*.
He might be right, but I can't use *int* because compiler gives error for
this. So I did following wild (!*@*~) thing and amazing...... it worked.
/*************A simple function for setting the ****************
**************maximum value in scroll bar ******************/
void SetMaxScrollBar(short setMaxVal)
{
ShortPtr val=new(short);
ShortPtr minVal=new(short);
ShortPtr maxVal=new(short);
ShortPtr pageSize=new(short);
ScrollBarPtr
sclPtr=(ScrollBarPtr)GetObjectPtr(Resource2SkillScrollBar);/* To get ptr of
the ScrollBar*/
SclGetScrollBar(sclPtr,val,minVal,maxVal,pageSize);
SclSetScrollBar(sclPtr,*val,*minVal,setMaxVal,*pageSize);
delete(val);
delete(minVal);
delete(maxVal);
delete(pageSize);
return;
}
Now any answer for this?
Ha Ha Ha :)) but finally I am relaxed.
Rajesh Patidar <[EMAIL PROTECTED]> wrote in message
news:26209@palm-dev-forum...
>
> Hi everybody,
> Just look to this simple code.
>
> /*************A simple function for setting the ****************
> **************maximum value in scroll bar ******************/
>
> void SetMaxScrollBar(short setVal)
> {
> short val=0,minVal=0,maxVal=0,pageSize=0;
> ScrollBarPtr sclPtr=(ScrollBarPtr)GetObjectPtr(Resource2SkillScrollBar);
> SclGetScrollBar(sclPtr,&val,&minVal,&maxVal,&pageSize);
> SclSetScrollBar(sclPtr,val,minVal,setVal,pageSize);
> return;
> }
>
> I am calling this function like this-->
> SetMaxScrollBar(20);
>
> Now when I debug this program, in the function niether the values of val,
> minVal, maxVal or pageSize sets to zero ( in initializing part) nor the
> parameter setVal changes to the argument value(ie. 20).Furthermore in
whole
> function values don't change(no effect of SclGetScrollBar() function!
They
> stuck to -1).
> I am totally confused with this behaviour of the program.
> In fact I tried this also-->
> /**************************************************/
> void SetMaxScrollBar(short setVal)
> {
> short val=0,minVal=0,maxVal=0,pageSize=0;
> //
> setVal=200; // No any effect of this statement !
>
> return;
> }
> Can anybody point out my/system's mistake in this case?
>
> Bye
> Rajesh
>
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/