C++Builder 笔记
1、界面窗口如何不显示标题栏?
在Form属性栏里面把BorderStyle的值设为None
2.wchar_t
wchar_t是C/C++的字符类型,是一种扩展的存储方式,wchar_t类型主要用在国际化程序的实现中
定义方式:
wchar_t *str = "Hello World!!";
3.C++如何启动一个其他程序
HINSTANCE ShellExecute(
HWND hwnd, //句柄
LPCTSTR lpOperation, //操作类型 open、runas、print、edit、explore、find
LPCTSTR lpFile, // 需要打开的文件或者程序的名字
LPCTSTR lpParameters, // NULL
LPCTSTR lpDirectory, //NULL
INT nShowCmd //打开选项
);
const wchar_t URL[] = L"www.baidu.com";
ShellExecute(NULL, open, URL, NULL, NULL, SW_SHOWNORMAL);
4.窗口Form以及组件属性
Form->Caption = "title" 窗体标题
Form->BorderStyle = bsNone 没有窗体默认边界
Form->Position = poScreenCenter 窗体位于屏幕中心
Form->FormStyle = fsStayOnTop 窗体始终位于窗口最前面
Image->Align = alClient 图片的尺寸和窗体大小一样
Image->Stretch = true 图片看扩展
5.控制台输出Debug信息
#if 1
AllocConsole();
AttachConsole(GetCurrentProcessId());
freopen("CON","w",stdout);
#endif
6.监听某段程序的运行时间(VCL)
首先加上头文件
#include <System.Diagnostics.hpp>
#include <Windows.h>
然后初始化 TStopwatch::Create();
DWORD start_time = TStopwatch::GetTimeStamp() / (TStopwatch::Frequency/1000);// GetTickCount();
.......
DWORD end_time = TStopwatch::GetTimeStamp() / (TStopwatch::Frequency/1000); //GetTickCount();
end_time-start_time 就是时间差
C++Builder 笔记的更多相关文章
- [学习笔记]设计模式之Builder
写在前面 为方便读者,本文已添加至索引: 设计模式 学习笔记索引 作为一个新入职的魔导士呢,哦不,是程序员,我以为并没有太多机会去设计项目的软件架构.但是,工作一段时间之后,自己渐渐意识到,哪怕是自己 ...
- 23 DesignPatterns学习笔记:C++语言实现 --- 1.4 Builder
23 DesignPatterns学习笔记:C++语言实现 --- 1.4 Builder 2016-07-21 (www.cnblogs.com/icmzn) 模式理解
- 开源规则引擎 Drools 学习笔记 之 -- 1 cannot be cast to org.drools.compiler.kie.builder.impl.InternalKieModule
直接进入正题 我们在使用开源规则引擎 Drools 的时候, 启动的时候可能会抛出如下异常: Caused by: java.lang.ClassCastException: cn.com.cheng ...
- [moka同学笔记]Yii2 数据操作Query Builder 2
Query Builder $rows = (new \yii\db\Query()) ->select(['dyn_id', 'dyn_name']) ->from('zs_dynast ...
- [moka同学笔记]Yii2 数据操作Query Builder
Query Builder [php] view plain copy $rows = (new \yii\db\Query()) ->select(['dyn_id', 'dyn_name ...
- Flex Builder读书笔记(一)
Flex表现层服务器包含Flex应用框架和Flex运行服务,Flex框架包含MXML描述性语言.ActionScript程序语言和Flex类库.MXML原理定义用户界面元素,ActionScript定 ...
- Android 开发笔记 “The constructor AlertDialog.Builder(new View.OnKeyListener(){}) is undefined”
1.The constructor AlertDialog.Builder(new View.OnKeyListener(){}) is undefined等,应该有很多类似问题 比如你的源码文件名是 ...
- 学习笔记——建造者模式Builder
构造者模式.外部场景如果需要一个汽车类,它不需要关心如何构造,它只需要告诉Director需要什么,就可以从Director获得. 如:CDirector(IBuilder* aBuilder); 场 ...
- 安卓开发笔记(十六):'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request
当出现了'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request的错误的时候,实际上是我们在写代码的时候少打了 ...
随机推荐
- 【转】简单的 Laravel 5 REST API
Introduction Almost all successful internet based companies have APIs. API is an acronym for Applica ...
- Arrays.toString Arrays.asList
import java.util.Arrays; public class TestCalc{ public static void main(String[] args) { ,,,,,,,}; / ...
- docker squid---but git proxy should specify by git config --global http.proxy http:...
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.t ...
- Google物联网操作系统协同框架Weave深度解析
1. Google Weave框架 在2015年的Google I/O大会上,负责Android业务的桑达.皮查伊(SundarPichai)宣布了Google最新的物联网战略.这包括一个 ...
- importSTV的使用
一:由HDFS将数据直接导入到HBase中 1.生成TSV文件 2.内容 3.上传到HDFS 4.运行 export HBASE_HOME=/etc/opt/modules/hbase-0.98.6- ...
- Magento打印(配送单、退款单、发票)时PDF中的乱码问题
我使用Magento1.4.2,在其自带的TTF文件不能很好地解析中文字符,TTF文件的位置在网站根目录下的/lib/LinLibertineFont/中.打印的中文字符都是这样的 解决方法: 1.在 ...
- Processes vs Threads
A process is an executing instance of an application. What does that mean? Well, for example, when y ...
- A Word (Or Two) On Quality
In the world of interactive project management the promise of quality has become cliché. Quality is ...
- Javascript数据类型的一些注意点
1.字符串类型 substring()返回指定索引区间的子串: var s = 'hello, world' s.substring(0, 5); // 从索引0开始到5(不包括5),返回'hello ...
- 破解Mysql数据库密码
破解Mysql数据库密码 点我,点我,破解mysql数据库密码: