Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor manojkumar.m's Avatar
    Join Date
    Jan 2008
    Posts
    272
    Hi friends,

    I want to know the screen width and height?

    How to do this programmatically?

    Thanks,
    Manoj.

  2. #2
    Super Contributor deepchand86's Avatar
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889
    ClientRect()
    it will give the screen size of your appln...

  3. #3
    Regular Contributor manojkumar.m's Avatar
    Join Date
    Jan 2008
    Posts
    272
    Quote Originally Posted by deepchand86 View Post
    ClientRect()
    it will give the screen size of your appln...
    will it give like 240*320 for a mobile device which is having screen size 240*320?

    Thanks,
    Manoj.

  4. #4
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    In case of GUI applications, ApplicationRect is even better, and especially CEikonEnv::ScreenDevice, then CWsScreenDevice::SizeInPixels for example.
    You may also succeed in creating CWsScreenDevice in GUI-less code, apparently you need a Window Server session for that.
    And HAL may also help you (like EDisplayXPixels and EDisplayYPixels).

  5. #5
    Super Contributor nital_shah's Avatar
    Join Date
    Jun 2008
    Posts
    593
    hi...

    u can get it from the Container Class...

    void LayoutControls()
    {
    // Print the Following 2 things..

    Rect().Width();
    Rect().Height();
    }

  6. #6
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Well, the container class is exactly the one which does not know the size of the screen. That Rect is set via SetRect in construction-time. Setting it to 5,5-10,15 obviously will not cause your display to be 5x10 pixels large.

  7. #7
    Super Contributor nital_shah's Avatar
    Join Date
    Jun 2008
    Posts
    593
    Quote Originally Posted by wizard_hu_ View Post
    Well, the container class is exactly the one which does not know the size of the screen. That Rect is set via SetRect in construction-time. Setting it to 5,5-10,15 obviously will not cause your display to be 5x10 pixels large.
    If u try to get the size from the Draw Function,it wud return (0,0)

    but if u try to get it from LayOutControl as i suggested, it will give u the size of the Client-Area.. i have done the same..

  8. #8
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    AknLayoutUtils::LayoutMetricsRect will give you the sizes the current screen artifacts.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Similar Threads

  1. Screen height and width
    By esben@folia in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2008-07-01, 13:20
  2. the camera issue,why the width and height changed
    By dengjian82 in forum Symbian C++
    Replies: 2
    Last Post: 2007-11-16, 01:31
  3. MMS browser width and height ??
    By cumminsj in forum General Messaging
    Replies: 0
    Last Post: 2007-03-14, 08:11
  4. Text size: height e width
    By oper6600 in forum Python
    Replies: 3
    Last Post: 2007-01-29, 09:30
  5. Replies: 7
    Last Post: 2006-09-01, 09:30

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