RAD Studio 2010, Delphi 2010 and C++Builder 2010 enable developers to build touch based GUI, tablet, touchpad, and kiosk applications.

本周出现的2010版本的Delphi或RAD Studio已经可以支持用户开发支持触摸的程序了。

The flexible touch enabled framework that seamlessly supports multiple versions of Windows including Windows 2000, XP, Vista and Windows 7; and works with a variety of inputs including single and multi touch screens, pen, and mouse.

See how to::

  • Create gesture and touch enabled applications in just a few easy steps
  • Get a quick start with more than 30 included gestures like left, right, up, down, scratch-out, and interactive multi-touch gestures like pan, zoom, and rotate
  • Use the Gesture Designer to visually add your own custom gestures
  • Use the virtual touch, multi-locale, and multi-language keyboard for on-screen input
  • Upgrade existing Delphi and C++Builder applications to add support for touch and gesture input with little or no additional coding

来源:Embarcadero

How to use shared memory between instances

使用共享实例内存示例,忘了出处了:

program MapDemo;
uses
Windows;
type
TShared = record
strSaveFileName: array[0..1023] of char;
end;
var
hMappingFile: THandle;
PShared: ^TShared;
Msg: TMsg;
function StrCopy(Dest: PChar; const Source: PChar): PChar;
asm
PUSH EDI
PUSH ESI
MOV ESI,EAX
MOV EDI,EDX
MOV ECX,0FFFFFFFFH
XOR AL,AL
REPNE SCASB
NOT ECX
MOV EDI,ESI
MOV ESI,EDX
MOV EDX,ECX
MOV EAX,EDI
SHR ECX,2
REP MOVSD
MOV ECX,EDX
AND ECX,3
REP MOVSB
POP ESI
POP EDI
end;
begin
hMappingFile := OpenFileMapping(FILE_MAP_READ, False, ‘test’);
if hMappingFile = 0 then
hMappingFile := CreateFileMapping($FFFFFFFF, nil, PAGE_READWRITE, 0, SizeOf(TShared), ‘test’);
PShared := MapViewOfFile(hMappingFile, FILE_MAP_WRITE or FILE_MAP_READ, 0, 0, 0);
StrCopy(PShared^.strSaveFileName, ‘fuck bms’);
MessageBox(0, PShared^.strSaveFileName, pchar(‘It Works’), 0);
while GetMessage(Msg, 0, 0, 0) do;
UnmapViewOfFile(PShared);
CloseHandle(hMappingFile);
end.