亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unttool.pas

?? 半透明顯示在窗體上
?? PAS
?? 第 1 頁 / 共 3 頁
字號:
{******************************************************************************
*   Unit untTool
*   Module is support some tools function to the main module
*   CopyRight (C) Nanjing Fujitsu Nanda SoftWare Tech. Co., LTD.
*   CopyRight (C) By GanHuaXin 2001
*   Date :
*     New Develop   : 2001-1-8
*     Modify        : 2001-1-9 
******************************************************************************}
unit untTool;

interface
uses
  Sysutils,
  Windows,
  ShellAPI,
  Messages,
  untConst;

//function InitWindow(hWnd:HWND):BOOL;
function SetTransparent(hWnd:HWND; bAlpha:byte):BOOL;
function SetWindowAllOnTop(hWnd:HWND;bOnTop:Boolean):BOOL;
function SetWindowTransparent(hWnd:HWND;bTrans:Boolean):BOOL;
function SetWindowInCenter(hWnd:HWND):BOOL;
function SetAppAtStart(bSet:Boolean):BOOL;
function GetAppAtStart:BOOL;

function TrayIconAdd(hWnd:HWND; uID:integer; hIcon:HICON; hint:String):BOOL;
function TrayIconEdit(hWnd:HWNd; uID:integer; hIcon:HICON; hint:String):BOOL;
function TrayIconDel(hWnd:HWND; uID:integer):BOOL;
function ShowOnTray(hWnd:HWND):BOOL;
function DelOnTray(hWnd:HWND):Bool;

function SetRegData(Name:string; Buffer:Pointer; BufSize:Integer):BOOL;
function GetRegData(Name:string; Buffer:Pointer; BufSize:Integer):BOOL;

function SetRegWindowPosOpt(option:integer):BOOL;
function SetRegWindowPos(hWnd : HWND):BOOL;
function SetRegAllOnTop(option : boolean):BOOL;
function SetRegTransparent(option : boolean):BOOL;
function SetRegShowTray(option : boolean):BOOL;
function SetRegClockStyle(option : integer):BOOL;
function SetRegShowOnTaskBar(option : boolean):BOOL;

function GetRegWindowPosOpt(var Option : integer):BOOL;
function GetRegWindowPos(var Value:TMyWindowPos):BOOL;
function GetRegAllOnTop(var bOnTop:Boolean):BOOL;
function GetRegTransparent(var bTrans:Boolean):BOOL;
function GetRegShowTray(var bOnTray:Boolean):BOOL;
function GetRegClockStyle(var option:integer):BOOL;
function GetRegShowOnTaskBar(var bShown : boolean):BOOL;

function RegErrorHandle(error : integer):String;

function GetPlacePos(var Pos:TMyWindowPos):BOOL;

function GetCheckBitmaps(fuCheck:UINT; menuID:integer):HBITMAP;
function SetMenuOwnerDraw(menu : HMENU; cmdID : integer):BOOL;
function DrawBmpMenu(itemMenu : DRAWITEMSTRUCT):BOOL;

function CreateRgnFromBmp(bmp : HBITMAP):HRGN;
function CreateAlfaRgn(x,y,r,Alfa,halfWidth,ArrowLen:integer):HRGN;
function CreateHourRgn(hour,minute:integer):HRGN;
function CreateMinuteRgn(minute:integer):HRGN;
function CreateSecondRgn(second:integer):HRGN;


(*
function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer;
    stdcall; external 'KERNEL32.DLL';
*)
implementation


{******************************************************************************
*   Function SetLayeredWindowAttributes(hWnd,crKey,bAlpha,dwFlags)
*   Description :    This Function is a new function import from win2000
*       It can not work on win9x
******************************************************************************}
{
function SetLayeredWindowAttributes(
              hwnd    :HWND;        //handle aoubt the window
              crKey   :Longint;     //
              bAlpha  :byte;        //
              dwFlags :longint      //
          ):BOOL; stdcall; external user32;
}
type
  TSetLayeredWindowAttributes =
    function(hWnd:HWND;crKey:Longint;bAlphs:byte;dwFlags:LongInt):BOOL;stdcall;
{******************************************************************************
*   Function SetTransparent(hWnd,bAlpha)
*   Purpose:
*       To set the window transparent as degree by bAlpha
*   Arguments:
*       hWnd        :   Handl of the window
*       bAlpha      :   The transparent degree , range from 0 to 255
*   Return Value    :   Bool of function SetlayeredWindowAttributes
******************************************************************************}
function SetTransparent(hWnd:HWND; bAlpha:byte):BOOL;
var
  dwStyle : LongInt;
  pSetLayeredWindowAttributes:TSetLayeredWindowAttributes;
  hModule:THandle;
