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

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

?? winsubclass.pas

?? delphi控件
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
end;

Procedure TSkinControl.SetParentBK(value:boolean);
var  PropInfo:PPropInfo;
     s:string;
begin
{$ifdef DELPHI_7}
     if xoParentBackGround in fsd.options then exit;
     if control=nil then exit;
     PropInfo:=GetPropInfo(control,'ParentBackground');
     if PropInfo<>nil then  begin
        if value then begin
          s:=lowercase(GetEnumProp(control,PropInfo));
          if s='true' then parentbk:=true
          else parentbk:=false;
          if parentbk then
             SetProperty(control,'ParentBackground','False');
        end else begin
          if parentbk then
             SetProperty(control,'ParentBackground','True');
        end;
     end;
{$endif}
end;

Procedure TSkinControl.RestoreColor;
begin
end;

Procedure TSkinControl.Inithwnd(ahwnd:Thandle;sd:TSkinData;acanvas:TCanvas;sf:Tcomponent);
begin
   fsd:=sd;
   fCanvas:=acanvas;
   skinform:=sf;
   hwnd := ahwnd;
   enabled:=true;
   kind := 0;
   Twinskinform(skinform).addcontrollist(self);
   isunicode:=IsWindowUnicode(hwnd);
   caption:=getformcaption(hwnd);
   FObjectInst := MakeObjectInstance(NewWndProc);
   if isunicode then begin
      FPrevWndProc := Pointer(GetWindowLongw(hwnd,GWL_WNDPROC));
      SetWindowLongw(hwnd, GWL_WNDPROC,LongInt(FObjectInst));
   end else begin
      FPrevWndProc := Pointer(GetWindowLong(hwnd,GWL_WNDPROC));
      SetWindowLong(hwnd, GWL_WNDPROC,LongInt(FObjectInst));
   end;
   if hwnd<>0 then
      InvalidateRect(hwnd, 0,true)  ;
   inited := true;
   skinstate:=skin_active;
end;

Procedure TSkinControl.Unsubclass;
begin
   if newcolor and (control<>nil) then begin
        setparentbk(false);
        Taccontrol(control).color:=oldcolor;
   end;
end;

Procedure TSkinControl.SkinChange;
begin
   if newcolor and (control<>nil) then
     Taccontrol(control).color:=fsd.colors[csButtonFace];
   Invalidate;
//      setproperty(control,'Color',inttostr(fsd.colors[csButtonFace]));
end;

destructor TSkinControl.Destroy;
var s:string;
begin
{     s:=caption;
     if control<>nil then s:=s+' '+control.ClassName;
     if gcontrol<>nil then s:=s+' '+gcontrol.ClassName;
     skinaddlog('skincontrol destory '+s); }

   if assigned(oldwndproc) then begin
        if control<>nil then Control.WindowProc := OldWndProc;
        oldwndproc:=nil;
   end;
   if fobjectinst<>nil then begin
       if isunicode then
         SetWindowLongw(hwnd, GWL_WNDPROC,LongInt(FPrevWndProc))
       else
         SetWindowLong(hwnd, GWL_WNDPROC,LongInt(FPrevWndProc));
       FreeObjectInstance(FObjectInst);
       fobjectinst:=nil;
   end;

   if skinform<>nil then Twinskinform(skinform).DeleteControl(self);
   inherited destroy;
end;

function TSkinControl.GetParentColor(acolor:Tcolor):Tcolor;
var pcontrol:TacControl;
    PropInfo:PPropInfo;
begin
   result:=acolor;
   if control<>nil then begin
      pcontrol:=TAccontrol(control.parent);
      if pcontrol<>nil then begin
          PropInfo:=GetPropInfo(pcontrol,'Color');
          if (PropInfo<>nil) and
              (propinfo^.PropType^.Kind = tkInteger) then
              result :=GetOrdProp(pcontrol,PropInfo)
          else
             result:= acolor;
      end ;
   end ;
end;

procedure TSkinControl.NewWndProc(var Message: TMessage);
var s:string;
begin
  done:=false;
  if message.msg=CN_SkinEnabled then begin
       skinned:=message.WParam>0;
       if skinned then Invalidate;
  end else
  if skinned then begin
     if BeforeProc(message) then begin
       default(Message);
       AfterProc(message);
     end;
  end
  else default(Message);
end;

procedure TSkinControl.Default(Var Msg: TMessage);
begin
  if assigned(oldwndproc) then
         OldWndProc(Msg)
  else
     msg.result:=CallWindowProc(FPrevWndProc,hwnd,Msg.msg,msg.WParam,msg.LParam);
end;

{procedure TSkinControl.Notification(AComponent: TComponent;Operation: TOperation);
var j:integer;
    sf:TWinskinform;
begin
  inherited Notification(AComponent, Operation);

  if (Operation = opInsert) and (AComponent <> nil)
     and (AComponent is Tcontrol) then begin
      sf:=TWinskinform(skinform);
      sf.AddComp(Tcontrol(acomponent),sf.FForm);
      skinaddlog(format('Notification Insert :%s,%s',[acomponent.classname,acomponent.name]));
  end;
end;  }

procedure TSkinControl.MouseLeave;
begin
  if hwnd>0 then sendmessage(hwnd,CM_MOUSELEAVE,0,0);
//  Twinskinform(owner).activeskincontrol:=nil;
end;

procedure TSkinControl.Invalidate;
begin
  //if control<>nil then control.Invalidate
  //else
  if gcontrol<>nil then gcontrol.invalidate
  else if (hwnd>0) then begin
       InvalidateRect(hwnd,0,true);
       UpdateWindow(hwnd);
  end;
end;

procedure TSkinControl.PaintControl(adc:HDC=0);
var dc:HDC ;
    rc:TRect;
begin
  if GetWindowRect( hWnd, rc ) then begin;
    try
      boundsrect:=rc;
      OffsetRect( rc, -rc.left, -rc.top );
      if (adc=0) then begin
          DC := GetWindowDC( hWnd );
          try
             Drawcontrol(dc,rc);
          finally
             ReleaseDC( hwnd, DC );
          end;
      end else begin
         //dc:=adc;
         //boundsrect:=rc;
         //OffsetRect( rc, -rc.left, -rc.top );
         Drawcontrol(adc,rc);
      end;
    except
    end;
  end;
end;

procedure FillColor( dc:HDC; rc:TRect;acolor:Tcolor);
var  Brush: HBrush;
begin
    Brush := CreateSolidBrush(acolor);
    try
      fillrect(dc,rc,brush);
    finally
      DeleteObject(Brush);
    end;
end;

procedure TSkinControl.FillBG( dc:HDC; rc:TRect);
var  Brush: HBrush;
begin
    Brush := CreateSolidBrush(fsd.colors[csButtonFace]);
    try
      fillrect(dc,rc,brush);
    finally
      DeleteObject(Brush);
    end;
end;

function TSkinControl.GetWindowLongEx(ahWnd: HWND; nIndex: Integer): Longint;
begin
   if isunicode then
       result:=GetWindowLongw( ahWnd, nIndex )
   else
       result:=GetWindowLong( ahWnd, nIndex );
end;

procedure TSkinControl.FillParentBG( dc:HDC; rc:TRect);
var  Brush: HBrush;
     acolor:Tcolor;
begin
    acolor:= getparentcolor(fsd.colors[csButtonFace]);
    Brush := CreateSolidBrush(COLORREF(acolor));
    try
      fillrect(dc,rc,brush);
    finally
      DeleteObject(Brush);
    end;
end;

procedure TSkinControl.DrawFocus(hDC: HDC; wString: WideString; rc: TRect; uFormat: UINT);

