how to get references to current RWsSession, CWsScreenDevice, RWindowBase

Login to reply to this topic.
Mon, 2007-09-24 09:58
Joined: 2007-05-15
Forum posts: 137

Hi,
I am using s60 3rd edn..
I need to get references to RWsSession, CWsScreenDevice, RWindowBase from
appUi/appView class.
Is there any functions to find them out?

With Regards
Sandeep Mohapatra


Mon, 2007-09-24 10:18
Joined: 2004-11-29
Forum posts: 1232
Re: how to get references to current RWsSession, CWsScreenDevic

The RWsSession can be retrieved from CCoeEnv::Static()->WsSession()
The CWsScreenDevice can be retrieved from the above current RWsSession (RWsSession::ScreenDevice())
and
the RWindowBase can be retrieved from any CCoeControl by calling Window() or DrawableWindow().

Mon, 2007-09-24 13:06
Joined: 2007-05-15
Forum posts: 137
Re: how to get .......

Hi Mr. Alh,
Can you tell what is the problem here:
Tect aScreenRect=iAppView->Rect();
aScreenRect.Shrink(10,10);

iCamera->StartViewFinderDirectL(CCoeEnv::Static()->WsSession(),CCoeEnv::Static()->ScreenDevice(),*iAppView->DrawableWindow(), aScreenRect);

I get error as:---

'CCamera::StartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &, TRect &)' (non-static)

'CCamera::StartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &)' (non-static)

function call '[CCamera].StartViewFinderDirectL({lval} RWsSession, CWsScreenDevice *, {lval} RDrawableWindow, {lval} TRect)' does not match

Mon, 2007-09-24 13:24
Joined: 2007-05-15
Forum posts: 137
Re: how to get...........................

hi,
error solved using
*CCoeEnv::Static()->ScreenDevice()

in place of
CCoeEnv::Static()->ScreenDevice()

Thanx...........

  • Login to reply to this topic.