I write code in my "CTestAppView"(inherit from "CCoeControl") ConstructL() funtion:
Run this program, the UI is blank white, the listbox created but I can't see it.....Code:// Create a window for this application view CreateWindowL(); iListBox = new ( ELeave ) CAknSingleStyleListBox; iListBox->SetContainerWindowL( *this ); { TResourceReader reader; iEikonEnv->CreateResourceReaderLC( reader, R_MY_LIST_BOX ); iListBox->ConstructFromResourceL( reader ); CleanupStack::PopAndDestroy(); // reader internal state } // the listbox owns the items in the list and will free them iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray ); iListBox->SetFocus( ETrue ); // Set the windows size SetRect(aRect); // Activate the window, which makes it ready to be drawn ActivateL();

Reply With Quote



