var R: TRect;begin//Form1.Canvas.TextOut(20,20, '说明'); R:=Rect(20, 20, 120, 70); DrawText(Canvas.Handle, '说明', -1, R, DT_END_ELLIPSIS);end;//在...
ByHellinger Software.Class to handle text files as memory mapped files.Including efficient methodes for access like sequentiell reador random access r...
分类:
其他好文 时间:
2014-10-20 09:58:03
阅读次数:
251
当我们需要工作线程来操作的时候,很多时候会有同步问题,UI更新问题。Handle机制就是为了解决这个问题而产生的。android允许每个线程都有自己的消息队列,同时也可以是主线程消息队列。但是很多时候,我们希望可以快速的创建一个支持自己消息队列的android线程,这个时候HandlerThread...
分类:
编程语言 时间:
2014-10-19 15:29:03
阅读次数:
237
用户使用函数CreateFile()创建与指定串口相关联的文件,然后可以使用该函数返回的文件句柄进行串口参数设置。? 01 HANDLE hModem; //定义串口句柄02 hModem=CreateFile("COM1",GENERIC_READ|GENERIC_WRITE,0,0,? 03 O...
procedure TForm1.btn1Click(Sender: TObject); var h: HWnd; p: array[0..254] of char; TitleStr: string; begin h := GetWindow(Handle, GW_HW...
分类:
其他好文 时间:
2014-10-18 15:29:32
阅读次数:
137
本文主要跟大家介绍Delphi中获取其它进程的窗口句柄,在Delphi中获取其它进程的窗口句柄,绝大部分人首先想到的会使用:FindWindow或者用GetWindow来遍历查找,如: handle := FindWindow(nil,PChar('窗口的标题')); 或者: pr...
1.设备句柄可以用API函数CreateFile获得。它的原型为HANDLE CreateFile( LPCTSTR lpFileName, // 文件名/设备路径 DWORD dwDesiredAccess, // 访问方式 DWORD dwShareMode, // 共享方式 LPSECURIT...
#include
#include
using namespace std;
template
class Singleton {
public:
static T *instance() {
if (object == NULL) {
mtx.lock();
if (object == NULL) object = new T;
mtx.unlock();
}...
分类:
编程语言 时间:
2014-10-18 00:45:37
阅读次数:
226
在看《Cplusplus Concurrency in Action Practical Multithreading》。记录一下学习过程,这是第三章最后,关于使用锁的部分。...
分类:
其他好文 时间:
2014-10-17 22:00:54
阅读次数:
196
转:http://www.blogjava.net/xylz/archive/2010/07/02/325079.html在这一部分开始讨论数组原子操作和一些其他的原子操作。AtomicIntegerArray/AtomicLongArray/AtomicReferenceArray的API类似,选...
分类:
编程语言 时间:
2014-10-17 18:33:09
阅读次数:
168