i am so tired!
anyone help me solve the bug?
thanks very much!
download
i am so tired!
anyone help me solve the bug?
thanks very much!
download
#ifndef DECODER_H_
#define DECODER_H_
#include <e32base.h>
#include <ImageConversion.h>
#include <FBS.H>
#include "drawBltAppView.h"
class CMyDecoder : public CActive
{
public:
static CMyDecoder* NewL(CdrawBltAppView* aDrawBltAppView);
CMyDecoder();
~CMyDecoder();
void ConstructL(CdrawBltAppView* aDrawBltAppView);
void StartDecodeAndDisplay(TFileName& aFileName);
void RunL();
void DoCancel();
private:
CdrawBltAppView* iDrawBltAppView;
CImageDecoder* iImageDecoder;
CFbsBitmap* iBitmap;
};
#endif /*DECODER_H_*/
#include "Decoder.h"
CMyDecoder* CMyDecoder::NewL(CdrawBltAppView* aDrawBltAppView)
{
CMyDecoder* self = new ( ELeave ) CMyDecoder;
CleanupStack::PushL( self );
self->ConstructL( aDrawBltAppView );
CleanupStack::Pop();
return self;
}
CMyDecoder::CMyDecoder():CActive( CActive::EPriorityUserInput )
{
}
CMyDecoder::~CMyDecoder()
{
iImageDecoder->Cancel();
Cancel();
}
void CMyDecoder::ConstructL(CdrawBltAppView* aDrawBltAppView)
{
iDrawBltAppView = aDrawBltAppView;
CActiveScheduler::Add( this );
}
void CMyDecoder::StartDecodeAndDisplay(TFileName& aFileName)
{
RFs iFs; // for opening/saving images from/to files
User::LeaveIfError( iFs.Connect() );
iImageDecoder = CImageDecoder::FileNewL( iFs, aFileName );
iBitmap = new (ELeave) CFbsBitmap();
iBitmap->Create( iImageDecoder->FrameInfo().iOverallSizeInPixels,
iImageDecoder->FrameInfo().iFrameDisplayMode );
// start conversion to bitmap
iImageDecoder->Convert( &iStatus, *iBitmap );
SetActive();
}
void CMyDecoder::RunL()
{
iDrawBltAppView->DrawMyBitmap(iBitmap);
}
void CMyDecoder:oCancel()
{
iImageDecoder->Cancel();
}
what's wrong with my code?
RFs not close.
Last edited by Skygyl; 2008-03-20 at 05:20.
bmp1:"\\system\\picture\\smilmask.bmp":system error (-12)
bmp2:"z:\\system\\picture\\smiley.bmp":wserv 9
Hi Where is ur mbm file, i mean location of mbm file.
Regards
Md.kashif
WSERV 9
Attempted to use a non-active graphics context.
A drawing request was sent to a graphics context when the context was not active.
On the server side, this panic is raised by CWsGc::CommandL() on all requests received when the context isn’t active except EWsGcOpActivate, EWsGcOpDeactivate, EWsGcOpFree, and EWsGcOpTestInvariant.
thanks! it can display the picture
iDrawBltAppView->DrawMyBitmap(iBitmap);
the DrawMyBitmap(...) function is error