#pragma once #include "MBEmotionTileAdapter.h" #include "MBEmotions.h" // CMBEmotionsWnd command target // ±íÇé--Ñ¡Ôñµã»÷ //class EventEmotionItemClick: public TplEventArgs //{ // SOUI_CLASS_NAME(EventEmotionItemClick,L"on_event_emotionitem_click") //public: // EventEmotionItemClick(SObject *pSender):TplEventArgs(pSender),m_nEmotionIndex(-1){} // enum{EventID=EVT_AMEMOTION_CLICK}; //public: // int m_nEmotionIndex; //}; class CMBEmotionsWnd : public SHostWnd, public CMBEmotionTileAdapter::IListener { public: struct IListener { virtual void EmotionTileViewItemClick(int nIndex) = 0; }; public: CMBEmotionsWnd(IListener* pListner); virtual ~CMBEmotionsWnd(); private: BOOL m_bLayoutInited; // ³õʼ»¯±êʶ STileViewEx *m_pTileVEmotionItem; CMBEmotionTileAdapter *m_pAdapterEmotionItemTile; STileViewEx *m_pTileVEmotionExtren1; CMBEmotionTileAdapter *m_pAdapterExtren1Tile; STileViewEx *m_pTileVEmotionExtren2; CMBEmotionTileAdapter *m_pAdapterExtren2Tile; CMBEmotions *m_pEmotions; HWND m_hParentWnd; // ¸¸Ïî¾ä±ú int m_cxStart; int m_cyStart; int m_cxScreen; int m_cyScreen; private: IListener* m_pListner; public: void OnClose(); //¹Ø±Õ BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam); //int OnMouseActivate(HWND wndTopLevel, UINT nHitTest, UINT message); void OnActivate(UINT nState, BOOL bMinimized, HWND wndOther); void OnDefaultEmotions(); void OnMsgExtrenEmotions(); void OnMsgExtren2Emotions(); void OnEmotionItemClick(int nIndex); protected: virtual void OnFinalMessage(HWND hWnd) { __super::OnFinalMessage(hWnd); delete this; } protected: //°´Å¥Ê¼þ´¦ÀíÓ³Éä±í EVENT_MAP_BEGIN() EVENT_NAME_COMMAND(L"link_default", OnDefaultEmotions) EVENT_NAME_COMMAND(L"link_extern1", OnMsgExtrenEmotions) EVENT_NAME_COMMAND(L"link_extern2", OnMsgExtren2Emotions) EVENT_MAP_END() //´°¿ÚÏûÏ¢´¦ÀíÓ³Éä±í BEGIN_MSG_MAP_EX(CSlimNavWnd) MSG_WM_ACTIVATE(OnActivate) //MSG_WM_MOUSEACTIVATE(OnMouseActivate) MSG_WM_INITDIALOG(OnInitDialog) MSG_WM_CLOSE(OnClose) CHAIN_MSG_MAP(SHostWnd)//×¢Ò⽫ûÓд¦ÀíµÄÏûÏ¢½»¸ø»ùÀà´¦Àí REFLECT_NOTIFICATIONS_EX() END_MSG_MAP() public: void SetParentWnd( HWND hParentWnd ); bool IsInWnd( SOUI::CPoint pt ); // µãÔÚ´°¿ÚÖÐ void SelectedEmotionIndex(int nIndex); void ShowWnd(SWindow *pWnd); void HideWnd(); // Òþ²Ø´°¿Ú protected: };