TBuf<256> cDrivePath;
// phone memory root
cDrivePath.Copy(PathInfo::PhoneMemoryRootPath());
// Images path on c drive
cDrivePath.Append(PathInfo::ImagesPath());
获得存储卡中图片文件夹的路径
TBuf<256> eDrivePath;/* next, the MMC gallery if one exists *///Memory Card root eDrivePath.Copy(PathInfo::MemoryCardRootPath());//Images path in e driveeDrivePath.Append(PathInfo::ImagesPath());
http://www.developer.nokia.com/Community/Wiki/Portal:Symbian_C%2B%2B_(Chinese)
强制打开CEikEdwin关联的虚拟键盘
http://www.developer.nokia.com/Community/Wiki/%E5%BC%BA%E5%88%B6%E6%89%93%E5%BC%80CEikEdwin%E5%85%B3%E8%81%94%E7%9A%84%E8%99%9A%E6%8B%9F%E9%94%AE%E7%9B%98
如何将控件绘制到位图上
Symbian C++中的表单
http://www.developer.nokia.com/Community/Wiki/Symbian_C%2B%2B%E4%B8%AD%E7%9A%84%E8%A1%A8%E5%8D%95
RHostResolver和选择接入点对话框重复显示的问题
http://www.developer.nokia.com/Community/Wiki/RHostResolver%E5%92%8C%E9%80%89%E6%8B%A9%E6%8E%A5%E5%85%A5%E7%82%B9%E5%AF%B9%E8%AF%9D%E6%A1%86%E9%87%8D%E5%A4%8D%E6%98%BE%E7%A4%BA%E7%9A%84%E9%97%AE%E9%A2%98
Symbian^3 Kinetic Scrolling
http://www.developer.nokia.com/Community/Wiki/Symbian%5E3_Kinetic_Scrolling
Symbian如何临听文件目录的变化(NotifyChange)
通常我们在设计程序的时候,可能需要一个UI还需要一个后台的应用程序.
通常根据情况UI需要修改某些配置文件来控制后台应用程序.
这样后台需要有办法监听文件的变化.
看我们如何实现这个监听过程
void CMyCNotify::StartMonitoring()
{
}
屏幕方向改变时如何在exe程序中(无CONE环境)获得通知?
捕捉S60第三版FP2的通话/挂机键
如何将图片读入Symbian位图
void CImage_Reader::GetFileType(const TDesC& aFileName, TDes8& aFileType)
{
TEntry FileEntry;
if(CCoeEnv::Static()->FsSession().Entry(aFileName,FileEntry) == KErrNone)
{
TBuf8<255> FileBuffer;
if(!FileEntry.IsDir())
{
TInt FileSize = FileEntry.iSize;
if(FileSize > 255)
{
FileSize = 255;
}
if(CCoeEnv::Static()->FsSession().ReadFileSection(aFileName,0,FileBuffer,FileSize) ==
KErrNone)
{
RApaLsSession RSession;
if(RSession.Connect() == KErrNone)
{
TDataRecognitionResult FileDataType;
RSession.RecognizeData(aFileName,FileBuffer,*&FileDataType);
if(FileDataType.iConfidence > aResult.iConfidence)
{
aFileType.Copy(FileDataType.iDataType.Des8());
}
RSession.Close();
}
}
}
}
}
如何不用程序框架来绘制屏幕
RWsSession iWsSession;
CWindowGc* iWindowGc;
CWsScreenDevice* iScreenDevice;
RWindowGroup iWindowGroup;
RWindow iWindow;
void CWindowDrawer::Draw(void)
{
iWindowGc->Activate(iWindow);
TRect DrwRect(TPoint(0,0), iWindow.Size());
iWindow.Invalidate(DrwRect);
iWindow.BeginRedraw();
iWindowGc->Clear(DrwRect);
if(iMyFont)
{
}
iWindow.EndRedraw();
iWindowGc->Deactivate();
iWsSession.Flush();
}
void CWindowDrawer::RunL()
{
if (iStatus != KErrCancel)
{
TWsRedrawEvent e;
iWsSession.GetRedraw(e);
// if Windows Server does not want a redraw the window handle is 0
if (e.Handle() != 0)
{
// draw our only window
Draw();
}
iWsSession.RedrawReady(&iStatus);
SetActive();
}
}
void CWindowDrawer::ConstructL(void)
{
CActiveScheduler::Add(this);
User::LeaveIfError(iWsSession.Connect());
iScreenDevice=new (ELeave) CWsScreenDevice(iWsSession);
User::LeaveIfError(iScreenDevice->Construct());
User::LeaveIfError(iScreenDevice->CreateContext(iWindowGc));
TFontSpec MyeFontSpec (KFontArial, 12*15);
MyeFontSpec.iTypeface.SetIsProportional(ETrue);
User::LeaveIfError(iScreenDevice->GetNearestFontInTwips(iMyFont,MyeFontSpec));
iWindowGroup=RWindowGroup(iWsSession);
User::LeaveIfError(iWindowGroup.Construct((TUint32)&iWindowGroup, EFalse));
// iWindowGroup.SetOrdinalPosition(0,ECoeWinPriorityNormal);
iWindowGroup.SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront);
iWindowGroup.EnableReceiptOfFocus(EFalse);
CApaWindowGroupName* winGroupName=CApaWindowGroupName::NewLC(iWsSession);
winGroupName->SetHidden(ETrue);
winGroupName->SetWindowGroupName(iWindowGroup);
CleanupStack::PopAndDestroy();
iWindow=RWindow(iWsSession);
User::LeaveIfError(iWindow.Construct(iWindowGroup, (TUint32)&iWindow));
TPixelsTwipsAndRotation SizeAndRotation;
iScreenDevice->GetDefaultScreenSizeAndRotation(SizeAndRotation);
iWindow.Activate();
iWindow.SetExtent(TPoint(0,0),SizeAndRotation.iPixelSize);
iWindow.SetBackgroundColor(KRgbBlue);
// iWindow.SetOrdinalPosition(0,ECoeWinPriorityNormal);
iWindow.SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
iWindow.SetNonFading(ETrue);
iWindow.SetVisible(ETrue);
Draw();
iWsSession.RedrawReady(&iStatus);
SetActive();
}
void CWindowDrawer::DoCancel()
{
iWsSession.RedrawReadyCancel();
}