⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mynotepaper.cpp

📁 symbian下的重载控件防短信界面
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CMyNotepaper from MyNotepaper.h
*  Part of  : 
*  Created  : 17.05.2006 by ToBeReplacedByAuthor
*  Implementation notes:
*     Initial content was generated by Series 60 Application Wizard.
*  Version  :
*  Copyright: ToBeReplacedByCopyright
* ============================================================================
*/

// INCLUDE FILES
#include "MyNotepaper.h"


// ================= MEMBER FUNCTIONS =======================

// ---------------------------------------------------------
// CMyNotepaper::Draw(const TRect& aRect) const
// ---------------------------------------------------------
//
void CMyNotepaper::Draw(const TRect& aRect) const
    {
    CEikEdwin::Draw(aRect);
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle( CGraphicsContext::ESolidPen );
    gc.SetPenColor( TRgb(0x6AB4ED) );
    TInt hChar;
    TInt ascent;
    iLayout->GetCharacterHeightAndAscentL(0, hChar, ascent);

    TRect lRect;
    iLayout->GetLineRect(0, lRect);
    TInt hLine = lRect.Height();
    TInt x1 = lRect.iTl.iX;
    //bianbian fix bug: TInt x2 = lRect.iBr.iX;
	TInt x2 = aRect.Width();

    TInt height = aRect.Height();
    TInt y = hChar + (hLine-hChar)/2;
    while(y<=height)
        {
        gc.DrawLine(TPoint(x1, y), TPoint(x2, y));
        y = y + hLine;
        }
    }

TKeyResponse CMyNotepaper::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    {
    DrawDeferred();
    return CEikEdwin::OfferKeyEventL(aKeyEvent, aType);
    }

// End of File  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -