Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor ThreeSixFiveOh's Avatar
    Join Date
    Nov 2003
    Posts
    50
    My line of code:

    CWindowGc& gc = SystemGc();


    Error:

    error C2065: 'SystemGc' : undeclared identifier

    what header file/ library am i missing??

    Thanks

  2. #2
    Regular Contributor Denever's Avatar
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475
    If you are inside CCoeControl class methods, like Draw() you can use CCoeControl's SystemGc() method. Otherwise please use iCoeEnv->SystemGc().

    Best Regards,
    (V) - Forum Nokia

  3. #3
    Regular Contributor ThreeSixFiveOh's Avatar
    Join Date
    Nov 2003
    Posts
    50
    Denever

    Thanks..

    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.

    _LIT(KF2FMbmFileName2, "\\system\\apps\\F2F\\F2F.mbm");
    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
    enum TMbmF2f
    {
    EMbmF2fBackground,
    EMbmF2fCheck_yes,
    EMbmF2fCheck_yes_mask,
    EMbmF2fCheck_no,
    EMbmF2fCheck_no_mask
    };

    I don't know why even the 2nd line of code can fail. Any ideas Denever?

  4. #4
    Regular Contributor ThreeSixFiveOh's Avatar
    Join Date
    Nov 2003
    Posts
    50
    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

    void CF2FMainView::ConstructL()
    {
    BaseConstructL( R_F2F_MAIN_VIEW );

    _LIT(KF2FMbmFileName, "\\system\\apps\\F2F\\F2F.mbm");
    iBackgroundImage = NBitmapMethods::CreateBitmapL(KF2FMbmFileName,EMbmF2fBackground);
    //CWindowGc& gc = SystemGc();
    CWindowGc& gc = iCoeEnv->SystemGc();
    gc.BitBlt(Rect().iTl,iBackgroundImage);

    But the compiler has a problem with Rect():
    'Rect' : undeclared identifier

    So i change it to this, since ClientRect() is from CAknView:
    gc.BitBlt(ClientRect().iTl,iBackgroundImage);

    It compiles fine, but when i run the application it crashes, telling me "System Error!!!"

    pls help me denever!

  5. #5
    Regular Contributor ThreeSixFiveOh's Avatar
    Join Date
    Nov 2003
    Posts
    50
    Thanks alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved