|
| Symbian Direct Screen Access Example problem |
 |
Wed, 25 Jan 2006 11:20:58 +080 |
Dear all,
It is my first time to create a direct screen access program on Symbian
Series 60.
I used the example downloaded from nokia, however, I met a link problem.
error LNK2001: unresolved external symbol "public: static class
CWbxVideoPlayerTest * __cdecl CWbxVideoPlayerTest::NewL(
Here is my code:
// Test.h
//------------------------------------------------------------------------
#ifndef DIRECTDISPLAYENG_H
#define DIRECTDISPLAYENG_H
#include <w32std.h>
//class CDirectDisplayRender;
enum DirectDisplayPanics{
DirectDisplayStarted = 1,
DirectDisplayStopped
};
const TInt KGenerationInterval = 10000;
_LIT(KDirectDisplayTxt, "Video");
class PlayerTest : public CTimer, public MDirectScreenAccess{
// Construction & destruction
public:
static PlayerTest * NewL(
// The current window server session owned by the application
RWsSession& aClient,
// The default screen device for the application
CWsScreenDevice& aScreenDevice,
// The RWindow associated with a control.
RWindow& aWindow,
TInt aUserFrameBuffer
);
~PlayerTest ();
private:
// private constructors - use NewL to call it
PlayerTest (
/*
* Window server handling
*/
// The current window server session owned by the application
RWsSession& aClient,
// The default screen device for the application
CWsScreenDevice& aScreenDevice,
// The RWindow associated with a control.
RWindow& aWindow,
TInt aUserFrameBuffer
);
void ConstructL();
public:
void StartDrawingL();
void StopDrawing();
// Are we drawing?
inline TBool Drawing() {return iDrawing;}
private:
void RunL();
void DoCancel();
private:
// Implement MDirectScreenAccess
void Restart(RDirectScreenAccess::TTerminationReasons aReason);
void AbortNow(RDirectScreenAccess::TTerminationReasons aReason);
private:
// Window Server handling
RWsSession& iClient;
CWsScreenDevice& iScreenDevice;
RWindow& iWindow;
// Direct Screen Access
CDirectScreenAccess* iDirectScreenAccess;
CFbsBitGc* iGc;
RRegion* iRegion;
// Are we drawing?
TBool iDrawing;
TInt iUserFrameBuffer;
TRect iFlagRect;
TInt iFrameBufLen;
TPoint iPosition;
};
#endif
//------------------------------------------------------------------------
// Container.cpp
void PlayerContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();
iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL( *this );
iLabel->SetTextL( _L("Example View") );
SetRect(aRect);
iTest = PlayerTest ::NewL(iEikonEnv->WsSession(),
*(CCoeEnv::Static()->ScreenDevice()),
Window(), 0);
ActivateL();
}
If i do not run the iTest = PlayerTest::NewL(..
Then, there is not any error,
I wanna ask anyone can help me to solve this program?
Thanks a lot
|
| Post Reply
|
|
|
|
|
|
|
|
|
|