Symbian开发小结
2010-05-31 19:42:00 来源:WEB开发网15、获取手机剩余内存字节数
TMemoryInfoV1Buf info;
UserHal::MemoryInfo(info);
TInt freeMemory = info().iFreeRamInBytes;
16、控制用户输入长数字串
void CTestDlgDialog::PrepareLC(TInt aResourceId)
{
CEikDialog::PrepareLC( aResourceId );
// Pick up the Editor control from the dialog
CEikEdwin* control = static_cast
// Set the input mode
control->SetAknEditorInputMode(EAknEditorNumericInputMode);
// Restrict the other input modes
control->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
}
17、播放wav声音文件
const TInt KSnapSoundId = 2;
CAknKeySoundSystem* iCameraSound;
iCameraSound =
static_cast
if (iCameraSound)
{
TRAPD(error, iCameraSound->AddAppSoundInfoListL(R_CAMERA_SNAP_SOUND));
if ((error != KErrAlreadyExists) && (error != KErrNone))
{
User::LeaveIfError(error);
}
}
iCameraSound->PlaySound(KSnapSoundId);
//以下在rss文件中定义
#define KcameraSoundFile "Z:\system\sounds\digital\Camera1a_2_8kHz.wav"
#define KSnapSoundId 2
RESOURCE AVKON_SOUND_INFO_LIST r_camera_snap_sound
{
list =
{
AVKON_SOUND_INFO
{
sid = KSnapSoundId;
priority = 45;
preference = EAknAudioPrefCamera; // defined in avkon.hrh
file = KCameraSoundFile;
}
};
}
18、搜索可用的WLAN网络
#include
void CWlanTest:: ListNetworksAndSignalL(CDesCArraySeg& aNetworks)
- ››开发Android 日历教程
- ››开发学院总结 Win 8实用技巧大全
- ››开发学院原创教程:把win8的IE10放桌面上方法(非...
- ››开发者眼中的Windows Phone和Android
- ››Symbian S60 SocketConnection参数
- ››开发学院教你用SQL 语句最快速清空MySQL 数据表的...
- ››Symbian乏力:2010年诺基亚悲情大事记
- ››Symbian三大升级开启2011年新战略
- ››Symbian/Android/iOS/WM安装包对比
- ››Symbian一个活动对象的测试例子
- ››Symbian ListBox控件
- ››Symbian下自动切换SDK的批处理代码
更多精彩
赞助商链接