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
ColourPicker.h
Package: VC++ProgressControl.rar [view]
Upload User: nhyuejuan
Upload Date: 2013-12-02
Package Size: 171k
Code Size: 2k
Category:
StatusBar
Development Platform:
Visual C++
- #if !defined(AFX_COLOURPICKER_H__9200FF1E_28AB_41F3_A870_84A72BEDA649__INCLUDED_)
- #define AFX_COLOURPICKER_H__9200FF1E_28AB_41F3_A870_84A72BEDA649__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // ColourPicker.h : header file
- //
- #include "ColourPopup.h"
- #define CP_MODE_TEXT 1
- #define CP_MODE_BK 2
- /////////////////////////////////////////////////////////////////////////////
- // CColourPicker window
- void AFXAPI DDX_ColourPicker(CDataExchange* pDX,int nIDC,COLORREF& crColour);
- class CColourPicker : public CButton
- {
- DECLARE_DYNCREATE(CColourPicker)
- // Construction
- public:
- CColourPicker();
- void SetBkColour(COLORREF crColourBk);
- COLORREF GetBkColour(){return m_crColourBk;}
- void SetTextColour(COLORREF crColourText);
- COLORREF GetTextColour(){return m_crColourText;}
- void SetTrackSelection(BOOL bTracking =TRUE){m_bTrackSelection=bTracking;}
- BOOL GetTrackSelection() {return m_bTrackSelection;}
- void SetSelectionMode(UINT nMode) {m_nSelectionMode=nMode;}
- UINT GetSelectionMode() { return m_nSelectionMode;}
- COLORREF GetColour()
- {
- return (m_nSelectionMode==CP_MODE_TEXT)?
- GetTextColour():GetBkColour();
- }
- void SetColour(COLORREF crColour)
- {
- (m_nSelectionMode==CP_MODE_TEXT)?
- SetTextColour(crColour):SetBkColour(crColour);
- }
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CColourPicker)
- public:
- virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- protected:
- virtual void PreSubclassWindow();
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void SetWindowSize();
- virtual ~CColourPicker();
- afx_msg LONG OnSelEndOK(UINT lParam, LONG wParam);
- afx_msg LONG OnSelEndCancel(UINT lParam, LONG wParam);
- afx_msg LONG OnSelChange(UINT lParam, LONG wParam);
- // Generated message map functions
- protected:
- BOOL m_bActive,
- m_bTrackSelection;
- COLORREF m_crColourBk;
- COLORREF m_crColourText;
- UINT m_nSelectionMode;
- CRect m_ArrowRect;
- CString m_strText;
- //{{AFX_MSG(CColourPicker)
- afx_msg void OnClicked();
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_COLOURPICKER_H__9200FF1E_28AB_41F3_A870_84A72BEDA649__INCLUDED_)