文件名称:mfc_button
- 所属分类:
- 其他小程序
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2013-04-05
- 文件大小:
- 4.17mb
- 下载次数:
- 0次
- 提 供 者:
- 事**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
1.建立一个基于Dialog的MFC工程;
2.设置在Dialog窗体宽度为500,在其第一行位置放置一个组合框和一个按钮;
3.组合框设置8个默认选项,选项的内容分别是数字1,2,3,4,5,6,7,8
4.组合框允许输入数字,范围是0-50
5.按钮标题是“Do it”
6.点击“Do it”按钮,实现功能:①根据组合框填写或选择的数值(假设该值是n),创建n个按钮,每个按钮的大小都是高25长40,从界面上第二行开始显示,每一行显示的按钮数不超过(10-行号),超过时自动显示到下一行(其中行号从0开始);②每个创建的按钮标题是按钮的序号,即0,1,2…n-1,按钮的背景颜色和文本颜色都是随机值;③但点击创建的按钮时,在Dialog窗口的标题显示该按钮相关的信息,包括标题内容,背景颜色值,文本颜色值(其中颜色以字符串"RGB(r,g,b)"格式,r,g,b分别代表颜色的红绿蓝分量)。
-(1) Establish a Dialog-based MFC project
(2) set the width of the Dialog form 500 in its first line location to place a combo box and a button
3 combo box set eight default option, option is the number 1, 2, 3, 4, 5, 6, 7, 8
Combo box allows you to enter numbers, range 0-50
5 button title is "Do it."
Click the "Do it" button, the realization of functions: (1) complete or selected value of a combo box (the value is assumed to n), to create the n button, the size of each button are 25 long 40, from the interface first the two lines begin to show, each row shows the number of buttons does not exceed (10- line number) over automatically to the next line (line number starting from 0) ② each created button title is the serial number of the button, that is, 0 , 1,2 ... n-1, the button s background color and text color are random values ③ Click Create button, the button-related information, including the title content, the value of the background color, text is displayed
2.设置在Dialog窗体宽度为500,在其第一行位置放置一个组合框和一个按钮;
3.组合框设置8个默认选项,选项的内容分别是数字1,2,3,4,5,6,7,8
4.组合框允许输入数字,范围是0-50
5.按钮标题是“Do it”
6.点击“Do it”按钮,实现功能:①根据组合框填写或选择的数值(假设该值是n),创建n个按钮,每个按钮的大小都是高25长40,从界面上第二行开始显示,每一行显示的按钮数不超过(10-行号),超过时自动显示到下一行(其中行号从0开始);②每个创建的按钮标题是按钮的序号,即0,1,2…n-1,按钮的背景颜色和文本颜色都是随机值;③但点击创建的按钮时,在Dialog窗口的标题显示该按钮相关的信息,包括标题内容,背景颜色值,文本颜色值(其中颜色以字符串"RGB(r,g,b)"格式,r,g,b分别代表颜色的红绿蓝分量)。
-(1) Establish a Dialog-based MFC project
(2) set the width of the Dialog form 500 in its first line location to place a combo box and a button
3 combo box set eight default option, option is the number 1, 2, 3, 4, 5, 6, 7, 8
Combo box allows you to enter numbers, range 0-50
5 button title is "Do it."
Click the "Do it" button, the realization of functions: (1) complete or selected value of a combo box (the value is assumed to n), to create the n button, the size of each button are 25 long 40, from the interface first the two lines begin to show, each row shows the number of buttons does not exceed (10- line number) over automatically to the next line (line number starting from 0) ② each created button title is the serial number of the button, that is, 0 , 1,2 ... n-1, the button s background color and text color are random values ③ Click Create button, the button-related information, including the title content, the value of the background color, text is displayed
(系统自动生成,下载前可以参看下载内容)
下载文件列表
mfc动态随机变色按钮\Debug\BuildLog.htm
...................\.....\mt.dep
...................\.....\NewBtn.obj
...................\.....\NewBtn.sbr
...................\.....\StdAfx.obj
...................\.....\StdAfx.sbr
...................\.....\SXBtn.obj
...................\.....\SXBtn.sbr
...................\.....\vc60.idb
...................\.....\vc60.pdb
...................\.....\vc90.idb
...................\.....\vc90.pdb
...................\.....\第三题.bsc
...................\.....\第三题.exe
...................\.....\第三题.exe.embed.manifest
...................\.....\第三题.exe.embed.manifest.res
...................\.....\第三题.exe.intermediate.manifest
...................\.....\第三题.ilk
...................\.....\第三题.obj
...................\.....\第三题.pch
...................\.....\第三题.pdb
...................\.....\第三题.res
...................\.....\第三题.sbr
...................\.....\第三题Dlg.obj
...................\.....\第三题Dlg.sbr
...................\NewBtn.cpp
...................\NewBtn.h
...................\ReadMe.txt
...................\res\第三题.ico
...................\...\第三题.rc2
...................\resource.h
...................\StdAfx.cpp
...................\StdAfx.h
...................\SXBtn.cpp
...................\SXBtn.h
...................\第三题.aps
...................\第三题.clw
...................\第三题.cpp
...................\第三题.dsp
...................\第三题.dsw
...................\第三题.h
...................\第三题.ncb
...................\第三题.opt
...................\第三题.plg
...................\第三题.rc
...................\第三题.sln
...................\第三题.suo
...................\第三题.vcproj
...................\第三题.vcproj.pc-PC.pc.user
...................\第三题Dlg.cpp
...................\第三题Dlg.h
...................\Debug
...................\res
mfc动态随机变色按钮