[系统编程] TELook源代码

[复制链接]
发表于 2021-6-24 12:47:00
1.单击鼠标左键意味着选中一行。如果按住鼠标拖动,选择将精确到字符。
2.函数都是C形式的,这样可以最大程度的与WINDOWS子窗口控件相似。要封装成类也很容易,只要把struct TEDIT改成 class TEdit 就行了。
3.所有ngcEdit_开头的函数都不是多线程安全的。想要多线程安全的话,最简单的方法就是跟WINDOWS通用控件一样,定义一堆消息,每个函数都以发送消息的形式去完成,以确保界面操作都在界面线程中完成
有什么不完善的地方自己修改源码。一般,游戏,2D还是3D的,都用这种方式来绘制GUI(界面),效率还是可以的。
下面是源码,主要内容都在TEdit.cpp,TEdit.h,TData.h这三个文件中:

(1. Clicking the left mouse button means selecting a row. If you hold down the mouse and drag, the selection will be accurate to the character.
2. The functions are all in C form, which can be similar to the WINDOWS child window control to the greatest extent. It is easy to encapsulate into a class, just change struct TEDIT to class TEdit.
3. All functions at the beginning of ngcEdit_ are not multi-thread safe. If you want multi-thread safety, the easiest way is to define a bunch of messages like WINDOWS common controls, and each function is completed in the form of sending messages to ensure that the interface operations are completed in the interface thread
If there is any imperfection, modify the source code by yourself. Generally, games, 2D or 3D, use this method to draw GUI (interface), and the efficiency is still ok.
The following is the source code, the main content is in the three files TEdit.cpp, TEdit.h, TData.h:)

1624510011745.rar



上一篇:一个不错的 HEX 计算器和源码
下一篇:汇编写的通用按键模拟器v1.4.0版+源码

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表