多線程編程(14) - 多線程同步之 WaitableTimer (等待定時器對象)
function CreateWaitableTimer( lpTimerAttributes: PSecurityAttributes; {安全} bMan
多線程編程(15) - 多線程同步之 WaitableTimer (等待定時器對象)[續]
本次專門研究下 SetWaitableTimer 的第二個參數(起始時間). 它有正值、負值、0值三種情況, 前面已用過 0值. 先學習負值(相對時間),
多線程編程(16) - 多線程同步之 WaitableTimer (等待定時器對象)[續二]
想過沒有? WaitableTimer 是在 定時等待, 前面例子中的 WaitForSingleObject 等待函數 也在等待, 這就 雙重等待 了,
多線程編程(17) - 多線程同步之 WaitableTimer (等待定時器對象)[續三]
根據 WaitableTimer 的主要功用, 現在再把它放在 線程同步 的話題中討論有點不合適了, 就要結束它.//重新看看那個 APC 回調函數的格式:
多線程編程(19) - 不使用同步工具, 手動協調線程依次執行
在前面例子的基礎上, 探討新問題. 假如我們想讓幾個線程(例子中是 3 個)依次執行, 我們可以使用臨界區、信號、互斥等手段; 但下面第一個例子什麼同步工
Delphi 與 DirectX 之 DelphiX(1): 安裝測試
本文示例源代碼或素材下載 DirectX, 微軟很久的技術了; 從 Windows Vista 開始, DirectX 已經是微軟操作系統的界面基礎了.
Delphi 與 DirectX 之 DelphiX(2): DelphiX 各單元概覽
DXClass 單元TControlSubClassTControlSubClassProcTCustomDXTimerTDirectXTDirectXD
Delphi 與 DirectX 之 DelphiX(3): 初識 TDXDraw
在 DelphiX 中, 所能看到的一般都是畫在 TDXDraw. TDXDraw 默認兩個繪圖表面: TDXDraw.Surface 和 TDXDraw
Delphi 與 DirectX 之 DelphiX(4): 初識 TDXTimer
DelphiX 提供了高性能的計時器 TDXTimer, 使用方法和 Timer 基本一樣. 我們在使用 Timer 時, 很少把 Interval 設為
Delphi 與 DirectX 之 DelphiX(5): 初識 TDXImageList
新建工程後, 在窗體上分別添加: DXDraw1、DXImageList1; 然後只需要下面四行代碼即可在 DXDraw1 中顯示 DelphiX.dxg
Delphi 與 DirectX 之 DelphiX(6): 讓 TDXImageList 和常規 VCL 交互使用
本例測試了兩個問題: 1、其他 VCL 加載的圖片能否給 TDXImageList 使用; 2、TDXImageList 中的圖片能否給其他 VCL 使用
Delphi 與 DirectX 之 DelphiX(7): 給 TDXImageList 加載圖片的最後方案
本例效果圖: 代碼文件:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, C
Delphi 與 DirectX 之 DelphiX(8): 第一個簡單動畫
本例效果圖(用 gif 動畫演示, 無論如何也出不來 DirectX 的流暢效果): 代碼文件:unit Unit1;interfaceuses Windo
Delphi 與 DirectX 之 DelphiX(9): 透明色與是否透明
TDXImageList.Items 中的每個 TPictureCollectionItem 的默認透明色是黑色, 並默認透明. 本例使用的測試圖片:&nb
Delphi 與 DirectX 之 DelphiX(10): TPictureCollectionItem.StretchDraw - 繪制到指定矩形
本例效果圖: 代碼文件:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Cl
Delphi 與 DirectX 之 DelphiX(11): TPictureCollectionItem.DrawAdd、DrawSub
本例效果圖: 代碼文件:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Cl
Delphi 與 DirectX 之 DelphiX(12): TPictureCollectionItem.DrawAlpha
本例效果圖: 代碼文件:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, C
Delphi 與 DirectX 之 DelphiX(13): TPictureCollectionItem.DrawRotate
本例效果圖(實際效果是相當流暢的, gif 只能說明個動作趨勢): 代碼文件:unit Unit1;interfaceuses Windows, Messa