var r1:Trect;
//const
//  Alignments: array[TAlignment] of Word = (DT_LEFT,DT_RIGHT,DT_CENTER );
begin
     r1:=rc;
     Tnt_DrawTextW(hdc,caption,r1,uformat or DT_CALCRECT or DT_NOCLIP);
     if uformat and dt_center >0 then
       OffsetRect(r1, ((rc.right - rc.left) - (r1.right - r1.left)) div 2,
        ((rc.Bottom - rc.Top) - (r1.Bottom - r1.Top)) div 2-1)
     else if uformat and DT_RIGHT >0 then begin
       OffsetRect(r1,((rc.right - rc.left) - (r1.right - r1.left)), 0);
     end;
     InflateRect(r1,2,1);
     if r1.Top<rc.Top then r1.Top:=rc.Top;
     if r1.Bottom>rc.Bottom then r1.Bottom:=rc.Bottom;
     if r1.Right>rc.Right then r1.Right := rc.Right;
     if r1.Left<rc.Left then r1.Left := rc.Left;
     DrawFocusRect(hdc, r1);
end;

procedure TSkinControl.doLogMsg(aid:string;msg:TMessage);
var s:string;
begin
  {$IFDEF test}
    s:=MsgtoStr(msg);
    if s='' then exit;
    if SkinCanLog then Logstring.add(aid+s);
  {$ENDIF}
end;

procedure TSkinControl.AfterProc(var Message: TMessage);
begin
    case message.msg of
      WM_Paint:
         PaintControl(message.WParam);
      WM_KILLFOCUS,WM_SETFOCUS:
         Invalidate;
//          PaintControl;
      WM_SETTEXT: begin
           Invalidate;
         end;
      CN_SkinEnabled :skinned := message.WParam>0;
      wm_enable,CM_ENABLEDCHANGED:Invalidate;
    end;
end;

function TSkinControl.BeforeProc(var Message: TMessage):boolean;
begin
   result:=false;
   case message.msg of
      CN_IsSkined : message.result := 1;
      WM_NCDESTROY:begin
          result:=false;
          default(message);
          skinned:=false;
          skinstate:=skin_deleted;
          Unsubclass;
          //can't free,leave it,until skinform free;
          //         free;
         end;
     else result:=true;
   end;
end;

procedure TSkinControl.DrawControl( dc:HDC; rc:TRect);
begin
end;

function  TSkinControl.GetState:integer;
begin
   result:=1;
end;

function  GetProperty(control: TObject ;aprop:string):string;
var PropInfo:PPropInfo;
    s:string;
    i:integer;
begin
   s:='';
   i:=0;
   if  control<>nil then begin
      PropInfo:=GetPropInfo(control,aprop);
      if PropInfo<>nil then  begin
         if propinfo^.PropType^.Kind= tkEnumeration then
          s:=GetEnumProp(control,PropInfo)
         else if propinfo^.PropType^.Kind = tkInteger then begin
//           i:= GetInt64Prop(control,PropInfo);
           i:=GetOrdProp(control,PropInfo);
           s:=inttostr(i);
         end;
      end;
   end;
   result := s;
end;

function  GetIntProperty(control: TObject ;aprop:string):integer;
var PropInfo:PPropInfo;
begin
   result:= -1;
   if  control<>nil then begin
      PropInfo:=GetPropInfo(control,aprop);
      if (PropInfo<>nil) and
         (propinfo^.PropType^.Kind = tkInteger) then begin
//           i:= GetInt64Prop(control,PropInfo);
           result :=GetOrdProp(control,PropInfo);
      end;
   end;
end;

function  GetEnumProperty(control: TObject;aprop:string):string;
var PropInfo:PPropInfo;
begin
   result:= '';
   if  control<>nil then begin
      PropInfo:=GetPropInfo(control,aprop);
      if (PropInfo<>nil) then
           result := GetEnumProp(control,PropInfo);
   end;
end;

{$IFNDEF COMPILER_5a}
procedure AssignWideStr(var Dest: WideString; const Source: WideString);
begin
  Dest := Source;
end;

procedure IntGetWideStrProp(Instance: TObject; PropInfo: PPropInfo;
  var Value: WideString); assembler;
asm
        { ->    EAX Pointer to instance         }
        {       EDX Pointer to property info    }
        {       ECX Pointer to result string    }

        PUSH    ESI
        PUSH    EDI
        MOV     EDI,EDX

        MOV     EDX,[EDI].TPropInfo.Index       { pass index in EDX }
        CMP     EDX,$80000000
        JNE     @@hasIndex
        MOV     EDX,ECX                         { pass value in EDX }
