5 Star 13 Fork 8

炫彩软件(梦飞) / 炫彩IDE-集成开发环境. 中文编程语言+炫彩界面库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

炫彩IDE

包含:炫彩UI设计器, 炫彩中文编程语言

此处提供代码示例,教程,说明,以帮助用户学习使用

http://www.xcgui.com/

QQ群: 2283812(3号群), 验证码:XCGUI

炫彩编程手册

更新日期:2021-02-06

简介

  • 界面库设计器与编程语言结合, 集成化开发, 提高开发效率, 减少工具切换, 减少代码输入, 降低重复工作

  • 炫彩编程python风格精简语法, 支持全中文开发,轻量级开发环境, c++运行效率

  • 帮助想学编程,又不懂英文的用户

  • 帮助业余编程人员学习编程

  • 帮助个人开发者简单快速开发软件

  • 帮助专业程序员更好的享受编程

  • 从入门 ->到进阶 -> 到大神, 适合不同层次专业或业余编程人员, 个人或团队开发

  • 炫彩IDE 集界面设计 编码 编译 调试 发布,

  • 未来将支持跨平台,跨语言

  • 编程开发学习一个工具就够了,不必浪费精力学习其他编程语言和工具

UI, 编码, 集成, 可视化, 简单, 快速, 运行效率,中文,英文, 从入门到大神之路


  • *.xh 特殊头文件 包含外部C/C++头文件, 声明外部函数,数据类型, 宏定义

  • *.xc 源文件 源代码文件

  • 代码对齐TAB: 强制使用TAB对齐代码块, 不可用空格对齐

  • pass: 空行占用

  • 支持与C++代码混合, 支持调用外部DLL

  • 支持 中英双文变量函数名称

特性
  • 炫彩编程IDE,集成化, UI可视化, 减少开发中工具的切换, 增加集成度, 智能化, 减少重复工作

  • 内置炫彩界面库支持

  • 支持中文编程, 支持英文编程, 满足不同的人群

  • 新的语法和封装, 相比C++入门更简单, 去除头文件及前置声明概念, 精简语法, 减少代码输入量

  • 与C++相同的性能, 本身底层就是C++编译

  • 可扩展 支持与C++代码混合, 支持调用DLL, C++的库都可以拿来用

  • 支持UNICODE, x64

  • python 代码风格, 代码更加精简整洁

  • 未来支持跨平台, 支持转换为其他编程语言程序

  • 代码编辑器双模式; 支持代码模式(纯文本)与代码表格模式(类似易语言代码表格)切换

环境安装

下载IDE

炫彩QQ群共享下载, 群号:1653999

环境设置

默认附带VC14开发库, 如果需要其他版本VC请自己修改配置,方法如下:

将 "data\VC\VC14.0-Debug-DLL\" 目录下DLL文件复制到: "C:\Windows\" 或者""C:\Windows\System32\" 或者 添加到环境变量PATH里 (如果已安装了VC14 可忽略)

模块文件夹路径: data\VC\XC\

发布Release模式下编译的exe, 默认是静态编译, 不依赖VC环境DLL

默认带的运行环境vs2015 - VC14.0, 如果使用其他VC版本环境需修改配置文件 "data\config\config.config"

数据类型

  • 整型(int) 4字节

  • 无符号整型(unsigned int, UINT) 4字节

  • 布尔型(BOOL, int) 4字节

  • 布尔型c(bool) 1字节

  • 短整型(short, SHORT) 2字节

  • 无符号短整型(unsigned short, USHORT) 2字节

  • 字符型(wchar_t) 2字节

  • 字符型A(char) 1字节

  • 字节型(unsigned char, BYTE) 1字节

  • 浮点型(double) 8字节

  • 短浮点型(float) 4字节

  • 文本(字符串操作对象,双字节编码)

  • 文本A(字符串操作对象,多字节编码)

  • 指针(*) 4字节 例如: wchar_t*, int*

  • 变整型(32位程序4字节, 64位程序8字节)

  • 无符号变整型(32位程序4字节, 64位程序8字节)

  • 无类型(void)

整型    type_int= 1000
短整型  type_short=100
字节型  type_byte=10
浮点型  type_float=3.14	
整型    type_array_int[10]={0}
文本    type_text = "123-ABC"
 
调试输出("测试_数据类型 整型: ", type_int, "  大小:",sizeof(type_int))
调试输出("测试_数据类型 短整型: ", type_short, "  大小:",sizeof(type_short))
调试输出("测试_数据类型 字节型: ", type_byte, "  大小:",sizeof(type_byte))
调试输出("测试_数据类型 浮点型: ", type_float, "  大小:",sizeof(type_float))
调试输出("测试_数据类型 数组: ", type_array_int, "  大小:",sizeof(type_array_int))	
调试输出("测试_数据类型 文本: ", type_text, "  大小:",sizeof(type_text))

运算符

+
-
*
/
= 等于
% 求余
++ 自增1
-- 1 自减1
+= 加等于
-= 减等于
== 等于
!= 不等于
< 小于
> 大于
<= 小于等于
>= 大于等于
&& 逻辑与
|| 逻辑或
! 取反
& 位与
| 位或
^ 异或
<< 位左移
>> 位右移

注释

单行注释

整型   a  //单行注释

多行注释(开发中...)

整型  a
/* 多行注释内容
整型  b
整型  c
*/
整型  d
整型  e

快捷键

F5: 编译和调试 F7: 编译 F9:下断点 F10: 单步 F11: 步入

TAB: 缩进 TAB + SHIFT: 减少缩进 "/": 注释/取消注释 Ctrl + G: 跳转到指定行 Ctrl + F: 搜索和替换

区块操作

选择多行内容 鼠标右键菜单: ->注释 ->增加缩进 ->取消缩进

[+]流程控制

如果...否则 if...else
//如果  判断条件
//    条件成立
//否则
//    条件不成立

整型  a = 1
整型  b = 2
如果  a == 1
    调试输出("a==1")
否则 如果 a==2
    调试输出("a==2")
否则
    调试输出("a==?")

如果  (a==1) && (b==2) //当 a=1 并且 b=2 时 条件成立
	pass
循环 while
//循环 条件
//   执行代码

整型 i=0
循环 i<5
	调试输出(i)
	i++
变量循环 for
变量循环  整型 i=0;  i<3;  i++
	调试输出(i)
计次循环 for
计次循环 整型 i=0; 3  //变量i: 为循环索引; 数字3: 为循环次数; 当i=0时循环3次(0,1,2), 当i=1时循环2次(1,2)
	调试输出(i)  //输出索引 i 的值
列表循环 for

//普通数组循环

整型  数组A[3]={0}
列表循环 整型 i;  数组A //将循环3次  0-3;  变量i: 接收当前索引值, 数组A: 数组变量
    调试输出(数组A[i])

//动态数组循环

动态数组<整型>  数组A  // 尖括号<>内, 可以是任意数据类型, 比如: 整型, 文本, 指针, 对象; 理解为C++的模板
数组A.添加项(1)
数组A.添加项(2)
数组A.添加项(3)
列表循环  整型 i; 数组A
	调试输出(数组A[i])

//字典循环

字典<整型, 整型>  字典A
字典A[1]=10
字典A[2]=20
字典A[3]=30
列表循环  迭代器 迭代器项; 字典A   //迭代器项: 接收当前返回的结果
	调试输出( 迭代器项., " | ", 迭代器项.) //打印当前项的键和值
分支判断 switch

分支判断: 需要手动添加"跳出"命令

分支判断跳出: 自动跳出分支

def 整型 测试_分支判断()
	调试输出("测试_分支判断")
	整型   a=1
	分支判断  a
		判断  1
			调试输出(1)
			跳出
		判断 2
			调试输出(2)
			跳出
		其他
			调试输出(3)
	
	a = 3
	分支判断跳出 a
		判断  1
			调试输出(1)
		判断 2
			调试输出(2)
		其他
			调试输出(3)
	
	返回 0
跳出
循环  TRUE
	跳出  //跳出循环
继续
循环  TRUE
    继续   //跳过后面循环内容, 直接跳转到下一次循环
    调试输出("123")

[+]程序入口

控制台程序 示例
def 整型  入口函数()
	调试输出("你好! 炫彩编程")
	返回 0
窗口程序 示例
#库文件  "xcgui.lib"
#头文件  "xcgui.h"
#宏定义  SW_SHOW  5

HWINDOW hWindow=0
def  整型 回调  My_EventBtnClick(整型* pbHandled)    //按钮点击事件
	调试输出("按钮-关闭窗口")
	*pbHandled=1
	返回 0

def 整型 入口函数_窗口() 
	XInitXCGUI()       //初始化界面库
	hWindow=XWnd_Create(0,0,500,300, "xcgui-window") //创建窗口
	如果 hWindow
		HELE hButton=XBtn_Create(20,60,80,25,"关 闭",hWindow) //创建按钮
		XBtn_SetTypeEx(hButton, button_type_close)
		
		XEle_RegEventC(hButton,XE_BNCLICK,My_EventBtnClick) //注册事件
		XWnd_AdjustLayout(hWindow) //调整布局
		XWnd_ShowWindow(hWindow,SW_SHOW) //显示窗口
		XRunXCGUI()
	XExitXCGUI()
	返回 0

[+]数据容器

高级数组

高级动态数组 待补充...

高级字典

待补充...

数组
整型   整型数组[10]={0}  //定义10个成员的整型数组, 初始每个成员值为0
浮点型 浮点数组[10]={0}
C++容器字典 std::map

对应模块文件 map_wrap.h; 用户可修改文件对其扩展 字典<键,值> 变量名 模块接口见IDE中模块

 字典<,>  变量名
字典<文本, 整型>  字典A
字典A["aaa"] = 1
字典A["bbb"] = 2
字典A["ccc"] = 3
 
整型  大小 = 字典A.大小()  //取字典成员数量
整型  a = 字典A["aaa"]    //取键"aaa" 对应的值
 
迭代器  迭代器_查找_a = 字典A.查找("aaa") //或者: 字典<文本, 整型>::迭代器 迭代器_查找_a = 字典A.查找("aaa")
如果  迭代器_查找_a != 字典A.空值()
    调试输出("找到")
否则
    调试输出("未找到")

列表循环  迭代器 迭代器项; 字典A
	调试输出( 迭代器项., " | ", 迭代器项.)
C++动态数组 std::vector

对应模块文件vector_wrap.h 用户可修改文件对其扩展 动态数组<类型> 变量名 模块接口见IDE中模块

动态数组<整型>  数组A;
数组A.添加项(1)
数组A.添加项(2)
数组A.添加项(3)
 
整型  数组大小 = 数组A.大小()
 
列表循环 整型 i; 数组A
    调试输出(数组[i])
 
列表循环  整型  i; 数组A
    调试输出(数组A[i])

函数 function

如果不检查参数, 声明函数时参数"..."

"def" 也可以使用中文 "函数"

def 返回值  函数名(...) //IDE不检查参数; 例如当参数类型为任意型时或参数数量不固定时
def 整型  相加(整数 a, 整数 b)
    返回  a+b
 
def 整型 回调 按钮点击事件(整型* pbHandled)
    调试输出("按钮被点击")
    返回 0

[+]类 class

构造函数 和 析构函数没有返回值

  测试类
    整型  _a //成员变量
 
    def构造()  //构造函数
       _a = 10
 
    def析构()  //析构函数
       pass  //pass占位行, 没有实际意义
 
    def 整型  Add(整型 a, 整型 b)  //成员函数
        返回  a+b+_a
 
测试类  测试类_
整型  c = 测试类_.Add(1,2)
调试输出(c)
  大小
    整型  宽度
    整型  高度
 
大小   大小_
调试输出("宽度=", 大小_.宽度)
调试输出("高度=", 大小_.高度)
类的继承
  CA
	def无返回  Add(整型 a, 整型 b)
		调试输出("CA::Add()")

  CB 继承 CA
	def 无返回  Add()
		调试输出("CB::Add()")

def 整型 入口函数_窗口()
	CB   cb
	cb.Add()
	
	CA*  ca = &cb //取地址
	ca->Add(1,3)
	
	返回 0
类虚函数

虚函数: 子类有的调用子类, 子类没有的调用父类的 子类重写虚函数可以覆盖父类的函数功能 析构函数也可以为虚函数, 好处是用基类的指针释放时自动调用子类析构函数,否则子类析构函数不会被触发

  CA
	def 虚函数 无返回  Add(整型 a, 整型 b)
		调试输出("CA::Add()")

  CB 继承 CA
	def 虚函数 无返回  Add()
		CA::Add()  //可强制调用父类中的CA::Add()函数
		调试输出("CB::Add()")
		
def 整型 入口函数_窗口()
	CB  cb
	cb.Add()   //调用CB类中的Add()函数
	
	CA ca= cb //转换对象类型为CA,  因为CA是CB的基类,所以可以转换
	ca.Add()  //调用CB类中的Add() 函数
	
	//因为CB类重写了CA类中的Add()函数, 所以覆盖了CA::Add()
	返回 0

结构体 struct

结构体   SIZE_1
    整型  cx
    整型  cy
    
def 整型 入口函数_窗口()
    SIZE_1  size
    size.cx=10
    size.cy=20

new delete 操作

RECT* rc=new RECT  //new 对象
rc->left=10        //赋值
调试输出(rc->left)  //打印输出
delete rc          //删除对象

取变量地址

取普通变量地址

整型  a = 10   //定义整型变量
整型* pA = &a  //取变量地址
调试输出(pA)    //打印地址
调试输出(*PA)   //打印值

取类变量地址

RECT   rc          //定义对象
RECT*  pRc = &rc   //取对象地址
调试输出(&rc)       //打印对象地址

定义宏(内部定义宏 与 声明外部宏)

#宏定义  SW_SHOW  5 
#外部宏  SW_SHOW  //声明在外部文件中已经存在的宏

[+]技巧

调试输出(UNICODE编码)

UNICODE编码, 双字节 wchar_t*

调试输出("打印一行信息到输出窗口") 

整型  a
文本  text="你好! 炫彩编程"
调试输出("a=",a, ",  text=", text) //打印变量值
调试输出(多字节编码)

在字符串前面加字幕"A"代表多字节编码 char*

调试输出(A"打印一行信息到输出窗口") 

整型  a
文本A  text=A"你好! 炫彩编程"
调试输出(A"a=",a, A",  text=", text) //打印变量值
占位空行 pass
def 无返回  函数名()
	pass
一行写多条语句

分号";"代表后面语句不换行 冒号":"代表后面语句是子集块

整型  a = 1;  整型  b = 2  //一行写多条语句用 ; 分开
整型  c = a + b
子集块不换行写法
整型  a=10
如果  10==a : 调试输出("a==10"); 调试输出("条件成立") //将子集块写在同行
 
如果  10!=a : 调试输出("a!=10");
否则 : 调试输出("a==10")
多段字符串拼接
文本  text = "123""456"
"789"
//结果为:text = "123456789"

[+]扩展

包含外部头文件
#头文件  <helper.h>  //系统头文件, 不解析文件内容
#头文件  "xcgui.h"   //普通头文件, 解析文件内容
#库文件  "xcgui.lib"  //静态库或动态库lib文件

可使用隐藏命令,隐藏不需要解析的代码,提高解析速度,排除无法解析的内容; 见模块封装

外部函数及类型声明

如果某个函数已存在外部代码或库中, 只需要在在*.xh文件中声明类型

例如:

声明外部函数, 参数中 "..."三个点代表不检查参数,省略掉

int sizeof(...)  //声明外部函数
void Sleep(int dwMilliseconds)

声明外部类

   RECT
   CSize

声明外部基础类型, 或未知类型

#外部类型  HDC    //声明外部定义的类型
#外部类型  HANDLE //声明外部定义的类型
调用外部库 DLL

例如: 调用炫彩界面库DLL DLL-头文件: xcgui.h DLL-lib文件:xcgui.lib

与C++代码混合

与C++代码混合使用方法

test.h 头文件

int  add(); //声明函数

test.cpp 源文件

#include "common__.h" //包含预编译
 
int  add()
{
	OutputDebugString(L"123\n");
	return 99;
}

或者在*.xh文件中声明外部函数

在*.xc源文件中 包含c++ 头文件和源文件, 调用c++代码中的add()函数

嵌入C++代码

如果与函数对齐, 作用域为函数内

#嵌入代码
此处嵌入C++代码
#嵌入代码_结束

[+]模块

模块默认位置: IDE文件夹\data\VC\XC\

模块文件:module_*.h, module_开头的(*.h)文件为模块文件

IDE启动时, 自动搜索此目录下的模块文件

模块中只列出类的公开成员(public)

可使用隐藏命令, 隐藏不需要解析的代码, 排除无法解决的代码, 提高解析速度

可使用分组命令, 对全局函数进行分组, 便于浏览管理

模块选择对话框

项目视图->右键菜单->选择模块

选择当前项目中使用的模块

模块浏览器

查看模块中的接口及说明

调用模块

项目视图->右键菜单->选择模块, 勾选模块 "字符串操作" module_test.h

def 整型 测试模块()
	字符串类  字符串="abc"
	字符串.增加字符串("123")
	整型 位置 = 字符串.查找("123")
	返回 字符串.获取大小()

[+]模块封装

参考示例: IDE中 module_base.h 模块包装; 位置: IDE文件夹\data\VC\XC\module_base.h

别名

声明(类, 变量, 函数, 函数参数名) 别名, 以便在IDE中使用中文名称调用

//@rename  别名(别名, 别名, ...)
声明

对已存在的(类, 函数)别名, 使用多行注释包裹声明代码

/*@声明
代码...
*/
依赖

例如 "炫彩界面库-类" 依赖 "炫彩界面库C(module_xcgui.h)"

//@模块名称  炫彩界面库-类
//@依赖   module_xcgui.h
包含CPP文件

在头文件中声明包含cpp文件,(加入编译文件列表) 如果直接在(.h)文件中包含cpp文件, 当多个文件中包含该(.h)文件时会造成重复的实现, 例如:函数已在(*.obj)模块中已存在,造成重复 所以这里采用特殊方法声明要包含的cpp文件, IDE编译代码时, 自动连接cpp文件,避免重复的实现

/*@声明
#src "pugixml.cpp"  //例如包含cpp文件 pugixml.cpp
*/
包含lib文件
/*@声明
#lib "xcgui.lib"   //包含lib文件
*/
模块文件说明信息

在模块文件开始位置加入模块详情, 例如:

//@模块名称  炫彩界面库-c接口  
//@版本  1.0  
//@日期  2020-10-23
//@作者  XCGUI  
//@模块备注  炫彩界面库-c接口  
// 备注换行
函数参数说明
//@备注 两个数相加
//@参数 a  输入一个整数
//@参数 b  输入一个整数
//@返回 返回a+b结果
//@别名 相加(整型, 整型)
int Add(int a, int b)
{
    return a+b;
}
隐藏代码
//@隐藏{
此处的代码不会被解析, 跳过
//@隐藏}
分组
//@分组{   组名称
组内代码, 例如: , 全局变量, 全局函数, 结构体, 枚举, 
//@分组}
#智能指针

