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 (EMPCMDSTREAM, DIMSTOP); ieikonenv-> appuifactory () -> Toolbar () -> DrawNow (); // you need this line}