Discussion Board

Results 1 to 7 of 7
  1. #1
    Super Contributor RB_Sahu's Avatar
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189
    Hi,

    I want to draw line and rectangle in my application. I am getting error undefined identifier 'gc'. I know undefined identifier means it is not defined.but it is defined in view class.
    My code is here for drawing line and rectangle..

    case EGUICmdLine:
    { // to draw Line
    TPoint startPoint(50,50);
    TPoint endPoint(590,190);
    gc.DrawLine(startPoint,endPoint);
    break;
    }

    case EGUICmdRect:
    {

    // To draw rectangle
    gc.SetBrushColor( TRgb(255,0,0));
    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
    TRect drawRect(15,15,50,50);
    gc.DrawRect(drawRect);
    }
    In my view class I have this line. CWindowGc& gc = SystemGc();

    Please tell me which mistake I am doing. I need help so please any one answer me or correct my code so I can use.
    I am waiting for valuable response.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  2. #2
    Regular Contributor Lichtens's Avatar
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241
    CWindowGc& gc = SystemGc();
    I think you have spezified this in your draw() Funktion??

    Is your drawing code in the same Funktion?

  3. #3
    Super Contributor RB_Sahu's Avatar
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189
    Quote Originally Posted by Lichtens View Post
    I think you have spezified this in your draw() Funktion??

    Is your drawing code in the same Funktion?
    Hi,
    Thanks for qucik reply,

    It is specified in Draw() function of view class. My drawing code is in AppUI class. Please if you give little bit more details then I can solve my problem.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  4. #4
    Regular Contributor Lichtens's Avatar
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241
    Just make your drawings in the view. Thats what the draw() funktion is made for.

    If you initialize your CWindowGc& lokaly in your Draw() Funktion of the view, the AppUi is not able to know this!

    Regards,
    Andi

  5. #5
    Regular Contributor parag_purkar's Avatar
    Join Date
    Feb 2006
    Location
    India,Pune
    Posts
    311
    Hi ,
    Please check the below link ....
    http://discussion.forum.nokia.com/fo...d.php?t=117392

    Regards,
    Parag Purkar

  6. #6
    Super Contributor RB_Sahu's Avatar
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189
    Hi Lichtens & Prag,

    I am able to draw line and rectangle in my application. Thank you
    Lichtens for your help.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  7. #7
    Super Contributor RB_Sahu's Avatar
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189
    Hi All,

    I have drawing application in which I am able to draw point,line, polyline, polygon,rectangle, and round rectangle. Now I want to draw this continously . How I will do that. Please give me some hints aur idea .I am waiting for reply.

    Thanks in advance.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

Similar Threads

  1. newbe need some help, background sms sending
    By kururu in forum Symbian C++
    Replies: 22
    Last Post: 2009-07-01, 13:44
  2. how to draw background(custom bitmap) in the listbox.
    By hot_jack in forum Symbian User Interface
    Replies: 16
    Last Post: 2009-03-02, 09:12
  3. drawing a rectangle
    By Jeepy in forum Symbian C++
    Replies: 5
    Last Post: 2009-01-19, 10:39
  4. Dialog line prompt is "invisible"
    By wauer in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-03-18, 17:59
  5. Line wrap in lists ?
    By gope in forum Mobile Java General
    Replies: 5
    Last Post: 2004-08-02, 14:29

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