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.

Revision as of 06:48, 13 September 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Drawing a standard border around a CEikEdwin

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia E61i
Nokia E90 Communicator
Nokia N95 8GB
Nokia 6220 Classic
Keywords: TGulBorder, CEikEdwin, TGulBorder::Draw(), TGulBorder::OuterRect(), CEikEdwin::SetBorder(), CEikEdwin::Border()
Created: tapiolaitinen (05 Mar 2008)
Last edited: hamishwillee (13 Sep 2012)



In this code snippet a standard border is drawn around a CEikEdwin. The same technique applies to all controls inherited from CEikBorderedControl.

MMP file

The following libraries are required:

LIBRARY egul.lib
LIBRARY eikcoctl.lib

Header file

CEikEdwin* iEditor;

Source file

void CAppView::ConstructL(const TRect& aRect)
// ...
// Set border type
// ...
void CAppView::Draw(const TRect& aRect) const
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Clear the screen
// Get the border
TGulBorder border = iEditor->Border();
// Draw the border so that it surrounds iEditor
TRect editorRect = iEditor->Rect();
border.Draw(gc, border.OuterRect(editorRect));


A standard border is drawn around a CEikEdwin.

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

This page was last modified on 13 September 2012, at 06:48.
56 page views in the last 30 days.