📄 hellocontainer.h
字号:
#ifndef __HELLOCONTAINER_H__
#define __HELLOCONTAINER_H__
// INCLUDES
#include <aknview.h>
//引入Label类
class CEikLabel;
//引入Listbox类
class CAknSingleNumberStyleListBox;
class CHelloContainer : public CCoeControl
{
public:
//设置内容
void SetTextToListL(TInt aNum, const TDesC& aBuf);
//删除当前选中项
void DeleteTextFromList(TInt& aCurr);
//删除所有项
void DeleteTextFromList();
//获得当前选中项的索引
TInt GetIndexFromList();
public: // Constructors and destructor
CHelloContainer();
virtual ~CHelloContainer();
void ConstructL(const TRect& aRect);
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
private: // Functions from base classes
void SizeChanged();
TInt CountComponentControls() const;
CCoeControl* ComponentControl( TInt aIndex ) const;
void Draw( const TRect& aRect ) const;
private:
//声明Label指针
CEikLabel* iHelpLabel;
//声明listbox指针
CAknSingleNumberStyleListBox* iSingleList;
//声明listbox中内容的动态数组指针
CDesCArrayFlat* iListBoxItem;
};
#endif // __HELLOCONTAINER_H__
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -