登录
首页 » c++ » 利用C++和MFC编写实现颜色调节功能的程序 适合c++入门初学者

利用C++和MFC编写实现颜色调节功能的程序 适合c++入门初学者

于 2023-02-06 发布 文件大小:1.79 MB
0 180
下载积分: 2 下载次数: 1

代码说明:

编写并利用一个应用程序Ex_Color实现颜色调节功能:操作滚动条滑动条和进展条控件可以调节RGB颜色的三个颜色分量:R(红色分量)、G(绿色分量)和B(蓝色分量),并根据用户指定的颜色填充控件。首先,先创建程序Ex_Color,利用静态文本、组框、编辑框、滚动条、滑动条、进展条和旋转按钮创建并设计程序对话框(参照实验内容示图),然后,需要增加相关成员变量,接着添加成员函数DrawColor实现颜色功能,然后添加初始化代码,然后为IDC_EDIT_R、IDC_EDIT_G、IDC_EDIT_R添加EN_CHANGE消息,在为旋转按钮控件添加UDN_DELTAPOS消息映射,并在CEx_ColorDlg类中添加WM_HSCROLL消息映射;并编译测试运行,然后在OnPaint函数中调用前面添加的Draw函数,防止对话框被另一个窗口遮挡时,系统调用OnPaint函数进行刷新;这样,当操作滚动条滑动条和进展条控件时就可以调节RGB颜色的三个颜色分量。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Codeforces
    Solution for some problems in Codeforces
    2014-01-09 23:02:19下载
    积分:1
  • code-of-ecu
    飞思卡尔小型发动机EMS源代码,用于写入发动机ECU,控制发动机供油量,进而控制转速(code of ecu which can help up control the fuel of the engine)
    2021-01-24 22:48:39下载
    积分:1
  • libLAS
    已经配置好的能实现部分libLAS功能,基于vs2017的(The configurable libLAS can realize some functions of libLAS based on vs2017.)
    2020-06-18 17:20:01下载
    积分:1
  • openvpn_id_build
    说明:  openvpn客户端key自动生成,自动申请用户名和密码。(OpenVPN client keys are automatically generated and user names and passwords are automatically applied for.)
    2020-06-17 22:20:01下载
    积分:1
  • CV_CPP
    这个版本的代码,基于无边缘活动轮廓,即chan-vese模型,此代码中包含了C++版本和matlab版本(This version of the code, based on active contours without edges, that chan-vese model, this code contains C++ version and matlab version)
    2015-11-16 11:54:41下载
    积分:1
  • FeiGeChuangShu
    这个是基于VC++的,飞鸽传书源码。支持SOCKET通讯,能在局域网内进行文件传输,文字通讯。(This is based on the VC++ of IP Messenger source. Support SOCKET communications, can transfer files in the LAN, text messaging.)
    2014-08-01 00:50:39下载
    积分:1
  • unity3d寻路
    这事一个unity3d的原生源码资源,是学习unity3d的好资源,值得收藏学习!
    2022-01-31 14:36:18下载
    积分:1
  • sock 客户端通信
    sock 客户端通信,                                                                                                                                                                                                  
    2022-06-18 05:25:44下载
    积分:1
  • Tetris
    说明:  大概在最近两天之内编码完成,但此前一天开始构思。第一天晚上主要完成了方块旋转算法,第二天也就是今天加了消方块的处理算法。但是可能还有一些考虑不周的地方,比如,没有采用定时中断,而是图方便采用了和cpu频率有关的delay()函数来模拟时间间隔,这是需要改进的地方。(Probably within the last two days to complete coding, but the idea of the day before the beginning. Completed the first night the main box rotation algorithm, the next day that is today' s consumer box added processing algorithms. However, there may be some places where ill-considered, for example, does not use timer interrupt, but rather seek convenience and the cpu frequency of using the delay () function to simulate the time interval, and that needs improvement.)
    2009-08-28 17:14:12下载
    积分:1
  • valve-udf
    fluent动网格,用于研究压缩机吸气阀发片运动(valve motion UDF)
    2021-03-31 01:59:09下载
    积分:1
  • 696516资源总数
  • 106442会员总数
  • 11今日下载