Regarding the beam part of your question, I also had trouble with it.
Someone sent me the following function,
which seems to work ok;
#include "irlib.h"
Err SetBeamReceive(Boolean BeamEnabled)
{
UInt refNumber;
PrefSetPreference(prefBeamReceive, BeamEnabled); // let the preference
manager know
SysLibFind(irLibName, &refNumber);
if (refNumber != sysInvalidRefNum){
if (ExgLibControl(refNumber, irSetScanningMode, &BeamEnabled,0) == 0)
return 0;
}
return -1; // If you haven't returned by now, there's been an error
}
Hope this helps.
Kirk
Srinivas Mogalapalli <[EMAIL PROTECTED]> wrote in message
news:11565@palm-dev-forum...
>
> Has anybody used PrefSetPreference extensively. Appreciate your help and
> time.
>
> Here are a few issues that I can't seem to figure out:
>
>
> (i) Where are the possible values for the arguement value for each of the
> choice type for the function below defined?
>
> PrefSetPreference(SystemSetPreferencesChoice choice, UInt32 value)
>
> value = 64;
> PrefSetPreference(prefSysSoundVolume, value);
>
> -> this sets the sound to high. This is OK.
>
> value = 9;
> PrefSetPreference(prefSysSoundVolume, value);
>
> -> this sets it to Medium.
>
> value = 1;
> PrefSetPreference(prefAlarmSoundVolume, value);
>
> -> this also sets it to Medium
>
> value = 0;
> PrefSetPreference(prefAutoOffDuration, value);
> -> this sets it to Off. This also is OK.
>
>
> (ii) How do you set the Overall Sound preference as seen on the "Prefs ->
> General" screen.
>
> (iv) Why doesn't this function call seem to succeed? (atleast on
Emulator -
> I know it doesn't have an IR beam but I can set it manually)
>
> UInt32 value = true;
> PrefSetPreference(prefBeamReceive, value);
>
> So, does this call not work for me.
>
> value = 1;
> PrefSetPreference(prefAutoOffDuration, value);
>
>
> - Srinivas
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/