systemparametersinfo详细用法
应一同学要求特把这api详之
设置和取得windows系统参数,现在让我们详细地分析一下(其功能强大)
下面一例取得work区
procedure CenterWindow(winHnd : HWND; winWidth : Integer; winHeight : Integer);
var
screenDim : TRect;
screenLeft : Integer;
ScreenTop : Integer;
begin
SystemParametersInfo(SPI_GETWORKAREA, 0, @screenDim,0);
screenLeft := Trunc(((screenDim.Right-screenDim.Left)/2)-(winWidth/2));
screenTop := Trunc(((screenDim.Bottom-screenDim.Top)/2)-(winHeight/2));
...[ 查看全文 ]