Re: "Illegal use of incomplete struct/union/class" err
and what is d case here? here is d code:
// INCLUDE FILES
// Class include
#include "SimpleDlgAppUi.h"
// System includes
#include // R_SIMPLEDLG_DIALOG
// User includes
#include "SimpleDlgDialog.h" // CSimpleDlgDialog
#include "SimpleDlgPlayerNameDialog.h" // CSimpleDlgPlayerNameDialog
// ================= MEMBER FUNCTIONS =======================
/**
* Symbian OS 2nd phase constructor. Constructs and executes the application's dialog,
* setting itself as the dialog's MOP parent, and adds it to the control
* stack.
*/
void CSimpleDlgAppUi::ConstructL()
{
BaseConstructL();
iAppDialog = new (ELeave) CSimpleDlgDialog;
iAppDialog->SetMopParent(this);
iAppDialog->ExecuteLD(R_SIMPLEDLG_DIALOG);
AddToStackL(iAppDialog);
}
/**
* Destructor.
* Removes the application's dialog from the stack and deletes it.
*/
CSimpleDlgAppUi::~CSimpleDlgAppUi()
{
if (iAppDialog)
{
RemoveFromStack(iAppDialog);
delete iAppDialog;
}
}
/**
* From CEikAppUi, takes care of command handling.
*
* @param aCommand command to be handled
*/
void CSimpleDlgAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case ESimpleDlgCmdNewGame:
{
if (CSimpleDlgPlayerNameDialog::RunDlgLD (iPlayerName))
{
StartNewGameL();
/* code added by me...intisllly it was empty
{
}
iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL(*this);
Re: "Illegal use of incomplete struct/union/class" err
You should have mentioned a short description about the error and on which line it's getting or at least copy paste the error message here to get more replies...
Forum posts: 1379
Put up the code.
didster
Forum posts: 31
If fact in my Document there was a #include missing... I wasn't including my AppUi.h
Thanks
Certocerto
Forum posts: 72
and what is d case here? here is d code:
// INCLUDE FILES
// Class include
#include "SimpleDlgAppUi.h"
// System includes // R_SIMPLEDLG_DIALOG
#include
// User includes
#include "SimpleDlgDialog.h" // CSimpleDlgDialog
#include "SimpleDlgPlayerNameDialog.h" // CSimpleDlgPlayerNameDialog
// ================= MEMBER FUNCTIONS =======================
/**
* Symbian OS 2nd phase constructor. Constructs and executes the application's dialog,
* setting itself as the dialog's MOP parent, and adds it to the control
* stack.
*/
void CSimpleDlgAppUi::ConstructL()
{
BaseConstructL();
iAppDialog = new (ELeave) CSimpleDlgDialog;
iAppDialog->SetMopParent(this);
iAppDialog->ExecuteLD(R_SIMPLEDLG_DIALOG);
AddToStackL(iAppDialog);
}
/**
* Destructor.
* Removes the application's dialog from the stack and deletes it.
*/
CSimpleDlgAppUi::~CSimpleDlgAppUi()
{
if (iAppDialog)
{
RemoveFromStack(iAppDialog);
delete iAppDialog;
}
}
/**
* From CEikAppUi, takes care of command handling.
*
* @param aCommand command to be handled
*/
void CSimpleDlgAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case ESimpleDlgCmdNewGame:
{
if (CSimpleDlgPlayerNameDialog::RunDlgLD (iPlayerName))
{
StartNewGameL();
/* code added by me...intisllly it was empty
{
}
iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL(*this);
HBufC* labelText;
labelText = StringLoader::LoadLC(R_LABEL_TEXT); // Pushes labelText onto the Cleanup Stack.
iLabel->SetTextL(*labelText);
CleanupStack::PopAndDestroy(labelText);
};*/
break;
}
}
case EEikCmdExit:
{
Exit();
break;
}
default:
break;
}
}
void CSimpleDlgAppUi::StartNewGameL()
{
CEikLabel* iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL(*this);
HBufC* labelText;
labelText = StringLoader::LoadLC(R_LABEL_TEXT); // Pushes labelText onto the Cleanup Stack.
iLabel->SetTextL(*labelText);
CleanupStack::PopAndDestroy(labelText);
}
// End of File
Thanks,
Netra
Forum posts: 732
You should have mentioned a short description about the error and on which line it's getting or at least copy paste the error message here to get more replies...
Forum posts: 1
Hi all,
i am getting this error while Initialization of DynInitMenuPaneL
illegal use of incomplete struct/union/class 'CEikMenuPane'
how to rectify it.. ?
Forum posts: 1242
By including the header file for that class, probably eikmenup.h.
René Brunner
Forum posts: 2006
Actually you can open the documentation and look for CEikMenuPane to get your answer.
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant