×
Namespaces

Variants
Actions

Archived:Incorrect drawing area returned by CAknView::ClientRect() in S60 2nd Edition (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Issue applies to out of scope platform versions.

In some situations, the drawing area returned by CAknView::ClientRect() is incorrect on the S60 2nd Edition.

Article Metadata
Compatibility
Platform(s): S60 2nd Edition and FP1, FP2, FP3
Symbian
S60 2nd Edition (initial release)
Article
Created: User:Technical writer 1 (22 Nov 2006)
Last edited: hamishwillee (24 Apr 2013)

Description

CAknView implements its own version of the ClientRect() function, which is normally used when setting the size of the container control(s) maintained by the view. In some cases, the height of the rectangle returned by CAknView::ClientRect() is incorrect; this happens when there are both an application-level CBA as well as a view-specific CBA defined in the resource file.

The end result is that the area occupied by the control pane is subtracted twice from the application drawing rectangle, and the height of the rectangle returned by CAknView::ClientRect() is too small.

How to reproduce

This can be easily reproduced with the 'multiviews' example application from S60 2nd Edition, FP3 SDK.

In multiviews.rss, add a CBA definition in the EIK_APP_INFO resource

RESOURCE EIK_APP_INFO     {
cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
}

Then recompile and run the example.

Solution

This issue can be solved by designing the view-based application so that it does not need a CBA defined in EIK_APP_INFO resource (eg., replace it with a CBA from the 'main' view).

Another option is to pass a reference to the AppUi when constructing the view(s), and replace the CAknView::ClientRect() calls with CEikAppUi::ClientRect() calls in the views' implementation.

This page was last modified on 24 April 2013, at 03:45.
57 page views in the last 30 days.
×