begin
  result := false;
  if hWnd = 0 then exit;
  dwStyle := GetWindowLong(hWnd,GWL_EXSTYLE);
  dwStyle := dwStyle or WS_EX_LAYERED;
  if SetWindowLong(hwnd,GWL_EXSTYLE,dwStyle)=0 then
    exit;
  {
  result :=
    SetLayeredWindowAttributes(hWnd,0, bAlpha, LWA_ALPHA);
  }

  hModule := LoadLibrary(user32);
  if (hModule<>0) then begin
    @pSetLayeredWindowAttributes :=
      GetProcAddress(hModule,'SetLayeredWindowAttributes');
    if (@pSetLayeredWindowAttributes <> nil) then
      result := pSetLayeredWindowAttributes(hWnd,0,bAlpha,LWA_ALPHA);
    FreeLibrary(hModule);
    pSetLayeredWindowAttributes := nil;
  end;
  if not result then
    MessageBox(GetFocus(),'Error to set tranparent!','Error!',MB_OK);
end;

function SetWindowAllOnTop(hWnd:HWND;bOnTop:Boolean):BOOL;
begin
  if bOnTop then
    SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE)
  else
    SetWindowPos(hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE);
  result := true;
end;

function SetWindowTransparent(hWnd:HWND;bTrans:Boolean):BOOL;
begin
  if bTrans then
    SetTransparent(hWnd,160)
  else
    SetTransparent(hWnd,255);
  result := true;
end;

function SetWindowInCenter(hWnd:HWND):BOOL;
var
  ScrH,ScrW : integer;
  rect      : TRect;
  NewLeft,NewTop : integer;
begin
  ScrH := GetSystemMetrics(SM_CYFULLSCREEN);
  ScrW := GetSystemMetrics(SM_CXFULLSCREEN);
  GetWindowRect(hWnd,rect);
  NewLeft := (ScrW - (rect.Right - rect.Left)) div 2;
  NewTop := (ScrH - (rect.Bottom - rect.Top)) div 2;
  SetWindowPos(hWnd,0,NewLeft,NewTop,0,0,SWP_NOSIZE or SWP_NOZORDER);
end;

function GetAppAtStart:BOOL;
var
  key : HKEY;
  ret : integer;
  chg : DWORD;
  Buffer : string[255];
  len : DWORD;
begin
  result := false;
  key := 0;
  ret := RegCreateKeyEx(
      HKEY_LOCAL_MACHINE,
      APP_KEY_START,
      0,Nil,REG_OPTION_NON_VOLATILE,
      KEY_ALL_ACCESS,
      Nil,key,@chg);
  if (ret<>ERROR_SUCCESS) or (key=0) then exit;
  len := 255;
  try
    if RegQueryValueEx(key,M_SUBNAME,nil,nil,PByte(@Buffer),@len)
      = ERROR_SUCCESS then result := true;
  finally
    RegCloseKey(key);
  end;
end;

function SetAppAtStart(bSet:Boolean):BOOL;
var
  key : HKEY;
  ret : integer;
  chg : DWORD;
  AppStr : String;
begin
  result := false;
  key := 0;
  ret := RegCreateKeyEx(
      HKEY_LOCAL_MACHINE,
      APP_KEY_START,
      0,Nil,REG_OPTION_NON_VOLATILE,
      KEY_ALL_ACCESS,
      Nil,key,@chg);
  if (ret<>ERROR_SUCCESS) or (key=0) then exit;
  try
    if not bSet then begin
      RegDeleteValue(key,M_SUBNAME);
    end
    else begin
      AppStr := ParamStr(0);
      RegSetValueEx(key,M_SUBNAME,0,REG_SZ,PChar(AppStr),Length(AppStr));
    end;
    result := true;
  finally
    RegCloseKey(key);
  end;