@@hasIndex:
        MOV     ESI,[EDI].TPropInfo.GetProc
        CMP     [EDI].TPropInfo.GetProc.Byte[3],$FE
        JA      @@isField
        JB      @@isStaticMethod

@@isVirtualMethod:
        MOVSX   ESI,SI                          { sign extend slot offset }
        ADD     ESI,[EAX]                       { vmt + slot offset }
        CALL    DWORD PTR [ESI]
        JMP     @@exit

@@isStaticMethod:
        CALL    ESI
        JMP     @@exit

@@isField:
  AND  ESI,$00FFFFFF
  MOV  EDX,[EAX+ESI]
  MOV  EAX,ECX
  CALL  AssignWideStr

@@exit:
        POP     EDI
        POP     ESI
end;

function GetWideStrProp(Instance: TObject; PropInfo: PPropInfo): WideString;
begin
  IntGetWideStrProp(Instance, PropInfo, Result);
end;

procedure SetWideStrProp(Instance: TObject; PropInfo: PPropInfo;
  const Value: WideString); assembler;
asm
        { ->    EAX Pointer to instance         }
        {       EDX Pointer to property info    }
        {       ECX Pointer to string value     }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
eeuss鲁一区二区三区| 欧美一卡在线观看| 51精品国自产在线| 国产三级三级三级精品8ⅰ区| 亚洲天堂成人网| 狠狠久久亚洲欧美| 欧美日韩成人一区二区| 国产免费久久精品| 久久成人久久爱| 欧美性猛片aaaaaaa做受| 亚洲国产经典视频| 国内精品伊人久久久久影院对白| 欧美日韩一区在线观看| 中文字幕日本乱码精品影院| 国内国产精品久久| 欧美一区二区免费视频| 一区二区三区四区不卡在线| 国产激情一区二区三区四区 | 亚洲成人免费视| 国产成人午夜电影网| 宅男在线国产精品| 亚洲国产日日夜夜| 欧美中文一区二区三区| 国产精品二三区| 国产成人综合亚洲网站| 精品国产乱码久久久久久免费| 日本欧美久久久久免费播放网| 色视频欧美一区二区三区| 国产精品国产自产拍高清av王其| 国产乱码精品一区二区三区忘忧草 | 亚洲欧美日韩成人高清在线一区| 精品一区二区三区蜜桃| 欧美一区二区三区视频免费播放| 亚洲成av人片在线| 欧美日韩高清影院| 亚洲va国产va欧美va观看| 欧美在线免费播放| 五月婷婷色综合| 在线电影欧美成精品| 视频一区视频二区中文字幕| 欧美精品tushy高清| 日韩电影一区二区三区四区| 7777精品伊人久久久大香线蕉完整版 | 91在线观看视频| 亚洲人成影院在线观看| 成人激情校园春色| 亚洲免费av高清| 欧美人动与zoxxxx乱| 日韩电影在线一区| 日韩欧美三级在线| 国产美女一区二区三区| 国产亚洲一区二区三区在线观看 | 三级在线观看一区二区| 91精品国产乱码久久蜜臀| 久久精品国产精品青草| 中文字幕精品综合| 在线一区二区观看| 免费一级片91| 中文字幕av不卡| 在线观看欧美精品| 久热成人在线视频| 国产精品亲子乱子伦xxxx裸| 91精彩视频在线| 久久国产精品99久久人人澡| 久久久精品tv| 日本福利一区二区| 蜜桃一区二区三区在线| 中文字幕乱码亚洲精品一区| 在线精品国精品国产尤物884a| 麻豆精品蜜桃视频网站| 国产精品免费看片| 欧美日韩一区二区在线视频| 国内精品在线播放| 一区二区三区精品久久久| 日韩欧美一区二区三区在线| 成人理论电影网| 色综合久久中文综合久久97| 免费观看成人av| 亚洲美女一区二区三区| 精品久久久影院| 欧洲国内综合视频| 国产精品99久久久久久宅男| 香蕉久久一区二区不卡无毒影院| 久久久久综合网| 欧美日韩大陆在线| 91在线视频在线| 国产大陆精品国产| 日本vs亚洲vs韩国一区三区| 最新久久zyz资源站| 精品盗摄一区二区三区| 欧美精品 国产精品| av综合在线播放| 国产麻豆精品95视频| 天天av天天翘天天综合网色鬼国产 | 欧美日韩免费电影| 97精品国产97久久久久久久久久久久| 久久精品99久久久| 午夜欧美大尺度福利影院在线看| 亚洲色图另类专区| 中文一区一区三区高中清不卡| 日韩一区二区三区av| 欧美日韩在线三区| 一本到不卡精品视频在线观看| 成人福利视频在线看| 国产精品一线二线三线精华| 麻豆国产一区二区| 免费欧美在线视频| 奇米精品一区二区三区四区 | 欧美三电影在线| 99精品在线免费| 成人免费视频一区二区| 国产麻豆91精品| 国产乱码精品1区2区3区| 精品一二三四区| 精品无人区卡一卡二卡三乱码免费卡 | 国产精品99久久久久久有的能看 | 精品国产3级a| 国产性天天综合网| 日韩视频永久免费| 久久精品国产亚洲高清剧情介绍 | 亚洲激情图片小说视频| 日韩欧美国产不卡| 制服丝袜日韩国产| 日韩无一区二区| 欧美一区二区女人| 26uuu精品一区二区| 日韩精品一区二区三区老鸭窝| 欧美成人猛片aaaaaaa| 精品日韩av一区二区| 久久综合一区二区| 欧美国产精品专区| 亚洲男人的天堂网| 国产成人高清在线| 亚洲永久免费视频| 麻豆精品视频在线观看免费| 欧美日韩国产精选| 国产.欧美.日韩| 成人免费视频网站在线观看| 97久久超碰国产精品| 久久精品人人做人人爽97| 欧美高清视频一二三区| 日韩一级免费观看| 精品久久国产97色综合| 3d成人动漫网站| 日韩欧美一区二区在线视频| 51精品久久久久久久蜜臀| 欧美三级中文字| 精品国偷自产国产一区| 日韩亚洲欧美成人一区| 久久久噜噜噜久噜久久综合| 国产蜜臀97一区二区三区| 婷婷久久综合九色综合伊人色| 成人午夜av在线| 免费成人小视频| 国产成人综合精品三级| 91麻豆免费在线观看| 9191国产精品| 欧美韩国一区二区| 亚洲一区二区免费视频| 美国一区二区三区在线播放| 99久久综合国产精品| 欧美酷刑日本凌虐凌虐| 国产欧美一区二区精品忘忧草 | 91啪亚洲精品| 欧美性猛交xxxxxxxx| 日韩欧美亚洲一区二区| 亚洲少妇中出一区| 毛片av一区二区| 色欧美日韩亚洲| 337p日本欧洲亚洲大胆精品| 一区二区三区四区高清精品免费观看 | 国产91在线看| 欧美精三区欧美精三区| 国产精品免费看片| 国产综合一区二区| 欧美日韩亚洲综合在线 | 精品久久久久久无| 亚洲国产精品久久一线不卡| 国产不卡视频在线观看| 日韩精品在线网站| 亚洲午夜免费电影| 99r国产精品| 久久毛片高清国产| 蜜臀精品久久久久久蜜臀| 欧美影院午夜播放| 麻豆91免费看| 日本免费在线视频不卡一不卡二| 综合激情成人伊人| 一区二区三区中文字幕电影| 韩国精品主播一区二区在线观看| 91视视频在线观看入口直接观看www | 成人免费视频视频在线观看免费| 在线成人免费视频| 一级精品视频在线观看宜春院| 国产精品18久久久久久久久久久久 | 亚洲美女一区二区三区| 波多野结衣91| 亚洲裸体xxx| 欧美亚洲高清一区| 久久精品99国产国产精|