• 大小: 211KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-30
  • 语言: C/C++
  • 标签: 编译器  

资源简介

用c++实现简单的编译器

资源截图

代码片段和文件信息

////////////////////////////////////////////////////////////////
// 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

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     241840  2005-06-15 09:16  cvery.comvc616677824666\SS.APS

     文件     188550  2004-11-26 12:31  cvery.comvc616677824666\res\Splash.bmp

     文件       3862  2005-06-14 17:44  cvery.comvc616677824666\res\Toolbar.bmp

     文件       1142  2005-06-14 03:29  cvery.comvc616677824666\res\toolbar1.bmp

     目录          0  2006-04-14 02:36  cvery.comvc616677824666\res

     文件       3963  2005-06-15 10:52  cvery.comvc616677824666\SS.clw

     文件      16369  2001-10-06 23:14  cvery.comvc616677824666\ColorPicker.cpp

     文件      29139  2005-06-15 11:06  cvery.comvc616677824666\FenXi.cpp

     文件       1182  2005-06-14 15:17  cvery.comvc616677824666\Logo.cpp

     文件        993  2005-06-14 13:47  cvery.comvc616677824666\LogoDlg.cpp

     文件      10449  2005-06-15 09:23  cvery.comvc616677824666\MainFrm.cpp

     文件      74949  2005-01-05 08:01  cvery.comvc616677824666\OfficeXPMenu.cpp

     文件       1232  2005-06-14 16:37  cvery.comvc616677824666\SetDlg.cpp

     文件       1877  2005-06-14 16:39  cvery.comvc616677824666\SourceEditView.cpp

     文件       3409  2005-06-14 15:19  cvery.comvc616677824666\SS.cpp

     文件       1738  2005-06-14 02:13  cvery.comvc616677824666\SSDoc.cpp

     文件       3200  2005-06-14 16:39  cvery.comvc616677824666\SSView.cpp

     文件        204  2005-06-14 02:13  cvery.comvc616677824666\StdAfx.cpp

    ..A.SH.     33792  2005-06-14 17:28  cvery.comvc616677824666\res\Thumbs.db

     文件     214528  2005-06-15 11:06  cvery.comvc616677824666\词法语法分析.doc

     文件       6031  2005-06-15 09:03  cvery.comvc616677824666\SS.dsp

     文件        529  2005-06-14 02:34  cvery.comvc616677824666\SS.dsw

     文件     479313  2005-06-15 10:51  cvery.comvc616677824666\编译器.exe

     文件       2454  2001-10-06 21:44  cvery.comvc616677824666\ColorPicker.h

     文件       1926  2005-06-15 11:06  cvery.comvc616677824666\FenXi.h

     文件        832  2005-06-14 15:17  cvery.comvc616677824666\Logo.h

     文件       1229  2005-06-14 13:47  cvery.comvc616677824666\LogoDlg.h

     文件       1981  2005-06-15 09:16  cvery.comvc616677824666\MainFrm.h

     文件      10680  2005-01-05 07:54  cvery.comvc616677824666\OfficeXPMenu.h

     文件       1096  2005-06-15 09:16  cvery.comvc616677824666\Resource.h

............此处省略27个文件信息

评论

共有 条评论