hellocontainer.h

来自「这是一个关于Symbian Gird控件的程序」· C头文件 代码 · 共 47 行

H
47
字号
#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 + =
减小字号Ctrl + -
显示快捷键?