end;
{******************************************************************************
*   Function TrayIconAdd(hWnd,uID,hIcon,hint);
*   Purpose:
*       To Add a Icon on System TrayIcon Area
*   Arguments:
*       hWnd    : The revieved notify message's window's handle
*       uID     : The Identify of the Icon
*       hIcon   : The Handle of the ICON shows
*       hint    : The hint information when the mouse cursor on Tray Icon
*   Return Value:
*       See Shell_NotifyIcon
*   Date        : 2001-1-9
******************************************************************************}
function TrayIconAdd(hWnd:HWND; uID:integer; hIcon:HICON; hint:String):BOOL;
var
  IconData : NOTIFYICONDATA;
begin
  if (hWnd = 0) or (hIcon = 0) then begin
    result := false;
    exit;
  end;
  with IconData do begin
    cbSize            := SizeOf(IconData);
    uCallBackMessage  := WM_TRAYICONNOTIFY;
    uFlags            := NIF_MESSAGE or NIF_ICON or NIF_TIP;
    Wnd               := hWnd;
    StrCopy(szTip, PChar(hint));
  end;
  IconData.hIcon := hIcon;
  IconData.uID := uID;
  result :=
    Shell_NotifyIcon(NIM_ADD,@IconData);
end;

{******************************************************************************
*   Function TrayIconEdit(hWnd,uID,hIcon,hint)
*   Purpose:
*       To Modify the exist Tray Icon 's styles such as Icon or Hint string
*   Date    :
*       New Development   :   2001-1-9
*       Modified          :
******************************************************************************}
function TrayIconEdit(hWnd:HWNd; uID:integer; hIcon:HICON; hint:string):BOOL;
var
  IconData : NOTIFYICONDATA;
begin
  if (hWnd = 0) or (hIcon = 0) then begin
    result := false;
    exit;
  end;
  with IconData do begin
    cbSize            := SizeOf(IconData);
    uCallBackMessage  := WM_TRAYICONNOTIFY;
    uFlags            := NIF_MESSAGE or NIF_ICON or NIF_TIP;
    Wnd               := hWnd;
    StrCopy(szTip, PChar(hint));
  end;
  IconData.hIcon := hIcon;
  IconData.uID := uID;
  result :=
    Shell_NotifyIcon(NIM_MODIFY,@IconData);

end;

{******************************************************************************
*   Function TrayIconDel(hWnd,uID);
*   Purpose:
*       To Delete the Identify Icon on system Tray Icon Area
*   Arguments:
*       hWnd        : The Recevied Message Window's handle
*       uID         : The Identify of Icon
*   Return Value    : See Shell_NotifyIcon
*   Date            : 2001-1-9
******************************************************************************}
function TrayIconDel(hWnd:HWND; uID:integer):BOOL;
var
  IconData : NOTIFYICONDATA;
begin
  if (hWnd = 0) then begin
    result :=false;
    exit;
  end;
  with IconData do begin
    cbSize  := SizeOf(IconData);
    Wnd     := hWnd;
  end;
  IconData.uID := uID;
  result := Shell_NotifyIcon(NIM_DELETE, @IconData);
end;

{******************************************************************************
*   Function ShouldFlash:Bool;
*   Purpose:
*       To Determing whether it's time to flash the Tray Icon ?
*       and it is only used in procedure TimerProcMain
*   Date    :   2001-1-9
******************************************************************************}
function ShouldFlash:BOOL;
begin
  result := false;
end;

{******************************************************************************
*   Procedure DoFun;
*   Purpose:
*       To Show Some Fun things on the Screen
*   Date:
*       New Develop   :   2001-01-09
*       Modified      :   2001-01-10
******************************************************************************}
procedure DoFun;
var
  dc : HDC;
  //p   : TPoint;
  //pStru:PAINTSTRUCT;
begin
  dc := GetDC(0);
  TextOut(DC,400,400,'中華人民共和國',14);
  ReleaseDC(0,dc);
end;

