现在的位置: 首页 > 综合 > 正文

Trick: Change toolbar status(Symbian/UIQ)

2013年10月14日 ⁄ 综合 ⁄ 共 746字 ⁄ 字号 评论关闭

        While you develop program such as streaming media player ,you want the toolbar which contains PLAY(RESUME)/PAUSE/STOP to switch status among  playback/pause/stop.For example,when stream ends,you need to enable PLAY button and disable PAUSE/STOP buttons.The following code segment demonstates this kind of use:
 
     
    void CStreamClientAppUi::SetToolbarStatusAndDraw()
 {
      TBool dimPlay=EFalse;
      TBool dimPause=ETrue;
      TBool dimStop=ETrue;

      iEikonEnv->AppUiFactory()->ToolBar()->DimCommand(EMPCmdPlayStream,dimPlay);
      iEikonEnv->AppUiFactory()->ToolBar()->DimCommand(EMPCmdPauseStream,dimPause);
      iEikonEnv->AppUiFactory()->ToolBar()->DimCommand(EMPCmdStopStream,dimStop);
  
      iEikonEnv->AppUiFactory()->ToolBar()->DrawNow();                  //You NEED this line
}

抱歉!评论已关闭.