static_cast to a custom control...
| Fri, 2006-04-07 17:26 | |
|
Hello,
I have a custom control into a dialog box , like this: SEikControlInfo CAccountDlg::CreateCustomControlL(TInt aControlType) { SEikControlInfo controlInfo; controlInfo.iControl = NULL; controlInfo.iTrailerTextId = 0; controlInfo.iFlags = 0; switch (aControlType) { case ESmileyControl: controlInfo.iControl = new(ELeave) CSmileyContainer(iMainPlugin); break; default: break; } return controlInfo; } void CAccountDlg::PreLayoutDynInitL() { iListBox = static_cast<CSmileyContainer*>(Control(ESmileyControl)); } and in the PreLayoutDynInitL method I want to get a pointer to this control, but my application crashes. Why ? When I do static_cast to other non custom controls , it works. thanks. |
|






Forum posts: 1242
René Brunner