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 } 
|