H檔:
#include <eikenv.h> // for CAknEnv::Static()
#include <aknindicatorcontainer.h> //for CAknIndicatorContainer
#include <aknedsts.h>

 

struct S_uid: public TUid
{
S_uid(int i)
{
iUid = i;
}
};

 

class MAknEditingStateIndicator
{
public:
// virtual void SetState(TAknEditingState aState) = 0;
virtual void SetState(TInt aState) = 0;
virtual CAknIndicatorContainer *IndicatorContainer() = 0;
};

 

S檔:

 

void GetInputMethod( )
{
MAknEditingStateIndicator * ei = CAknEnv::Static()->EditingStateIndicator ( );
if (!ei )
return;

 

CAknIndicatorContainer *ic = ei->IndicatorContainer ( );
if (!ic )
return;
if (ic->IndicatorState (S_uid (EAknNaviPaneEditorIndicatorPinyin )))
{
//拼音
}
else
if (ic->IndicatorState (S_uid (EAknNaviPaneEditorIndicatorStroke )))
{
//筆劃
}
else
if (ic->IndicatorState (S_uid (EAknNaviPaneEditorIndicatorLowerCase ) ) )
{
//abc
}
else
if (ic->IndicatorState (S_uid (EAknNaviPaneEditorIndicatorUpperCase ) ) )
{
//ABC
}
else
if (ic->IndicatorState (S_uid (EAknNaviPaneEditorIndicatorTextCase ) ) )
{
//Abc
}
else
if (ic->IndicatorState (S_uid (EAknNaviPaneEditorIndicatorNumberCase ) ) )
{
//123
}

 

}
創作者介紹
創作者 shadow 的頭像
shadow

資訊園

shadow 發表在 痞客邦 留言(0) 人氣()