procedure TimerProcFlash(
                  hwnd    : HWND;         // handle to window
                  Msg     : LongWord;     // WM_TIMER message
                  idEvent : integer;      // timer identifier
                  dwTime  : integer       // current system time
                  );stdcall;forward;
{******************************************************************************
*   Function TimerProcMain(hWnd,Msg,idEvent,dwTime
*   Purpose:
*       To control whether Flash the Tray ICON
*   Date    :   @001-1-9
******************************************************************************}
procedure TimerProcMain(
                  hWnd    : HWND;
                  Msg     : LongWord;
                  idEvent : integer;
                  dwTime  : integer
                  );stdcall;
begin
  if ShouldFlash then begin  // if the tray icon should Flash
    SetTimer(hWnd,2,400,@TimerProcFlash);  // Active timer 2
    DoFun;
    KillTimer(hWnd,1);                    // And kill self
  end else
    SendMessage(0,WM_PAINT,0,0);
end;

{******************************************************************************
*   Function TimerProcFlash(hWnd,Msg,idEvent,dwTime);
*   Purpose:
*       To Flash the TrayIcon
*   Date    :   2001-1-9
*
******************************************************************************
*   Some Global Variables:
*       IconS         :   Store the Icon Resources' Name as PChar
*       IconIndex     :   To Identify the Current Shown Icon No.
*       FlashCycle    :   The Flash Cycle times
*       MaxFlashCycle :   the Max Flash Cycle times
*
******************************************************************************}
var
  IconS : Array[1..4] of PChar =
          ('ICON_TRAY1','ICON_TRAY2',

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一二三四在线| 成人免费观看视频| 亚洲欧美成aⅴ人在线观看| 日韩欧美国产一二三区| 欧美一卡2卡三卡4卡5免费| 欧美精品自拍偷拍| 日韩一级二级三级精品视频| 欧美综合欧美视频| 欧美日韩国产精品成人| 欧美精品乱码久久久久久| 欧美精品第1页| 精品久久久久久久久久久院品网 | 亚洲国产sm捆绑调教视频 | 在线看一区二区| 欧美无乱码久久久免费午夜一区| 99久久精品免费看国产免费软件| av亚洲精华国产精华精| 色欧美88888久久久久久影院| 色噜噜久久综合| 欧美绝品在线观看成人午夜影视| 欧美丰满少妇xxxbbb| 欧美成人激情免费网| 国产亚洲精品7777| 亚洲精品写真福利| 美女视频一区二区三区| 国产成人免费xxxxxxxx| 91成人在线观看喷潮| 欧美日韩高清一区二区不卡| 日韩美女视频在线| 中文字幕中文在线不卡住| 伊人婷婷欧美激情| 精品在线一区二区三区| 成人教育av在线| 在线不卡的av| 国产欧美日韩精品在线| 亚洲第一在线综合网站| 精品无人码麻豆乱码1区2区 | 91黄色激情网站| 欧美一级理论片| 一区免费观看视频| 奇米影视一区二区三区| 99久久精品国产观看| 91精品久久久久久蜜臀| 国产精品传媒入口麻豆| 极品销魂美女一区二区三区| 91浏览器打开| 国产喂奶挤奶一区二区三区| 亚洲午夜精品在线| 不卡一区二区三区四区| 91麻豆精品国产| 亚洲视频免费观看| 国产乱人伦偷精品视频免下载| 日本大香伊一区二区三区| 国产午夜精品久久久久久免费视| 亚洲午夜久久久| 91亚洲国产成人精品一区二三| 精品日韩欧美一区二区| 亚洲电影在线播放| 色综合天天性综合| 中文字幕乱码亚洲精品一区| 美日韩一区二区三区| 欧美在线视频你懂得| 亚洲欧洲av色图| 99热国产精品| 亚洲国产成人一区二区三区| 精品制服美女久久| 欧美一二三在线| 无码av中文一区二区三区桃花岛| av亚洲精华国产精华| 日本一区二区不卡视频| 国产美女娇喘av呻吟久久| 亚洲精品一区在线观看| 激情五月婷婷综合| 亚洲精品在线观看视频| 麻豆91在线看| 精品日产卡一卡二卡麻豆| 免费看欧美女人艹b| 日韩视频一区二区三区在线播放| 亚洲第一在线综合网站| 欧美日韩成人综合| 日韩福利电影在线| 精品乱码亚洲一区二区不卡| 久久精品国产一区二区| 精品国产免费人成在线观看| 久久精品国产亚洲高清剧情介绍| 5月丁香婷婷综合| 看片的网站亚洲| 久久久国产精品午夜一区ai换脸| 国产在线不卡一卡二卡三卡四卡| 欧美精品一区二区在线观看| 国产精品自拍网站| 国产精品第13页| 色婷婷综合激情| 日本在线不卡视频| 久久久久久久久久久99999| 成人午夜伦理影院| 亚洲综合视频在线观看| 91精品国产全国免费观看 | 精品国产一区二区三区av性色 | 久久午夜免费电影| 91美女视频网站| 亚洲一区自拍偷拍| 久久综合九色欧美综合狠狠 | 91视频www| 天天综合网天天综合色| 精品动漫一区二区三区在线观看| 成人污污视频在线观看| 亚洲午夜av在线| 精品成人一区二区| 色网综合在线观看| 成人av网址在线观看| 夜夜亚洲天天久久| 精品国精品国产尤物美女| av不卡免费在线观看| 无码av免费一区二区三区试看| 精品三级在线看| 欧美日韩一区二区三区不卡| 国产一区激情在线| 亚瑟在线精品视频| 综合久久久久久| 精品日韩在线一区| 欧美日韩在线三级| 成人黄色小视频在线观看| 首页综合国产亚洲丝袜| 国产精品久久一卡二卡| 日韩欧美一区二区久久婷婷| 91亚洲国产成人精品一区二区三| 久久国产视频网| 亚洲午夜久久久久久久久电影院 | 在线免费观看不卡av| 国产精品自拍在线| 日韩电影免费在线看| 亚洲人吸女人奶水| 国产人成亚洲第一网站在线播放| 717成人午夜免费福利电影| 91女神在线视频| 国产精品亚洲视频| 蜜桃av一区二区三区电影| 亚洲国产一区在线观看| 亚洲色图欧洲色图| 欧美激情一区二区在线| 2020国产精品自拍| 日韩欧美久久一区| 91精品福利在线一区二区三区 | 国产精品美女久久久久久久久久久 | 亚洲综合色婷婷| 亚洲视频精选在线| 国产精品情趣视频| 国产精品网站在线观看| 欧美激情一区二区| 国产亚洲一区二区三区四区 | 亚洲欧美日韩小说| 亚洲欧洲一区二区三区| 国产精品久久久久aaaa| 欧美激情一区二区在线| 国产精品久久一级| 亚洲欧美一区二区三区久本道91| 国产精品无人区| 国产精品护士白丝一区av| 亚洲私人黄色宅男| 一区二区三区视频在线观看| 一区二区三区自拍| 午夜激情久久久| 美女一区二区视频| 国产成人午夜视频| 99re6这里只有精品视频在线观看| 丰满少妇久久久久久久| 99久久综合精品| 欧美丝袜丝交足nylons图片| 欧美日韩精品免费观看视频| 欧美一级日韩免费不卡| 欧美精品一区二区三| 中文子幕无线码一区tr| 亚洲九九爱视频| 日本特黄久久久高潮| 国产盗摄一区二区| 在线亚洲精品福利网址导航| 欧美剧情片在线观看| 久久久不卡网国产精品二区| 成人欧美一区二区三区在线播放| 一区二区三区在线视频免费| 天天av天天翘天天综合网色鬼国产 | 色噜噜狠狠一区二区三区果冻| 欧洲另类一二三四区| 日韩欧美123| 国产精品全国免费观看高清| 午夜精品久久久| 国产精品白丝jk黑袜喷水| 在线视频你懂得一区| 精品久久久三级丝袜| 亚洲欧美日本韩国| 狠狠色丁香婷婷综合久久片| aaa亚洲精品一二三区| 日韩三级视频在线观看| 自拍偷拍亚洲激情| 九一九一国产精品| 欧美专区日韩专区| 国产精品嫩草久久久久| 日本免费在线视频不卡一不卡二| 粉嫩绯色av一区二区在线观看 |