获取屏幕上任意一点的RGB值


获取屏幕上鼠标所在点处的颜色组成!并且可以自己设置颜色值
资源截图
代码片段和文件信息
// Color.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “Color.h“
#include “ColorDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CColorApp

BEGIN_MESSAGE_MAP(CColorApp CWinApp)
//{{AFX_MSG_MAP(CColorApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CColorApp construction

CColorApp::CColorApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CColorApp object

CColorApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CColorApp initialization

BOOL CColorApp::InitInstance()
{
AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable you should remove from the following
//  the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CColorDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}

// Since the dialog has been closed return FALSE so that we exit the
//  application rather than start the application‘s message pump.
return FALSE;
}

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

     文件      38236  2008-10-22 11:35  ColorColor.aps

     文件       1502  2007-08-03 20:48  ColorColor.clw

     文件       2049  2007-07-07 22:14  ColorColor.cpp

     文件       4062  2007-07-08 00:09  ColorColor.dsp

     文件        533  2007-07-07 22:14  ColorColor.dsw

     文件       1313  2007-07-07 22:14  ColorColor.h

     文件   14240768  2008-10-22 18:16  ColorColor.ncb

     文件      48640  2007-08-03 20:51  ColorColor.opt

     文件       1514  2007-08-03 20:51  ColorColor.plg

     文件       5850  2008-10-22 11:35  ColorColor.rc

     文件        874  2008-10-22 11:25  ColorColor.sln

    ..A..H.     10752  2008-10-22 18:16  ColorColor.suo

     文件       7209  2008-10-22 11:25  ColorColor.vcproj

     文件       1407  2008-10-22 18:16  ColorColor.vcproj.KEVIN.袁洁.user

     文件       7255  2008-10-22 11:25  ColorColorDlg.cpp

     文件       2020  2007-07-10 14:23  ColorColorDlg.h

     文件       3561  2007-07-07 22:14  ColorReadMe.txt

     文件       1051  2007-07-10 14:23  ColorResource.h

     文件        207  2007-07-07 22:14  ColorStdAfx.cpp

     文件       1054  2007-07-07 22:14  ColorStdAfx.h

     文件       1078  2007-07-07 22:14  Color
esColor.ico

     文件        397  2007-07-07 22:14  Color
esColor.rc2

     文件      11680  2008-10-22 11:37  ColorReleaseBuildLog.htm

     文件     303104  2008-10-22 11:37  ColorReleaseColor.exe

     文件        145  2008-10-22 11:37  ColorReleaseColor.exe.intermediate.manifest

     文件      14928  2008-10-22 11:37  ColorReleaseColor.obj

     文件   14286848  2008-10-22 11:37  ColorReleaseColor.pch

     文件      12908  2008-10-22 11:37  ColorReleaseColor.res

     文件      58861  2008-10-22 11:37  ColorReleaseColorDlg.obj

     文件         67  2008-10-22 11:37  ColorReleasemt.dep

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)