此接口宏是为了自动模拟智能指针操作,减少重复工作, 手动模拟请看后面章节

模拟C++ 智能指针接口, 默认模拟的接口不检查参数(为了适应更多接口变化)

//假如模拟下面的智能指针为例
#智能指针  CefRefPtr<CefBrowser>  CefBrowserPtr

//CefRefPtr  智能指针类
//CefBrowser 包装的对象
//CefBrowserPtr  别名类

//那么T为CefBrowser*
//默认自动模拟以下接口, 并且继承CefRefPtr中的接口,
//如果没有解析CefRefPtr, 可以模拟此类及其接口
T* get()   //CefBrowser* get()
addRef()
addref()
AddRef()
Release()
release()
T* operator->()
//CefRefPtr 中的接口

用法示例

#智能指针  CefRefPtr<CefBrowser>  CefBrowserPtr  //模拟智能指针接口, 用法与C++中一样

CefBrowserPtr   m_cefBrowser  //定义智能指针变量
m_cefBrowser->GetHost()       //调用CefBrowser接口GetHost()
CefBrowser* pCefBrowser = m_cefBrowser.get() //调用智能指针自身接口
#智能指针_仅声明

仅声明智能指针接口, 例如C++源码中已经定义了智能指针类型, 仅声明接口即可

.h文件
//假如已经定义智能指针类型
typedef CHPSocketPtr<ITcpClient, ITcpClientListener, TcpClient_Creator>    CTcpClientPtr;
.xc文件

#智能指针_仅声明    CHPSocketPtr<IHttpClient>   CHttpClientPtr  //仅声明接口, 避免造成重复
模拟-模板继承

解析C++文件时, 不支持模板解析, 所以需要模拟接口

//test.h
//C++ 原文件
//假如 T1 是 class CA
//假如 T2 是 class CB
template<class T, class T2> 
class CMyClass : public T, T2 //CMyClass 继承类 T1 T2, 拥有T1和T2 的全部接口
{
};
typedef CMyClass<CA,CB>	 CMyClassD;

//---------模拟封装接口------------
/*@声明
//@备注  自定义双接口类
//@别名  测试类
class CMyClassD : public CA, CB
{
};
*/
//test.xc
//测试模块
CMyClassD  myClass //继承 CA, CB成员     CMyClass<CA,CB>  myClass
myClass.CA成员  //可调用CA成员
myClass.CB成员  //可调用CB成员
模拟-模板智能指针

假如是智能指针, 需要模拟智能指针接口 和 重载操作符继承接口

//text.h
//C++ 原文件
//假如 T 是 class CA
template<class T>
class CPtr
{
public:
    T*  operator->();
    void  operator=(T* pObj){ m_pObj = pObj;}
    T*  Attach(CMyClass *pClass);
    T*  Detach();
private:
     *  m_pObj;
}
typedef CPtr<CA>	CaPtr;

class CA
{
public:
    int Add(int a, int b){ return a+b;}
};

//---------模拟封装接口------------
/*@声明
class CaPtr
{
public:
	CA* operator->();  //模拟此接口 可以调用CA成员
	CA* Attach(CA* pObj);
	CA* Detach();
private:
    T*  m_pObj;
};
*/
//test.xc
//测试模块
CaPtr   ptr = new  CA  //  CPtr<CA>  ptr = new CA
ptr->Add(1,2) //调用 CA成员函数
ptr.Detach()  //调用 智能指针函数

模块封装示例

//假如 CStringBase 类已存在,原型如下
class CStringBase
{
public:
	int GetSize();
	const wchar_t* GetString();
	void AddString(const wchar_t* pString)
};

模块文件名: module_test.h 将此文件放入目录 IDE文件夹\data\VC\XC\module_test.h

