image in dialog

Login to reply to this topic.
Tue, 2007-12-25 11:18
Joined: 2007-01-22
Forum posts: 30

hi,

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

any help will be appreciated
Merry christmas
nex


Wed, 2007-12-26 03:39
Joined: 2007-04-29
Forum posts: 51
Re: image in dialog

Class CEikImage can helpful to you.
good luck

Wed, 2007-12-26 13:11
Joined: 2007-01-22
Forum posts: 30
Re: image in dialog

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 Smiling

Wed, 2007-12-26 13:49
Joined: 2007-01-22
Forum posts: 30
Re: image in dialog

hello again

now I fixed my 1st error which was:
illegal use of incomplete struct/union/class 'TResourceReader'
by including #include file.
but I still have this:

undefined identifier 'IMAGE1' error message.

hope to hear form some one soon
nex

Wed, 2007-12-26 18:25
Joined: 2005-11-20
Forum posts: 1210
Re: image in dialog

Include the .rsg file, the constants generated from the resource file are there, and needed by your program.


René Brunner

Thu, 2007-12-27 02:09
Joined: 2007-01-22
Forum posts: 30
Re: image in dialog

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

  • Login to reply to this topic.