error creating graphic context: error C2065:'SystemGc' : undeclared identifier
My line of code:
CWindowGc& gc = SystemGc();
error C2065: 'SystemGc' : undeclared identifier
what header file/ library am i missing??
If you are inside CCoeControl class methods, like Draw() you can use CCoeControl's SystemGc() method. Otherwise please use iCoeEnv->SystemGc().
(V) - Forum Nokia
I was trying to do it within my View's (CAknView) ConstructL method.
Anyway, I'm now trying to place a background image in my Container (CCoeControl).
When my program runs the 2nd line of code the program crashes.
iBackgroundImage = NBitmapMethods::CreateBitmapL(KF2FMbmFileName2, EMbmF2fBackground);
I've already included the namespace file bitmapmethods.h and bitmapmethods.cpp.
The mbm and mbg files are created. This is from my mbg file
I don't know why even the 2nd line of code can fail. Any ideas Denever?
I decided to try it displaying the background image using the View(CAknView) again instead of the Container.
I now have this in the ConstructL() method of the View
BaseConstructL( R_F2F_MAIN_VIEW );
iBackgroundImage = NBitmapMethods::CreateBitmapL(KF2FMbmFileName,EMbmF2fBackground);
//CWindowGc& gc = SystemGc();
CWindowGc& gc = iCoeEnv->SystemGc();
But the compiler has a problem with Rect():
'Rect' : undeclared identifier
So i change it to this, since ClientRect() is from CAknView:
It compiles fine, but when i run the application it crashes, telling me "System Error!!!"
pls help me denever!