Trick: Change toolbar status(Symbian/UIQ)

类别:软件工程 点击:0 评论:0 推荐:

        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
}

本文地址:http://com.8s8s.com/it/it32993.htm