Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

How to check whether Pen Support is Enabled

From Wiki
Jump to: navigation, search

This snippet shows how to check whether Pen Support is enabled or not for the current Layout. This can be especially used at runtime to check/support both touch and non-touch codes maintained within the single source code specially for the controls.

Article Metadata
Platform(s): S60 3rd Edition FP1, S60 5th Edition
S60 5th Edition
S60 3rd Edition FP2
S60 3rd Edition FP1
Platform Security
Signing Required: Self Signed
Capabilities: None
Keywords: AknLayoutUtils::PenEnabled().
Created: vasant21 (22 Oct 2008)
Last edited: hamishwillee (30 May 2013)

MMP file

The following capabilities and libraries are required:

LIBRARY avkon.lib
LIBRARY eikcore.lib


#include <AknUtils.h> 
TBool isPenEnabled = AknLayoutUtils::PenEnabled();


isPenEnabled is ETrue if Pen Support is enabled for the current Layout, EFalse otherwise.

This page was last modified on 30 May 2013, at 04:38.
30 page views in the last 30 days.