I have tried the progress bar example in Series 60 SDK.
And I would like to add a progress bar to my application to test.
I start from a simple container with no control.
I have done the following:
1. Add the following code to ConstructL of my container class
(iPgb is CEikProgressInfo object)
void CHelloWorldPgbContainer::ConstructL(const TRect& aRect)
// Create a window for this application view
// create progress bar without resource file
info.iHeight = 20;
info.iSplitsInBlock = 0;
info.iTextType = EEikProgressTextNone;
info.iWidth = 50;
info.iFinalValue = 50;
iPgb = new(ELeave) CEikProgressInfo(info);
// Set the windows size
// Activate the window, which makes it ready to be drawn
2. Originally, the container is the simplest and has no control. After
adding the progress bar, the following is resulted:
TInt CHelloWorldPgbContainer::CountComponentControls() const
return 1; // no control
CCoeControl* CHelloWorldPgbContainer::ComponentControl(TInt /*aIndex*/)
However, the program always get panic at start after I have added the above
The same thing happens when I use resource file approach instead of setting
SInfo in the source code.
Is there any step I have missed? Could anyone kindly tell me what the
Thank you very much.