any one show me how i put an image in a dialog and resize the size of a dialog? I am developing an application by modifying the GUI Hello World example of 3rd edition on carbide 1.2
now I think I have some minor problem. my resource file is :
RESOURCE IMAGE image1
{
horiz_align=EEikLabelAlignHCenter;
vert_align=EEikLabelAlignVTop;
bmpfile="c:\\zod.mbm";
bmpid=0;
} and in my view file:
void ChoroscopeAppView::ConstructL( const TRect& aRect )
{
// Create a window for this application view
CreateWindowL();
CEikImage *iImage=new (ELeave)CEikImage;
iImage->SetContainerWindowL(*this);
TResourceReader reader;
iCoeEnv->CreateResourceReaderLC(reader, IMAGE1);
iImage->ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy(); // Resource reader
SetRect(aRect);
ActivateL();
// Set the windows size
SetRect( aRect );
// Activate the window, which makes it ready to be drawn
ActivateL();
} I have the following errors:
illegal use of incomplete struct/union/class 'TResourceReader'
undefined identifier 'IMAGE1'
location of my mbm file is:
C:\Symbian\9.2\S60_3rd_FP1\Epoc32\winscw\c
let me put my problem in a simple way.
How i put a background image on the default 3rd edition gui hello world application? the code I put above some how works for 2nd edition and couldn't able to find any info for the 3rd.
I would appreciate if I advised which files to include. which classes to modify etc..
rgds
nex
Forum posts: 51
Class CEikImage can helpful to you.
good luck
Forum posts: 30
hi tanks for the replay.
now I think I have some minor problem.
my resource file is :
RESOURCE IMAGE image1
{
horiz_align=EEikLabelAlignHCenter;
vert_align=EEikLabelAlignVTop;
bmpfile="c:\\zod.mbm";
bmpid=0;
}
and in my view file:
void ChoroscopeAppView::ConstructL( const TRect& aRect )
{
// Create a window for this application view
CreateWindowL();
CEikImage *iImage=new (ELeave)CEikImage;
iImage->SetContainerWindowL(*this);
TResourceReader reader;
iCoeEnv->CreateResourceReaderLC(reader, IMAGE1);
iImage->ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy(); // Resource reader
SetRect(aRect);
ActivateL();
// Set the windows size
SetRect( aRect );
// Activate the window, which makes it ready to be drawn
ActivateL();
}
I have the following errors:
illegal use of incomplete struct/union/class 'TResourceReader'
undefined identifier 'IMAGE1'
location of my mbm file is:
C:\Symbian\9.2\S60_3rd_FP1\Epoc32\winscw\c
tanks in advance
nex
Forum posts: 30
hello again
now I fixed my 1st error which was: file.
illegal use of incomplete struct/union/class 'TResourceReader'
by including #include
but I still have this:
undefined identifier 'IMAGE1' error message.
hope to hear form some one soon
nex
Forum posts: 1210
Include the .rsg file, the constants generated from the resource file are there, and needed by your program.
René Brunner
Forum posts: 30
hi,
tanks rbrunner for replay
let me put my problem in a simple way.
How i put a background image on the default 3rd edition gui hello world application? the code I put above some how works for 2nd edition and couldn't able to find any info for the 3rd.
I would appreciate if I advised which files to include. which classes to modify etc..
rgds
nex