×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    How to create a application which only use part of the screen?

    Hi All,
    I want to create a application which does'nt use the full screen area. I want it just use a little rectangle without status pane and softkey.

    I try to accomplish this by below codes in the container:
    Code:
    void CxxxAppView::ConstructL(const TRect& aRect)
        {
            CreateWindowL();
        TRect newRect(aRect.Width()/3,aRect.iTl.iY,aRect.Width(),2*aRect.Height()/3);
    
        SetRect(newRect);
    	
        ActivateL();
    
         TRect tRect(0,0,newRect.Width(),newRect.Height());
         CreateListBox();
         iListBox->SetRect( tRect );//iListBox is a listbox I have created in CreateListBox()
        }
    The application can't be launched. If I don't use the smaller
    rectangle, it's ok, but it's not what I want.

    Any clue will be highly appreciated!

  2. #2
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: How to create a application which only use part of the screen?

    Hi, the window you created is almost right.
    but the listbox in symbian s60 will default use the whole screen, I think.
    you should implement your own listbox, if you want to use part of the screen.

    Quote Originally Posted by goodtaste
    Hi All,
    I want to create a application which does'nt use the full screen area. I want it just use a little rectangle without status pane and softkey.

    I try to accomplish this by below codes in the container:
    Code:
    void CxxxAppView::ConstructL(const TRect& aRect)
        {
            CreateWindowL();
        TRect newRect(aRect.Width()/3,aRect.iTl.iY,aRect.Width(),2*aRect.Height()/3);
    
        SetRect(newRect);
    	
        ActivateL();
    
         TRect tRect(0,0,newRect.Width(),newRect.Height());
         CreateListBox();
         iListBox->SetRect( tRect );//iListBox is a listbox I have created in CreateListBox()
        }
    The application can't be launched. If I don't use the smaller
    rectangle, it's ok, but it's not what I want.

    Any clue will be highly appreciated!
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

  3. #3
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Re: How to create a application which only use part of the screen?

    Thank you.
    I have decided to implement my out listbox.
    Now I have a new question:
    My application will go to the top of the screen when there is a incoming call.
    But when it is on the top, it accept all the key events,except "Answer Call" and "Hang Up" key. But I want user can still use the "option" key to handle the calling (My application does'nt have a option panel). Is there any way to accomplish this?

  4. #4
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Re: How to create a application which only use part of the screen?

    Can anyone help me?
    My question is how to make the on-top applicaition only filter part of key events and pass others to system?

  5. #5
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: How to create a application which only use part of the screen?

    When you consuming a key, just return KeyWasNotConsumed. I think that will work
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

  6. #6
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Re: How to create a application which only use part of the screen?

    Maybe I don't clarify my problems.
    When there is a incoming call, I bring up my application to the top on the screen. But it only use a small rectangle. I hope the user can still use all
    the keys except upArrow/downArrow.
    I have ever tried to return NotConsumed in the CCoeControl::OfferKeyEventL(), but it does'nt work.
    I guess return NotConsumed just pass the
    event to the view's uplevel windows, but can't go out of the application.

    Should I overload the CCoeAppUi::HandleKeyEventL() instead?

  7. #7
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Re: How to create a application which only use part of the screen?

    Could anybody help?

  8. #8
    Super Contributor
    Join Date
    Oct 2005
    Posts
    739

    Re: How to create a application which only use part of the screen?

    Quote Originally Posted by goodtaste
    Could anybody help?
    HI

    If you make that application as fullscreen can you detect key events...??(when there is no incoming call).

    Peter

  9. #9
    Registered User
    Join Date
    Apr 2007
    Location
    Beijing China
    Posts
    9

    Re: How to create a application which only use part of the screen?

    you can transfer the pressed key to phone app to handle, like this:

    TApaTaskList tlist(iEikonEnv->WsSession());
    TApaTask app(tlist.FindApp(KPhoneAppUid));

    // send a keypress to the phone app
    if (app.Exists())
    {
    app.SendKey(aKeyEvent);
    }


    put the code into your OfferKeyEventL func.

  10. #10
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Re: How to create a application which only use part of the screen?

    It works! Thank you

Similar Threads

  1. Hw to Create user authentication to my application
    By praveena in forum Mobile Java General
    Replies: 0
    Last Post: 2005-09-21, 06:08
  2. Create Application Package is permanently Disabled
    By Shazard in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-08, 20:46
  3. Replies: 0
    Last Post: 2003-06-11, 07:47
  4. Cannot create Application Package
    By LeloProductions in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-02-13, 09:10
  5. filtering application as a recipient?
    By aidj in forum General Messaging
    Replies: 1
    Last Post: 2002-11-12, 06:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×