資源簡介
VC++語法分析工具源代碼附文檔,希望你們能學到知識。謝謝大家、

代碼片段和文件信息
////////////////////////////////////////////////////////////////
//?ColorPicker.cpp?:?implementation?file??????????????????????//
// ??//
//?Copyright?2001?WangJun ??//
//?All?Rights?Reserved. ??//
// ??//
//?Email:?wangjun98@sohu.com ??//
//?URL:???http://www.vckbase.com ??//
// ??//
//?1.0?????2001/10/6???First?release?version. ??//
// ??//
////////////////////////////////////////////////////////////////
#include?“stdafx.h“
#include?“ColorPicker.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
#define?LPARAM_X(lp)????????????????????????((int)(short)LOWORD(lp))
#define?LPARAM_Y(lp)????????????????????????((int)(short)HIWORD(lp))
#define WM_SETCOLOR WM_USER+1
#define?WM_COLORDLG WM_USER+2
#define IDC_COLORDLG_BUTTON 100
CPen _pen3DDKShadow(PS_SOLID1::GetSysColor(COLOR_3DDKSHADOW));
CPen _penW(PS_SOLID1RGB(0xff0xff0xff));
CPen _penB(PS_SOLID1RGB(000));
/////////////////////////////////////////////////////////////////////////////
//?CColorPicker
CColorPicker::CColorPicker()
{
const?unsigned?char?pvANDPlaneC[]={0xff0xf10xff0xe00xff0xc00xff0x000xff0x810xff0x030xfe0x070xfc0x17
0xf80x3f0xf00x7f0xe00xff0xc10xff0x830xff0x870xff0x0f0xff0x3f0xff};
const?unsigned?char?pvXORPlaneC[]={0x000x000x000x0c0x000x080x000x100x000x000x000x400x000xe00x010xc0
0x030x800x070x000x0e0x000x1c0x000x380x000x300x000x400x000x000x00};
int?cxCursor?=?::GetSystemMetrics(SM_CXCURSOR);
int?cyCursor?=?::GetSystemMetrics(SM_CYCURSOR);
m_hCursorStraw?=?NULL;
if(cxCursor?>=16?&&?cxCursor?100?&&?cyCursor?100?&&?cyCursor?>=?16)
{
int?size?=?cxCursor*cyCursor/8;
unsigned?char?*pvANDPlane?=?new?unsigned?char[size];
unsigned?char?*pvXORPlane?=?new?unsigned?char[size];
if(pvANDPlane?&&?pvXORPlane)
{
memset(pvANDPlane0xffsize);
memset(pvXORPlane0x00size);
for(int?j=0;j<16;j++)
for(int?i=0;i<2;i++)
{
*(pvANDPlane+j*cxCursor/8?+?i)?=?*(pvANDPlaneC?+?j*2?+?i);
*(pvXORPlane+j*cxCursor/8?+?i)?=?*(pvXORPlaneC?+?j*2?+?i);
}
m_hCursorStraw?=?::CreateCursor(::AfxGetInstanceHandle()015cxCursorcyCursorpvANDPlanepvXORPlane);
delete?pvANDPlane;
delete?pvXORPlane;
}
}
m_CurrentColor?=?COLORREF(::GetSysColor(COLOR_3DFACE));
m_hwndBuddy =?NULL;
m_hPaletteWnd?=?NULL;
m_bPaletteWndActive?=?FALSE;
}
CColorPicker::~CColorPicker()
{
::DestroyCursor(m_hCursorStraw);
}
BEGIN_MESSAGE_MAP(CColorPicker?CButton)
//{{AFX_MSG_MAP(CColorPicker)
ON_WM_ERASEBKGND()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_SETCURSOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CColorPicker?message?handlers
void?CColorPicker::DrawItem(LPDRAWITEMSTRUCT?lpDraw
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
-----------?---------??----------?-----??----
??????????????2382406????????????????????56
評論
共有 條評論