//module_test.h
//定义CMyString类 继承CStringBase类, 并且对基类CStringBase中的函数别名
//CMyString 类中实现查找功能函数 Find(), 添加成员变量 m_status

#ifndef MY_TEST_WRAP_H
#define MY_TEST_WRAP_H

//@模块名称  字符串操作
//@版本  1.0  
//@日期  2020-10-23
//@作者  XCGUI  
//@模块备注  字符串操作示例模块,
//此示例仅供参考

/*@声明
#src "module_text.cpp"  //包含cpp文件
#lib "xcgui.lib"   //如果用到礼拜文件
*/

//@别名 字符串类
class CMyString : public CStringBase
{
public:
/*@声明   //此处是对已存在的函数 声明
	//@别名 获取大小()
	int GetSize()

	//@别名 获取字符串指针()
	const wchar_t* GetString();
	
	//@备注  增加字符串到末尾
	//@参数  pString  要添加的字符串
	//@返回  无返回值
	//@别名  增加字符串(字符串)
	void AddString(const wchar_t* pString)
*/
	//@别名 查找(字符串)
	int Find(const wchar_t* pString)
	{
		int ret = -1;
		//查找代码...
		return ret;
	}
	//@别名 状态
	int  m_status; //状态
};
#endif

[+]炫彩编程 - IDE -界面库

左侧的函数列表, 当保存代码即时更新

涉及到以下窗格: 函数列表 断点列表 调用堆栈 局部变量 监视 调试输出 搜索和替换 查找引用 模块视图

新建项目(炫彩编程)

UI布局文件生成代码类

UI生成事件代码

项目属性-Debug/Release

设置Debug\Release编译选项 配置属性

选择类型 可以设置编译exe,动态库DLL, 静态库lib

新建按钮, 可从现有配置中复制新的配置修改

新建配置可保存为全局配置,或当前项目配置

导出动态库DLL

项目属性 -> 炫彩编程 -> 类型: 动态库(.dll)

在要导出的函数前面加上 "导出"

//导出函数
def 导出 整型 add(整型 a, 整型 b)
	返回 a+b
导出静态库LIB

项目属性 -> 炫彩编程 -> 类型: 静态库(.lib)

事件助手

例如: 按钮.注册事件->事件助手 , 弹出[事件助手] 选择对应事件, 回车生成事件代码

搜索替换

Ctrl + F 快捷键[搜索和替换]

结果输出在 [搜索和替换] 窗格中

查找引用

在函数上鼠标 右键菜单->查找所有引用

结果输出在 [查找引用] 窗格内

转到定义

在变量上按鼠标右键弹出菜单->转到定义, 跳转到指定文件行

跳转到指定行

Ctrl + G 快捷键

插入(函数 变量 类)

代码编辑器鼠标右键 菜单->插入->

资源文件 resource.rc

新建项目 勾选炫彩编程, 在项目文件夹下,将生成RC资源文件和程序图标 用记事本工具打开编辑文件 resource.rc 可添加 图标, 版权 等内容 默认第一个图标为exe文件图标 如果项目目录下没有资源文件,那么编译时忽略rc资源, 资源文件固定名称为 [resource.rc]

用VS修改RC资源文件

如果不会编辑RC文件, 可以用VS修改 注意: vs中rc资源文件是包含 "resource.h" 头文件, 因为炫彩不需要,所以没有 自己把这一行代码注释取消,随便新建个 "resource.h"文件, 不然VS会提示找不到"resource.h" 在这里插入图片描述

IDE调试

F5: 编译和调试

F7: 编译

F9:下断点

F10: 单步

F11: 步入

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

炫彩IDE-集成开发环境. 中文编程语言+炫彩界面库 此处提供代码示例,教程,说明,以帮助学习使用 展开 收起
C/C++
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C/C++
1
https://gitee.com/xcgui/demo.git
git@gitee.com:xcgui/demo.git
xcgui
demo
炫彩IDE-集成开发环境. 中文编程语言+炫彩界面库
master

搜索帮助