Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
CoolListBox.h
Package: 酒店管理系统源代码.rar [view]
Upload User: czfddz
Upload Date: 2013-03-20
Package Size: 1517k
Code Size: 3k
Category:
Hotel software system
Development Platform:
C/C++
- /*####################################################################
- Filename: coollistbox.h
- ----------------------------------------------------
- ####################################################################*/
- #if !defined(_ANYOU_COOLLISTBOX_H)
- #define _ANYOU_COOLLISTBOX_H
- #if _MSC_VER > 1000
- #pragma once
- #endif
- #include <afxtempl.h>
- #include "CoolTipCtrl.h"
- /*####################################################################
- ------------------------------------------------
- CListBoxItem class
- ------------------------------------------------
- ####################################################################*/
- class CListBoxItem
- {
- friend class CCoolListBox;
- private:
- CCoolListBox* m_parent;
- int m_nImage;
- int m_nIndex;
- UINT ID;//item ID
- CString m_strText;
- CString m_strTipText;
- DWORD m_dwExState;
- DWORD m_dwExStyle;
- public:
- void SetTipText(LPCTSTR strTipText);
- CListBoxItem(int nIndex, int nImage, CString strText, CCoolListBox* parent);
- };
- #define IDC_UPBUTTON 1689908023
- #define IDC_DOWNBUTTON 1689908024
- #if !defined(ODS_HOTLIGHT)
- #define ODS_HOTLIGHT 0x0040
- #endif
- /*####################################################################
- ------------------------------------------------
- CCoolListBox class
- ------------------------------------------------
- ####################################################################*/
- class CCoolListBox : public CListBox
- {
- // Construction-----------------------------------------
- public:
- CCoolListBox();
- virtual ~CCoolListBox();
- virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
- // Attributes-------------------------------------------
- public:
- CList<CListBoxItem*, CListBoxItem*> m_aItems;
- int m_nHotItem;
- int m_nIndex; // currently selected menu index
- bool m_bHilight; // true when menu item is selected
- bool m_bLBDown; // true when left mouse button is pressed
- CPoint m_point; // holds the cursor position
- CButton m_wndUpButton;
- CButton m_wndDownButton;
- CCoolTipCtrl m_wndTipctrl;
- CImageList m_imagelist;
- // Operations-------------------------------------------
- public:
- int AddItem(int nImage, LPCTSTR strText,UINT id, LPCTSTR strTipText = "");
- BOOL SetImagelist(UINT uBitmap);
- // Overrides---------------------------------------------
- //{{AFX_VIRTUAL(CCoolListBox)
- protected:
- //}}AFX_VIRTUAL
- // Implementation----------------------------------------
- protected:
- void ReLocation();
- CListBoxItem* GetItem(int nIndex);
- // Generated message map functions------------------------
- protected:
- //{{AFX_MSG(CCoolListBox)
- afx_msg void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
- afx_msg void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnDownButton();
- afx_msg void OnUpButton();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- //{{AFX_INSERT_LOCATION}}
- #endif // !defined(_ANYOU_COOLLISTBOX_H)