It is currently Fri Apr 03, 2020 6:46 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: PanelGadget with STATIC controls
PostPosted: Wed Feb 26, 2020 5:06 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 705
Location: Linz, Austria
Already mentioned the bug here, but never created a report.

If you have static controls (button, checkbox, option, frame, ...) within a PanelGadget, a new control is created for each control and immediately destroyed if you:

  • Enter/Exit the control with the mouse
  • Switch from Panel2 to Panel1
  • On window resize (causes flickering!)
  • On restoring the minimized window
  • ...

Code:
EnableExplicit

Procedure WND_Hook(nCode, wParam, lParam)
  Protected classname${#MAX_PATH}
  If nCode < 0 : ProcedureReturn CallNextHookEx_(@WND_Hook(), nCode, wParam, lParam) : EndIf
  Select nCode
     
    Case #HCBT_CREATEWND
      GetClassName_(wParam, @classname$, #MAX_PATH)
      Debug "created: " + classname$ + " " + Hex(wParam)
     
    Case #HCBT_DESTROYWND
      GetClassName_(wParam, @classname$, #MAX_PATH)
      Debug "destroyed: " + classname$ + " " + Hex(wParam)

  EndSelect 
  ProcedureReturn CallNextHookEx_(@WND_Hook(), nCode, wParam, lParam) 
EndProcedure

Define hook = SetWindowsHookEx_(#WH_CBT, @WND_Hook(), 0, GetCurrentThreadId_())

If OpenWindow(0, 0, 0, 320, 220, "PanelGadget", #WS_OVERLAPPEDWINDOW|#PB_Window_ScreenCentered)
  PanelGadget(0, 8, 8, 2000, 2000)
  AddGadgetItem(0, -1, "Panel 1")
  ButtonGadget(1, 10, 15, 80, 24,"Button 1")
  ButtonGadget(2, 95, 15, 80, 24,"Button 2")
  AddGadgetItem(0, -1, "Panel 2")
  CloseGadgetList()
  While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
EndIf

If hook
  UnhookWindowsHookEx_(hook)
EndIf


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Thu Feb 27, 2020 6:35 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 705
Location: Linz, Austria
Some further investigations:

  • Changing the ButtonGadget to ButtonImageGadget makes it even worse, because if you enter/exit a button with the mouse you'll see the animation transition created/destroyed ("Animate controls and elements inside windows" under Performance Options must be checked)
  • If you remove AddGadgetItem() from the code, the buttons work as expected! No additional controls are created/destroyed

So maybe the bug is somewhere inside PB_AddGadgetItem?!


@Fred: Let me know if you need help narrowing the bug down... I could send you a log file from "API Monitor"


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Fri Feb 28, 2020 1:08 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 705
Location: Linz, Austria
I found the bug...

It's in the callback of the STATIC control for the panel. Every time the message is WM_CTLCOLORBTN or WM_CTLCOLORSTATIC you create/destroy a new window only to call DrawThemeParentBackground!? :shock:
Code:
LRESULT UndefinedFunction_00402df2(HWND param_1,UINT param_2,HDC param_3,HWND param_4)

{
  int iVar1;
  LRESULT LVar2;
  HWND hWndTo;
  HDC hdc;
  HBITMAP h;
  HBRUSH pHVar3;
  LRESULT LVar4;
  int *piVar5;
  tagRECT tStack124;
  int iStack108;
  int iStack104;
  undefined auStack100 [8];
  LOGBRUSH LStack92;
  RECT RStack80;
  wchar_t awStack64 [32];
 
  If (param_2 == 5) {
    piVar5 = (int *)0x6;
    hWndTo = GetParent(param_1);
    FUN_0040384e(hWndTo,piVar5);
  }
  Else {
    If (param_2 == 0xf) {
      hWndTo = GetParent(param_1);
      GetUpdateRect(param_1,(LPRECT)&RStack80,0);
      MapWindowPoints(param_1,hWndTo,(LPPOINT)&RStack80,2);
      InvalidateRect(hWndTo,&RStack80,1);
    }
    Else {
      If (param_2 == 0x14) {
        If (_DAT_0040cf78 != 0) {
          Return 1;
        }
      }
      Else {
        If ((param_2 == WM_CTLCOLORBTN) || (param_2 == WM_CTLCOLORSTATIC)) {
          If (_DAT_0040cf78 != 0) {
            GetClassNameW(param_4,awStack64,0x40);
            iVar1 = _wcsicmp(awStack64,L"msctls_trackbar32");
            If (((iVar1 == 0) || (iVar1 = _wcsicmp(awStack64,L"static"), iVar1 == 0)) ||
               (iVar1 = _wcsicmp(awStack64,L"button"), iVar1 == 0)) {
              LVar4 = DefWindowProcW(param_4,param_2,(WPARAM)param_3,(LPARAM)param_4);
              LVar2 = CallWindowProcW(FUN_004041b7,param_1,param_2,(WPARAM)param_3,(LPARAM)param_4);
              If (LVar4 == LVar2) {
                SetBkMode(param_3,1);
                iVar1 = FUN_00409b30(DAT_0040d220);
                If (*(int *)(iVar1 + 0x4c) != 0) {
                  DeleteObject(*(HGDIOBJ *)(iVar1 + 0x4c));
                }
                hWndTo = GetParent(param_1);
                GetClientRect(param_4,(LPRECT)&tStack124);
                GetWindowRect(param_4,(LPRECT)&iStack108);
                ScreenToClient(hWndTo,(LPPOINT)&iStack108);
                ScreenToClient(hWndTo,(LPPOINT)(&iStack108 + 8));
                hdc = CreateCompatibleDC(param_3);
                If (hdc != NULL) {
                  h = CreateCompatibleBitmap(param_3,tStack124.right,tStack124.bottom);
                  If (h != NULL) {
                    SelectObject(hdc,h);
                    hWndTo = CreateWindowExW(0,L"STATIC",NULL,0x40000000,iStack108,iStack104,
                                             tStack124.right,tStack124.bottom,hWndTo,NULL,
                                             hInstance_0040cf64,NULL);
                    (*_pDrawThemeParentBackground)(hWndTo,hdc,0);
                    DestroyWindow(hWndTo);
                    LStack92.lbStyle = 3;
                    LStack92.lbHatch = h;
                    pHVar3 = CreateBrushIndirect(&LStack92);
                    *(HBRUSH *)(iVar1 + 0x4c) = pHVar3;
                    DeleteObject(h);
                  }
                  DeleteDC(hdc);
                }
                Return *(undefined4 *)(iVar1 + 0x4c);
              }
            }
          }
        }
        Else {
          If (((param_2 == 0x318) && (_DAT_0040cf78 != 0)) && (_DAT_0040cf84 != 0)) {
            (*_pDrawThemeParentBackground)(param_1,param_3,0);
            Return 0;
          }
        }
      }
    }
  }
  LVar4 = CallWindowProcW(FUN_004041b7,param_1,param_2,(WPARAM)param_3,(LPARAM)param_4);
  Return LVar4;
}


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Sat Feb 29, 2020 2:45 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14014
Location: France
Yes, why is it a problem ? Static/trackbar are not transparent, so we need to draw a correct background behind it. BTW, which tool did you use to disassemble the code ? It looks very close than my code !


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Sat Feb 29, 2020 6:33 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 705
Location: Linz, Austria
Fred wrote:
Yes, why is it a problem ? Static/trackbar are not transparent, so we need to draw a correct background behind it.
The problem is that DrawThemeParentBackground wants a child hWnd and hdc, not from the parent, hence the whole CreateWindowEx/DestroyWindow is redundant.

The fastest way would be to just return the SysColorBrush of the window (#ID=1) or use DrawThemeParentBackground with the childs hWnd/hdc (#ID=0). But since we can't change the background color of the panel with SetGadgetColor, we might as well use the SysColorBrush.
Code:
Global oldProc, brush

Procedure WND_Hook(nCode, wParam, lParam)
  Protected classname${#MAX_PATH}
  If nCode < 0 : ProcedureReturn CallNextHookEx_(@WND_Hook(), nCode, wParam, lParam) : EndIf
  Select nCode
     
    Case #HCBT_CREATEWND
      GetClassName_(wParam, @classname$, #MAX_PATH)
      Debug "created: " + classname$ + " " + Hex(wParam)
     
    Case #HCBT_DESTROYWND
      GetClassName_(wParam, @classname$, #MAX_PATH)
      Debug "destroyed: " + classname$ + " " + Hex(wParam)
     
  EndSelect
  ProcedureReturn CallNextHookEx_(@WND_Hook(), nCode, wParam, lParam)
EndProcedure

#ID = 1

Procedure WndCallback(hWnd, Msg, wParam, lParam)
  Select Msg
     
      CompilerIf #ID = 1
       
      Case #WM_CTLCOLORSTATIC, #WM_CTLCOLORBTN
        SetBkMode_(wParam, #TRANSPARENT)
        ProcedureReturn GetSysColorBrush_(#COLOR_WINDOW)
       
      CompilerElse
       
      Case #WM_CTLCOLORSTATIC, #WM_CTLCOLORBTN
        SetBkMode_(wParam, #TRANSPARENT)
        If brush
          DeleteObject_(brush)
        EndIf
        GetClientRect_(lParam, cRect.RECT)
        hdc = CreateCompatibleDC_(wParam)
        bmp = CreateCompatibleBitmap_(wParam, cRect\right, cRect\bottom)
        obj = SelectObject_(hdc, bmp)
        DrawThemeParentBackground_(hWnd, hdc, cRect)
        brush = CreatePatternBrush_(bmp)
        DeleteObject_(SelectObject_(hdc, obj))
        DeleteDC_(hdc)
        ProcedureReturn brush
       
      CompilerEndIf
     
    Case #WM_NCDESTROY
      SetWindowLongPtr_(hWnd, #GWL_WNDPROC, @oldProc)
      ProcedureReturn DefWindowProc_(hWnd, Msg, wParam, lParam)
     
  EndSelect
  ProcedureReturn CallWindowProc_(oldProc, hWnd, Msg, wParam, lParam)
EndProcedure

hook = SetWindowsHookEx_(#WH_CBT, @WND_Hook(), 0, GetCurrentThreadId_())

If OpenWindow(0, 0, 0, 320, 220, "PanelGadget", #WS_OVERLAPPEDWINDOW|#PB_Window_ScreenCentered)
 
  PanelGadget(0, 8, 8, 2000, 2000)
    AddGadgetItem(0, -1, "Panel 1")
    ButtonGadget(1, 10, 15, 80, 24,"Button 1")
    oldProc = SetWindowLongPtr_(GetParent_(GadgetID(1)), #GWL_WNDPROC, @WndCallback())
    TextGadget(2, 95, 15, 80, 24,"Text 2", #SS_CENTER|#SS_CENTERIMAGE)
    CheckBoxGadget(3, 180, 15, 80, 24, "Checkbox 3")
    TrackBarGadget(4, 10, 60, 200, 30, 0, 100)
    AddGadgetItem(0, -1, "Panel 2")
  CloseGadgetList()
 
  While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
EndIf

If hook
  UnhookWindowsHookEx_(hook)
EndIf

Fred wrote:
BTW, which tool did you use to disassemble the code ? It looks very close than my code !
Ghidra


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Sat Feb 29, 2020 8:34 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14014
Location: France
Windows XP used some kind gradient in the Tab panel, is it completely removed now ? (I booted an XP VM but couldn't see it anymore here). If yes just returning the syscolor could work, but may be it will break some skining tools. So DrawThemeParentBackground() may be more appropriate here.


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Sat Feb 29, 2020 8:36 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Mar 09, 2006 9:24 am
Posts: 275
Location: S. Kor
chi wrote:
Code:
......
#ID = 1

Procedure WndCallback(hWnd, Msg, wParam, lParam)
  Select Msg
     
      CompilerIf #ID = 1
       
      Case #WM_CTLCOLORSTATIC, #WM_CTLCOLORBTN
        SetBkMode_(wParam, #TRANSPARENT)
        ProcedureReturn GetSysColorBrush_(#COLOR_WINDOW)
       
      CompilerElse
       
      Case #WM_CTLCOLORSTATIC, #WM_CTLCOLORBTN
        SetBkMode_(wParam, #TRANSPARENT)
        If brush
          DeleteObject_(brush)
        EndIf
        GetClientRect_(lParam, cRect.RECT)
        hdc = CreateCompatibleDC_(wParam)
        bmp = CreateCompatibleBitmap_(wParam, cRect\right, cRect\bottom)
        obj = SelectObject_(hdc, bmp)
        DrawThemeParentBackground_(hWnd, hdc, cRect)
        brush = CreatePatternBrush_(bmp)
        DeleteObject_(SelectObject_(hdc, obj))
        DeleteDC_(hdc)
        ProcedureReturn brush
       
      CompilerEndIf
     
    Case #WM_NCDESTROY
      SetWindowLongPtr_(hWnd, #GWL_WNDPROC, @oldProc)
      ProcedureReturn DefWindowProc_(hWnd, Msg, wParam, lParam)
     
  EndSelect
  ProcedureReturn CallWindowProc_(oldProc, hWnd, Msg, wParam, lParam)
EndProcedure
......



The way has a problem on Windows XP, because of the gradation backcolor of the panel.
Run the following code and see the image.

Code:
;
;  *****   Result Comparision
;

UsePNGImageDecoder()

CatchImage(0, ? pic)

OpenWindow(0, 0, 0, 1000, 300, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
CanvasGadget(0, 0, 0, 1000, 300)

If StartDrawing(CanvasOutput(0))
  DrawImage(ImageID(0), 10, 20)
  StopDrawing()
EndIf

Repeat
  event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow

DataSection
  pic:
  Data.q $0A1A0A0D474E5089, $524448490D000000, $FE000000D8030000, $3A554E0000000208, $414449B034000090, $1D8AC1D8EC5E7854, $DF5554FFE1801445, $CC45D198E26677BE
  Data.q $8822970B3AC842E0, $18F959570B8ADD6B, $17C25E72E202FAD9, $91205F14411BA248, $B9DCCC9C62211810, $937345308E7555DD, $45BE717737048186, $69BFF451451675D3
  Data.q $B96022455F8BE661, $3E851258B3428807, $D568C4A292A52292, $A04A1A5004084A28, $C8B00E23271A4471, $B08CAE06ABCA8456, $122C0C60142C2C60, $4833A00590A05023
  Data.q $2EE0F29C31B22400, $7B5DED77B5DDBB33, $D77B5DED77B5DED7, $DF1DD03BF97C8989, $804BF432C1D5FD91, $AAB25833D92D2455, $695475C084013100, $9842E157D9B8085C
  Data.q $E75E7DB4C42D4CDF, $E0B8BC0036733332, $F39D9C1FC8D1D9E5, $ED77B5DF3B3427DB, $5DED77B5DED77B5D, $20FCDCB554C2D77B, $071BCB76AE97EDED, $48B00F7DDB5A010B
  Data.q $437858CD96D348A4, $CB2EDC526952B9CE, $26828541E72D2686, $E734361AAF030C26, $98FA79AD7F0C0A17, $DE73B5DFBB02EF9F, $9F002D779CED77B5, $6E8E46E22DE1C2FF
  Data.q $2424974257021602, $2005A2CC1A5D4BA4, $DB0DA0117ACC1B05, $C0856222AC45E804, $D10B083868E87396, $91328AA168B7ACD1, $9CD56A6624D92ACB, $45D20A55D2392ACC
  Data.q $602928A68522ACC0, $360049002886F589, $3BA3C57182F3FC97, $EF6BBDAEF3B5DFBB, $D9B0B4B5DED779DA, $41492D21311E1C8B, $2122B8974210B062, $56A1322522D30D71
  Data.q $629A80334E7384DE, $A35401A8AAD00C52, $2AC5A9734CBEDD31, $0DF3990C2892DA50, $DAEFDDABF4E13E7F, $16BBCE76BBDAEF39, $965FE463ADC07E3E, $E5A06DA98EFA6837
  Data.q $B5511A81D9BA134D, $CE332A38D28A691C, $DD674C3546A332A9, $4BE0A61A14995602, $D791A3348E862801, $DE3B47E1F31F4F00, $BBDAEF6BBCED77B5, $E1C67D380275DE76
  Data.q $B753331EFD6D644A, $C4C555686CF2315C, $79D8D5A1D3A281AA, $FFB8BA7DEEC175CE, $DBE36F128FB7BBF5, $FF956634FC9F9E1F, $B26E1E4FCFF7C9B5, $FBFACFBDE82EB142
  Data.q $E4DCB7BDFB7FBCDF, $318B9DFE3F2727BB, $DD802E5359B32466, $CE76BBDAEF39DAEF, $E6639DE33D9C4EBB, $D9EA60198F335E3A, $CA677A2FDAF34280, $0DBB5D8FF8ABF30E
  Data.q $B5ACFC30C33AEAB1, $31D689C51C673EF6, $6094944C52A4C746, $7F8288C48A4C6D0C, $44135018FF0124EA, $24A429A344B1314C, $0E22452224221625, $9B60960A960212A9
  Data.q $424B6B50A5895110, $1D190F9084850842, $7B3ECE7399CCE335, $539419ED7BB7AFAF, $CFBDE18E10C9A8C7, $D70303BC3362CD62, $D2DB6A2D8FDEC386, $EB643FD341C7793D
  Data.q $3290B692C61AA529, $E1A1A9EC3E73C930, $657B674CC8D1AA73, $FA78E7BE70C9E6EF, $41019639EF90875D, $9F2F7D95EA87AEF5, $AC94B29D49F7EC1B, $2E740BAB14C3A321
  Data.q $9B53AF3A262D3AEC, $2F7EFFB73B136A36, $2A5C3067039EA3F0, $D7625430CFB23521, $AECD766BB35D9AEC, $318B508EBB8B75D9, $633372A06452B011, $9E44953F0A581F0A
  Data.q $F01ED561880AC42D, $E38846E1D643A44D, $CCD98FF5BA986CF6, $B069D4A89A6B314E, $07D61EF21B40CC8E, $21DA139C8E304484, $A2A06A26A86494D3, $BCFE76B7A3EEFD56
  Data.q $37AC721831E9F8E7, $D1AD8EFF5A6A790C, $B8AB5F2CC66299B4, $CE29875A0CE920EA, $9AB207E4D609AA16, $032A2AF504D32674, $7BBFDF7E7AAD3627, $14819740DA1AFCDE
  Data.q $BB35D8E39AEFAD45, $597824611D7638E6, $CBE326B7EDC72EB0, $10A58809720986E5, $DAA42792D4A09102, $CE075B47ADA96297, $846877FFFA4C9057, $6A06E6C37F120DC4
  Data.q $44710A444A548394, $209044500617A1C1, $445250F491009102, $85A99EF57C856292, $0DCD84C435635267, $91505284B35D440D, $4A4CC0BE47786288, $4242408249222000
  Data.q $EF5F5AE28C8EFC8E, $C1C618A57918CEF4, $ECD77D6803F64077, $EC735D9AECD7639A, $C04A0964314B98BA, $85AA924D5255A095, $0071911C2C54330A, $1EA67345F85620F9
  Data.q $FE1C770592DCE8FF, $62AD9C75EE3502D7, $738DDC08E62E177C, $04A1A135457FE38F, $434C8646A324A291, $5B5440AC2616D21B, $A4570AF9715C2022, $21831A3279129284
  Data.q $36BEABD5000E014E, $6506B284D288A224, $21AC865F264D6919, $15C577614033F2EF, $4654790A54A520E7, $5D9AEC032C100128, $BB35D9AECD766BB3, $CDFDEB2E11D77D6E
  Data.q $020100841D57CE93, $DD57390010CE1445, $F79C1D5FF3BB7F7A, $70CF3F272A47BDD6, $4A4EB062DA71C6C3, $2C0A699149229EA2, $F761B192CC8D692D, $2927902201E1EB04
  Data.q $AEB1D90D2B891C44, $43A8FA86FE6C6F8C, $A8D454841B5F68C8, $FB0B3DDB70FC584F, $19B268DED184AD36, $D44FFB5DF7BB098C, $12791B67A065FE8E, $6BBEB568C6288A52
  Data.q $75D8E39AECD7638E, $2B38B618A5093904, $83004FF1FEEF2101, $0D449D21F3BF17AB, $D0CCA28E981D0297, $BF374BDF5FDDE797, $DEA757CBEA318431, $FD60033D1EDAA1DC
  Data.q $1199CFC74BF5F6D2, $EFF6D393E0016395, $9CDF5CA9EDD6CDFF, $68363335A2CE2DEF, $F3A59198C35A1294, $0C757C5F41DD8B65, $A3B386047C220042, $9A438B8BD66AB90C
  Data.q $9D329250EA4A1B61, $9FA7FD95ED3006AB, $F464D6D823564E58, $8F2584C007FF3FCC, $928C2010017EEC0C, $35D9AEC735D800D7, $908EBB35D8FD6EBB, $0823CFCDEDC46547
  Data.q $F0D40AE468A68121, $08670A7A4A939141, $B5B6CB7F1A28F201, $BF4DC1E5B73FE6AB, $8EAD7DADD953709C, $1F71801129D6E8B1, $3A6B9DEEEBFD591F, $7C9FABD7C7FA1C00
  Data.q $2CD6DFEEF5385C5B, $1DEDD1525294E9FB, $735C52E771A73ED7, $B4DD15DB994DB627, $966B422E22DF0FA6, $91D69C045206D219, $2582762F9C9EB075, $29092826C08C5E32
  Data.q $90CA3442186889E0, $99D86690D2E8E6AB, $767D9CC649485AD7, $EEFA600EBD2FCDF5, $367077812F8FBD43, $8952073DD53A2EA8, $3C14B2AA0A83D5A0, $66BB10E70D2036BB
  Data.q $8F56EBB35D9AECD7, $2E2537FCD96BB35D, $0580773937609AA5, $44A08A2A5015ACA0, $AEDE7CF87F017DF3, $DEE5B5F7158029C3, $5ED03F578CE57630, $DDAAE45F23A1C58E
  Data.q $BB77BF1F0B24F76D, $75D4E17903F2BD9C, $4752F6E0B4F5C1CD, $8AC3F13FE9F71CBB, $4730E5E47AA5354B, $0E58BE01C13BC3F0, $804811C10C0180B0, $ED3178AC00438AE8
  Data.q $9F8B1A6FD9636DFE, $F58DB3F274F17E49, $5ECC957F732436BB, $2CA3171E21F2E09F, $8DBEB9C0D64A59F5, $D72251EF6334502B, $86CF97AA2393A7F5, $3860C61413916133
  Data.q $9AEC597D7629A12A, $FFEBB1CD766BB35D, $0067545631B76FB1, $977773339CCFFFC7, $451AAC2D85851517, $A2256F8A9348A250, $1682A2AD1ADB4628, $6A936DAADB592D8D
  Data.q $53631891B506B635, $495AAD16B6AB162C, $4A6B6C6262226D6A, $80D483469BCB51AA, $EF7B2E5A22A0200D, $EF59BDEE4E9E739C, $5F9CD376FD759766, $E5FB3CF37264C3E6
  Data.q $4B6BAC5A767261FF, $5006714D24A32C9F, $A0C1A3824F280E10, $B767FEDE90FA788A, $316F6D98CCA53E78, $061168723F1FABF9, $EF7A17C1FE07DEF0, $A716C6A7D01953FC
  Data.q $CFCDA845358F8754, $B02C23F4C87DDDD7, $57F43DC6F13B8B7E, $FE5BFBF8FF02E9BC, $3953528791D599F0, $E138D459066A28F4, $F40E5BD9987DD31A, $ACB7BAE4AC3FAD21
  Data.q $81DEFB759DC7FC6F, $17B5E535277FEBDB, $15CA88BFFCDDBCCB, $555141280D6AE4AD, $EA0A88800B144812, $0126808AA0A09151, $021A8604381D2001, $E840300490DFA178
  Data.q $04345163056A9B2D, $F57EBA0BFDFEDD15, $BB6CD435D1F1300C, $9144006AA8926A68, $21B409519F408480, $C51D763AEFD68023, $6D7628EBB1D763AE, $E0886D64649246C9
  Data.q $0D11143083E8462D, $3E867056F04602A8, $7F369B01B4E67A46, $51F35F07230FBE48, $CFCC6F327E97A6FB, $9592E9B9BAE33A6E, $8BB2E98E076B2EBD, $D570DF29B072DE1F
  Data.q $F76BF9E29B668B71, $3DCFF55DB87E984E, $EB1982F572DDDF3B, $D49A7EEB7E98EAEF, $27E9C2BFC5687DBB, $C96EB45D06FE8462, $E4BEECD6ABC045C1, $F539B5B8EDF607E2
  Data.q $7D71DE3E55B93E5F, $DB27D2FBF793C9CF, $F972EDC0DA60795F, $0EBC53F561C4FA07, $B5A57870C3D19F28, $8449664AB7A3B945, $01462082202828A0, $0114554042150510
  Data.q $E0086A1810E0387C, $5C01541B6C43FE93, $EB412433495E95AE, $57CB5DB9CF7B74CB, $545125E3B2FDB353, $4807821441680245, $8FB717A0CF27892D, $628EBB1D77EB7474
  Data.q $B6BB1475D8EBB1D7, $B9092D8615823334, $0D1C00173EA4C4E2, $257B717C5F69CCF4, $C0539DAEBC5687D7, $A585D76A6A325BAC, $37B6E96487718054, $C7D6FBB9A93391DD
  Data.q $EA4C55C37D5EA7AA, $089AED4F373BB36C, $579BE33F32D1725C, $37AEDB52C4CA602F, $01DB6700664DC77B, $C03DF2E46A10E27D, $BAA8A01976A68BA0, $3F2DC0D545034998
  Data.q $30F7D75BF93F347C, $97E2A3F7FCBB7C69, $64C31EFEAA2F6E43, $09353AA9EE517168, $2088A209020AA22A, $25042068880332F5, $0763001538A0BDE0, $0D34DE0086A1810E
  Data.q $89AAE0F3CD00C869, $2D7426822A8A8831, $7F7C6E4F5D034D5B, $1E091404355414DE, $2F4024321007048F, $8EBBF5A008D28CD5, $3AEC75D8EBB1475D, $5802D483B45B5D8A
  Data.q $0EF592181020249A, $86242AD552549149, $D7FE1DA6EC2BFA9A, $B4DC7B55C1F77C7F, $C961F75077DEB693, $CAE7FAF0B47EBFCA, $3E8E35F5B200171B, $7F926A68FB5C068D
  Data.q $A50086FBB3A529AF, $1A58E130EF5D9592, $BEF8A43A83D65BD8, $EA9F15C80B36E964, $6B7B2DBF8E80A363, $540E77AA2E832DE3, $9B6EBB9CFFA44CC6, $6FB07F76078F7793
  Data.q $42F22A2F9631DB38, $46B04985C5E4AA4B, $4124054484405045, $805788A3C0410402, $810E074C9A37C410, $9B10DFA44E0086A1, $268AD5A2BCD014E1, $F7DC27554455AC46
  Data.q $6FFC6B345FDE6A17, $C2D775791F3A025E, $42E2025EF5512513, $636815A196403C12, $AEC75D8A5241C384, $6B4D76206BB1D763, $00B0402DAEC75D8B, $06AA70C064C158A4
  Data.q $1284448094C38249, $B4C26A6C2BEFB541, $88A3A97D73F1FDB3, $2BD4FEFDFE6AB80D, $D7257DE833524069, $C1FFF48021BEC3A2, $BF0B9AC799C35BEB, $344B4F9DCBFDDC7E
  Data.q $B88BFECCFAA2D039, $C8715945C77E7567, $557E1E47B507FF55, $E184C6F6F4399A8F, $3AAA6B42510D2AD1, $D6DCCF220358E4AD, $451517B4FC2700CE, $2BDC907C10BBE343
  Data.q $A82578021C0C9240, $10FA804620A8282A, $5D40158021FF4820, $09924045AD5B68B5, $A059ED7D546E9F4B, $D22BF0F9D999AF3B, $EC2EBBBBE573BA31, $EA72EAF78BDE0342
  Data.q $B1D77CB4FA5504A4, $BB1D763AEC75D8EB, $9002D62DAEC75D8E, $720603068C8E84E1, $D54484602E0CB010, $A46F73E56695401A, $A6E4EEF4C2F7FAC9, $8A6A24EE633E9C1F
  Data.q $5B4DA034B6DEDBFB, $5767958F33D66CD6, $C9A673EEC8E9F15E, $F05F5D3B94F4F7DA, $53D0BF9DFB7759C0, $BFA5FF610FF132BE, $DBD1773E6A5CF7B3, $EF315CACB77A743B
  Data.q $0527375C0D2DC7FC, $002FC5E6F97F2E96, $B773FD3DD76CCA61, $E3516D68CA61962B, $1504A0CA083538E5, $A9C13CEA0F201202, $2F388741D99002F3, $10D368AA0A820D01
  Data.q $00BC12621BF40F20, $6BA414DA9714AD5A, $A88E7B5C766A2AF9, $7F6309E17BBA0AA2, $E75DF6F4F71801BF, $200E081753BC498F, $1DFD828C6439A12B, $D7628EBB1D77EB40
  Data.q $D4B6BB1475D8EBB1, $ECE74C4405929EA5, $51342020A0AF2EA5, $4D27CE470F7C93FA, $CD2C40686E680715, $AF8BECDDD6E1DC66, $27716C36ECD95E31, $E6FA50789A4D911C
  Data.q $EEBDCE7EFE06C83E, $7C94A96DD15CEBC5, $43EDA37EAFCF0E52, $95C397D1FA3CE95B, $FF8C53DAFCE22933, $3B9382E5537F5871, $D6D58E2B92299674, $18EE33458861B8BC
  Data.q $7B31F6779CE7F5B1, $A3719971F0340B4F, $5FBBD80B8BB0DE29, $B5E9FDB40E18DB9F, $7C9604714C93B2E1, $A4B433A91417CAA7, $83088A358AB7A3AA, $3CEF76A10A0A2AF1
  Data.q $F21D06600283E3CE, $9B10E0640E36E2EC, $5AAF4AD55E680A21, $BCEB31D55A5F940B, $3C12755040E68B1D, $FB1E4FE7BBF06BC1, $757820AFCFBD3BF8, $150A49D4F3A9DC8E
  Data.q $D8EBB17512D51B7C, $696EBB1D763AEC75, $BB3BD8FFF5D8EBB1, $5ED7FF8E28AAAB10, $7034D1C7477BDCE7, $24C10BE90871891C, $0C82887B302CC329, $22062669EC5F0192
  Data.q $440B022C0921E888, $409A0821CD143E88, $9441E87C727C8264, $3448C14418B49206, $B3DEF731FAE19CCB, $23338CEE7DABDAF7, $C7FB83B87C6487B7, $9C3F67FE6C38B362
  Data.q $70245EE739CD81DF, $2B3FE55A99A1300E, $DE513000982C12B6, $25551AB767C04218, $0013EA403B52A1D4, $0047D0E969F70526, $1695DF1E76E290A8, $2DBAFD07866AFC2E
  Data.q $677A9B4C3E199970, $7FA69BDC6FD99FCE, $6ACF9744FDCE6EFF, $33D8384374791AD7, $C2C9F4F9577DBE80, $8777ABE5E2ECF3C3, $52BED3985428DFC0, $FFB4C37A9BF4AD97
  Data.q $678A0762BE38513C, $FFCE9021A3E9D38F, $DD1B6AAC619BE00C, $0EDC3C46C4C5FDD6, $EF71BA32A146AF36, $3EDB1AFD6FB3C6D2, $57D500B7F747CCBD, $25345251109DC3DF
  Data.q $786E850CC0C9504E, $2CA109EA4F201C67, $2285CE508AB20651, $4A64E13AA2247BA9, $7FEEB4C8A6A433FF, $34E7500080C24863, $CED5F63AA36678AB, $B52840CF513B03B1
  Data.q $2B9CFE6C42CE7DB9, $C4CA79A71513AAAB, $7A12A0D48758124A, $AF475E8EBDF9A00F, $3AF475E8EBD1D7A3, $5825AE8938E84D7A, $D221A2A54C0582D4, $5AC0944861098984
  Data.q $20A8199A11489997, $98A7501A1F7F0D20, $CBE0174B10FF9C0B, $2F7DF79E1F6FE323, $4DCE8FFBE1455A5E, $88807B82DE9ED43F, $37CDB68F370B4E7C, $20889848A62A25AD
  Data.q $17282C11C0C41020, $36A65996B92653D2, $B1E88EAE1AFD7F13, $0BAF421F674FB817, $D6E42D4F33E7ED00, $427122854AD2D336, $16F19D486327E086, $2E11E6CA10CB9192
  Data.q $9DAF03733F8AE5B3, $6CA1D60206F97A53, $699F482FC2E08D91, $F475E891D7A3AF72, $1DB8275E891D7A3A, $0C828813809C6AAF, $02A188468C15E418, $129B76993B749D56
  Data.q $713EF421E3E05CC2, $E548BD6F4BE78DF3, $37727BAD91FD4E0A, $1B99CFF5BB3F591E, $76BB68EF98D2E45C, $4A31394B50CD0CA5, $114240790D495EA4, $1C484EAF5928855B
  Data.q $BBD7EF3B96A87334, $37F51A5EAC129216, $A173D095D8E87717, $30A5227A82004E06, $D1868BC9620430AA, $59682D96ACE27539, $F7E6B5F0A60854E7, $A3AF475E891D7A3A
  Data.q $15A8198275E891D7, $7B3C0801446F394A, $954CE77CCD026185, $F3576B9EC3B0D390, $C8F2F9886FB11F9E, $95F6BA35AEB2F3E4, $F919086F70C781EC, $F6F7717DB036B060
  Data.q $2245A49EBAFF1753, $4A24418882BDE06F, $87888BC6AF202302, $27E0EC4B9DB3AB07, $219669402BFB7B6B, $AC1C764227C7FB3D, $F2EECDFC7035DCEE, $F29E44A2690B179F
  Data.q $790AB0A900443618, $5133EAC211EBEA31, $CF9EC19EECF9DEDF, $E8EBDC9A068C01AE, $475E8EBD1D7A2475, $D5A16E3C7209D7A2, $14A970116AC2709A, $18602C0457B13C3D
  Data.q $9001954068AA2A39, $21FCBF66783B9877, $68C22FD77773AA84, $F23A2AA44E072262, $E3BC376109DC7ADD, $0AB3AAF5387FB550, $1C1D40C27FDE3839, $8C8F7B83C8198FFA
  Data.q $CDEDFED955C859DC, $4C5A83AC288221FE, $EBD123AF475EDCD1, $7A9EBD123AF475E8, $45530F9A2C3EFC47, $03134A37FA784811, $14D3198098A0B84D, $1BCBA932DB1069BC
  Data.q $1956DA17773B2FF7, $7E9A491F39FC0187, $7621CE294ED3A9B7, $996B8A822064E294, $51C2EE21CD9454DD, $A17A818C85EACAF1, $3AABBA8C298BD050, $744C640C5EB1D990
  Data.q $2A2DFAC2F3B036CA, $BB557DAFC39D5653, $D79CE724BB5DB6B5, $34C4D8B2C259FCD7, $73FC3DA3F3E2C9C9, $FDE73DE4F281A438, $391A170410590242, $85C3055C2E398889
  Data.q $F4A52A6E905941E7, $38A45D6351A9384B, $070DB603010AE20E, $CE732348664996BA, $CE75CC35A11CFD7E, $7E0B26B99AE66B98, $02EA621B6B99AE60, $1FE32D0409F1811A
  Data.q $4B0C43FC9540BCD0, $1052C16B85D2832E, $12B8188456D370BA, $E21600014685D451, $8080A5703AE4AE2E, $BC041602E134C1E1, $C14F58D1947D19C4, $2AC1DC9590571034
  Data.q $6B988ACEB9821AA0, $A9D7335CC45FDAE6, $389938B811AD711E, $5E5D4A6643C91805, $52529484B8AA4619, $4D8B9A2850410190, $9815DD929F607198, $F6B99AE66B982CEB
  Data.q $1436D7335CCD731B, $7FD32DEDC358D142, $8889D5C615DC9E4E, $0B3E9C71809B7A5A, $9AE62226B9FE562F, $444444725136B988, $888888E4A2644444, $AE45102146C88888
  Data.q $00592C7C6E70076D, $3F8BE96DE72FAF48, $9E108B1DA3B676B8, $117D6D62383A1738, $F9EEBAE8A5FDBB80, $D29E3311042A0896, $56FE447C38CFB9BC, $B9377B4E7328881E
  Data.q $17EC8EEBBE9BAD0F, $3C9F551388F62794, $0720592E7FEDC00D, $FEC37D7BA860C0E6, $5DC82F2DE108B0F7, $88841512FD0BA6B8, $70BBE96FC38D1719, $3606F7BB99111A14
  Data.q $E05DF9A7D1FF5E3E, $007FE3591388DE3F, $7A44C816492DD750, $B002F7F7B13F92CE, $F7F41E7B4D2ADC9F, $A1BCB847759B6E82, $6220B2F98ACBF42E, $790EDB69A019E5C6
  Data.q $7C69CF4A22345EDE, $8259839DEB0020CF, $10A6A716CA3773BC, $1E1B154DB9A4B9C7, $1BEFD656AB333640, $1EE7470FC1D9CFD2, $951B49333DFD247B, $277D5B10031E8F36
  Data.q $D04622B272C22900, $401BAABC2D719888, $23428EB9DD6DE474, $1BDBA248AE9EE9A2, $914023905BFFF6AF, $45105F5F94C8A486, $5E411A1E6000ED6F, $14B0DDCC0057FEAC
  Data.q $E134CB7FF272149A, $32E3311768CC57CC, $5E689911ABFE7CD1, $3223E1FD5135CC70, $8A224967C1817C11, $3430408391B6B980, $59F143B7F57F6C75, $6C768C6DABC0650F
  Data.q $0CA28B1E387CE968, $F4FECD51164B8470, $44DC814ACF53CD45, $722F673D336AEAEB, $9F1989AE4C55163D, $5C645D731019FE7C, $CE05F0B4DDEF19B2, $53A29A9C2FC0F7BD
  Data.q $83AA9B9A9EC3F75D, $9CCEE73380CA360D, $C3F7E59A8DB29E18, $0A97B8B4ACAD2477, $73102175B0FB2BE4, $AC935CCD7338CC4D, $197CB0BEACF78EBD, $65E078676D781416
  Data.q $7C73B88DE325F67F, $50A1B7AC1435A6B4, $F1E4CF3FA5B0EC0E, $02FE7B3B6E660FD1, $F35B4B7436B1AE4A, $3E5163C42466B68A, $99A1A6B63915A758, $CC42A50BA7AA0019
  Data.q $35CCD7338CCD7335, $FA1C5240BC72B987, $8637AABEE6C0CBE4, $81F88DE2A1197DE7, $8685C279AF4F7DD8, $1EFE633389F6D696, $5C6D773781C05801, $FCEE4A0892FD79D9
  Data.q $CCF9FC7F4767ECF4, $F81408B01B5ACB5F, $BD1E776D6F0014ED, $4DEB8467AF1CF262, $946AC6DA78766415, $678CCD7305CBAE5B, $11926B9E4BAF6C41, $BF84181CE82CA8B0
  Data.q $FF2B992535DCE237, $5669AF4B6B6CA98E, $6F3BAAEA9AE4A14A, $4D6C18EF9BF8FB6E, $86FBE3941FA47CEF, $D7FEDB8E452F3730, $3B7643B6DC163F7E, $DC901615CEBC5E41
  Data.q $6231571272174190, $3FB5ED88CCF199AE, $FD3A0B29AF5926B9, $B6D8115749711BC4, $2F29419F1E5E38E9, $6A454A52D2856B91, $005F89E646CA3242, $C5243DDF05B63738
  Data.q $FA5DBEBCEA189A7F, $BA7B9A06EFA0F3B3, $32C31EC491C306F4, $AE5FE40F224FAE02, $BDB10A178CCD7305, $7479C38AB18BAE66, $71FCEF66FE810A3D, $E08A04BC38A2089B
  Data.q $8344806E1AFF0EC4, $74943410909001C4, $D121D1535112805C, $E0A0271D013801C2, $B1DB04912100DC04, $FDE4F46C33BD78E5, $AD630DEB22303DAD, $93B7979BD5A34FBE
  Data.q $FFD7B63C664CBE6D, $425B0AE73F85F711, $33F8F6D56CCCB156, $79F3E7C025914514, $2D7CBE7607599F3E, $ADC5220ABF41C5AF, $9FABDBFDE4F5FD7F, $7A10F2DEE2BFD73E
  Data.q $3C71AF02D79D271D, $E5CC1AF1275F3002, $2DB2F7FBE307A3C5, $B45B0F2CF9711D82, $DEC5F6B9C19E5FFA, $DAF2F8D366CDEDDD, $7D1C2EB0B1628B15, $5031C105A9C160FC
  Data.q $52973CAD767417C5, $C6BC0B5ED4800DB6, $BD78D7CC0F8D10F1, $71E2338D105D47B1, $A23504CABABCE527, $55CE7067F135695E, $4E99A4DA7AF573AF, $591AA2F7F47359C7
  Data.q $6253AE70BED89AC3, $007375E05AF3A403, $AE1E23381AF1AF98, $67F34D57954CC3B9, $2D152A8F3E4D67F0, $F586083D59AF8A6E, $F02D7AD20011D6CB, $3B035E35F3000E3A
  Data.q $9A821132B4F591E2, $5AEEB304BDE0CFC6, $A864C9DD6077B7BC, $B6557BA35EB32D6E, $AF3A40043AC8AC3A, $AF1AF98000375E05, $EEB86A3632E23381, $9F6262D12F9574DA
  Data.q $B330E32DECAAFC9C, $56B4A3F9AC2D7FBF, $F02D7AD201AF49D9, $3B035E35F3000E3A, $97615C2CE03F09E2, $7CB63E3C60B3DDD4, $BB7E50F5557D7FBF, $6626354E3611AC2B
  Data.q $0008EBC0B5EAB403, $C2F8F81AF1AF9D1D, $96337D36DD5837CC, $F1F681F09BFE2C6A, $AB3432D1F3E66733, $62DEAA4B62C6586F, $C6ABC71A35044BBB, $AF023329700216DA
  Data.q $C01C75E05AF3A463, $DD780D78D7CDEEEB, $ABB0C952D43C477C, $E2B615834CA35E38, $1CDC18333C716320, $E8E99525A9950E8D, $A3AF02D79D201B0A, $3C467035E35F3000
  Data.q $B77AB59D7537E125, $D3FAB96A587870CE, $2C6A6ABD58D57AB5, $AF000045AD63540B, $19C0D78D7CC0001B, $72A5B65F7CAB84F1, $AA355E1494362D3F, $A35411C3EBAD4D57
  Data.q $60000DD7800026D6, $49E23B0035E34EBE, $017BFEB5DEF2725E, $C6BE6F7400E3AF00, $E3B76EAEF39D806B, $7BDE6EFFCBCAC72A, $BC000176B2E67CE7, $8EC0D78D7CC0038E
  Data.q $5DEDCF3C92EBFA78, $BBA8B7C208B976A7, $B59E79174FCF9162, $EBE6001C75E00007, $48EB1DDECDFEBC56, $7406B2AE0061044E, $02BCC46440F0110B, $90111110290F3CA4
  Data.q $1D00E888240442F1, $8D41D25D09090B92, $AD3A2FBEB5EB3D6A, $5C6B25FBEEDC7A7A, $E3F66BC5B8153EAA, $DFA7E1FA8BC4BFCF, $F56F9F17E5F048E2, $835C805C4DE9E9F6
  Data.q $F1078D7D7235CB5C, $FDBE0D2E3AFABE6F, $4FB3F5FF7E3FBBFE, $AE5AE46B91CB893F, $6000003878B7AE41, $00E20F0000012B8B, $20F0000071078000, $012E33C41E00000E
  Data.q $806A79FFFFCA88C8, $00006A716F5C835C, $CAE8AC858A9F40E0, $C66AD5BFAB95A4EE, $56AD7B7F68A8878C, $3B7DA396D191FD94, $692F8E6B356BDF60, $9A2A2332D1A1CCB6
  Data.q $AE5AE753FAB80F2A, $5AE5AE5AE5AE5AE5, $41E000000438B7AE, $000003883C00001C, $AA67EBB555DD69B7, $556D194925BB2356, $196E958CAAADAA93, $AAC92ACE5D6FB65C
  Data.q $7BA9E8F8B3DE673B, $C6A2D35CB566D10A, $DDD959968E605976, $2D73F9DCC1447AE2, $72D72D72D72D72D7, $50000008BC5BD72D, $0DEFBD400971529A, $6F5C835C806A7150
  Data.q $A3DC6DC0000070F1, $739FD536B586A571, $EDA17D739FD73056, $2E515F68C8EEB052, $D8CA70C51580E3B7, $BED1CABFDEE93BA3, $BDB3DAF6F7030BAF, $209C0C5B77BB311D
  Data.q $72D72D72D72D72D7, $00001C46AD72D72D, $88716E0000042FB4, $7D39358CFEAC8D1A, $68BAD06AA262A2B4, $AE63B78FCEE0E73C, $BFE8ED88F28AFF9E, $6B96B93D38C91DF3
  Data.q $BEB96B96B96B96B9, $2534A00000E22FC8, $6BF157AA8A801AE3, $1C3C5BD720D7201C, $BB6523D69B700000, $D271ACE647B54D5F, $82B59CDC74F7687A, $47BAD64378682F5A
  Data.q $EF6CDAD0E8C56710, $3EAFAD16FECE7746, $FB34B4FAEE39BBFB, $6B96B908781FDB4F, $B96B96B96B926EB9, $7DA00000F711FEBE, $00001C41E0000021, $8AD494E4D45788D4
  Data.q $332A3EC56856EAA5, $1AAF79CC6C8C8D5A, $F66595A4D545A755, $C7407556345FBDBF, $A2F08BF6615559CD, $939082CE566E3A79, $D73C9E95BA03CE1D, $2D72D72D72D72D72
  Data.q $901221AA5DBD72D7, $4F206B90044E3FA7, $66534A0000029A56, $8D65A9DEA3D7D1BF, $E0D5AE73BBDD92CE, $CF1F86A9DD41D605, $8EA92FCD1EE6A898, $6437DAA462B79A38
  Data.q $B5CB5CB5C803AD90, $F5F5CB5CB5C9B75C, $0029AE80000217DA, $2350000071078000, $9D0B51CABB2A351E, $DE647765524551CC, $64A5272AC2B0E731, $6566A76ADFB39ED9
  Data.q $7D85876C93ED9985, $4632BECA4C4515FD, $E7F3A1991072C1FF, $AE5AE5AE5AE5AE5A, $195EE446B7AE5AE5, $1AE406B9C4ECE4D0, $1C46A0000029A548, $3BBF65F788D40000
  Data.q $CBEE9D5B0C2C5566, $551958F6B6CACF8F, $DD8763D6EB71DDA7, $56D57EF7664D475B, $5C5B87E76CE761BF, $FC18A2FA3EC515ED, $5CB5CB5CB5C925F5, $BFA1F5CB5CB5C9AF
  Data.q $0000534A00000388, $3C341E6CBECA6940, $F1FBA2A866DDB414, $5299BB7B59F5F57D, $15547CEA3EE54F46, $5D68EEB82E39355D, $D8217ED93337A354, $D4EFFB49EB98C97E
  Data.q $54979AB2B682F272, $B9FCEE63A7ECDD8D, $6B96B96B96B96B96, $AE2AB2222DEB96B9, $C80D7389CFF8A800, $40000014D2CB5035, $BFEF11A80000388D, $E9E0376A898AAB11
  Data.q $FE8DDC4E8C55A217, $6A9E74632477FBC7, $159CCBED52BED7F5, $2BC0B3548C545578, $6DFA8BADA6A34D87, $AE5AE5AE434E32B0, $4FAE5AE5AE407AE5, $1C41E00000388BFC
  Data.q $1A800003883C0000, $68D0F17E868CCAF1, $2ECE63C5BCEC7F60, $9F2F835635526B34, $86F4D78FED5C371F, $B8DFDEDFA73AEC3C, $72D73F9DE38ACA89, $D72D72D72D72D72D
  Data.q $0534A0000005BD72, $3FC4FCEC2FB40000, $C74D0E8397D0BD7C, $AAF66B32F6AB92BC, $5805F0D66939B32A, $6D91B3997F55C6AE, $515C3A1EB58DEA35, $AE5AE7F3807ED60C
  Data.q $5AE5AE5AE5AE5AE5, $41E000000438B7AE, $000003883C00001C, $C3EA4D4556E57EB7, $8D68CFF56F0C7DAA, $F650A5ACE597D49C, $45FD67FED47299CB, $FB9153A35056C359
  Data.q $86891D86A9A32EB7, $CB87918345BFA437, $AE5AE5AE79392BF7, $7AE5AE5AE5AE5AE5, $00534A000006978B, $8FA00000E20F0000, $5245DB2B6CB2D578, $ED04576CAAA332DD
  Data.q $BDCCE7F57DA28293, $0B1595A6BEF34973, $CDEC476FEAC62DD9, $AF6ABCCA80FDA87A, $765BFED5C9B8EF3D, $39ED9A566B355457, $5AE5AE7F3B1CCB1B, $E5AE5AE5AE5AE5AE
  Data.q $F16E000003878B7A, $F06E78A3F0F83E7C, $E9E6F0E5E33FBBCF, $E36F5FF7F06E78E3, $AC42EEEF65FE001A, $E333A5AF8E38BF2A, $BD85D1745CBD1794, $4904151A29176378
  Data.q $393A8E82238A144A, $8A6882606306660D, $1606F490485D1124, $FF48DD618D225265, $9149145065445DFF, $D34DCE3945112050, $96D5ECE73DC71CBC, $399ACC5C67393141
  Data.q $67D92BC1FBE7BDC7, $759CFB3CE3F3CDBF, $C99C4CAB889E13D6, $E3DC922D5CCC0294, $8F89A9B4A0B5EAD3, $DAE4D720D72324CA, $02BA867D8F508D5F, $FB58162A40F7AA8A
  Data.q $CFC2D634CF3FE33D, $7BA97D6EB1611F5F, $C947524658B7A91C, $E2F8BA926976B907, $93DAE2B92491A9E4, $1FCBE3D2C1FED1D1, $D53F77D9F0021C92, $00439225B6C6F5CA
  Data.q $7BAF5CAD5BF53EBE, $33EA9A0054995EF8, $4F969BF5F96DEF0B, $AD96953D2EE72A47, $F7A7B9273EFD87F2, $006F25EB4DCEEF50, $DDDE9DFAE5E3E166, $C7C2CC00DE48754F
  Data.q $926D9D6DDE91F5CB, $52C92491F113002F, $F4CFE46BFA1E543D, $A743D3956A7653E2, $92B9A1D6E5F91E7F, $01AE4006B9E2002B, $9ECBAF7C6AAB4534, $595B2E496754B3AD
  Data.q $924A81D257F4AA2E, $0349B356BE20179C, $238DF69685395A39, $3DCAFAE4D72071D7, $3C282E069BE7AC6B, $49A89D0D03B82C64, $4D43C5A5BFC92EDD, $86BCD5B889FA1BAE
  Data.q $9722A0BD257AEF57, $9F3399CCEFB67B39, $A62B83F988A3F57C, $09477B75A2973EDE, $91A6E296FF54AA35, $DBF8AEC7F9B8A838, $AE4006B91C00E6CD, $600000001C47D001
  Data.q $5E29A00000000E22, $1C01AE7300C53083, $DD3D2F75041253A1, $45AB5C9AE41AE408, $72F63C165B166DF6, $C7FCDE8E5FEAB6FF, $310F5F57061B6AD1, $22738C9D70CB4893
  Data.q $0589B13711AC8DD7, $0D8634CA0EF7FDFC, $C6F5A5A4E52A1B9D, $736FBBD0E3895522, $02926FB3F5F5C813, $56B9026E51CF4F41, $F6B742FB4039299D, $734AD2C18D3255F6
  Data.q $D720D720075275CB, $489A3CBAE431D720, $230ADEAD30BED023, $ADCD0CE9939F2D2C, $804A9A8389999B52, $FA49E755C9BFB9A9, $D726B906B9023499, $E42F23B5C835C816
  Data.q $6DF370DF889F073A, $E4D1E1F9FCE18D32, $EB9010292CEB4B5C, $EB90156E6E6EB90C, $13B35CA694D72162, $AA9CB94373D89B71, $1574F02D5DF1F798, $B83BA855526E046D
  Data.q $DFF707BD54D89FFA, $6A6ACFE0D2F1314F, $2C4FF66B66733A6D, $D66B30027CD3B2AD, $81A54A0B15FEC96C, $C2BFDE0498D7BFAB, $B7B1269F7BA85BEB, $59437E05A25BFF7E
  Data.q $AFC7E471EEC726EB, $9A6985F6800A433A, $E78800DE4AAA999A, $527E14D006B9001A, $DF35D1D1926AE54A, $1EA9E5E8E0B87FB7, $727B581C1C1E1E1E, $CC56022991EE977D
  Data.q $6286E7532A777756, $40253D72511A8396, $8499B6F44DB5C9AE, $B00B90F0B4EBDEA4, $273F45A7D916A6E8, $11AA79D7225DFF37, $9F7745B1CD2C1FEF, $2C75552703C3FF98
  Data.q $B95CBE2B7D7D7DD5, $37EBED4962697068, $472CDEAE5FF9FFF7, $1F19F784E4816CD3, $C68612661F5B8167, $D2806B9000E1BAE7, $BFDF0DE78B65CE94, $ACCD0B1382DD6874
  Data.q $8AF9FE5EA9652A54, $D2FF9933B92CFF85, $2DB6360037926DEE, $792EDB9FFBD72719, $FAE4E385D2ED6003, $11F4011E4A4FEDC5, $C9926381F97DBA7F, $EA9637FE3BFFFDB2
  Data.q $7C90EEF7FB05E5B9, $553DEBDB474CF002, $009F24BB0BDAFD72, $7255E3C1E0F95E6C, $12C01234B7576FBD, $8FE2E67B17DF8EF7, $7C8A4470B328FB7C, $93CA849B1ACBDD4C
  Data.q $7F27A9A4378CFBDC, $98C5D72CF173FDAE, $172BCDEB935C8385, $B67BEF5C9FFE3C1F, $BFF207FC4D4EEABB, $240D090935F7FFDC, $8FB92EFF989BE9FF, $BC6A93899BBBFEE3
  Data.q $BB7113F4375C9650, $3CDECBED2DF5D34A, $BFB7CA5B81A5C326, $CA851DDA398777BC, $F7DD4CDB3722D5F9, $2CD1A6F15187BCDF, $57FCD41E6737F7F6, $9A2A3AC49AD8CEA4
  Data.q $073AE58F8B9F0EE4, $AE58F8B9EE0070B3, $617DA0018BC2CC2F, $C2CD97DC979F1736, $0BAE59E2E60040A5, $BEB9678B98070B36, $E92A29A500E16656, $25D2D9EDF81ADF38
  Data.q $F99B1AB55B316040, $402D7A95296BFB98, $B7E7EB9FEAB93261, $1DAE4D720039213E, $255A6E77D4F17897, $C2FF372BB1657697, $312D2B15B0EA1679, $79CD42E8B04BC9F7
  Data.q $7F66919D1C1AAAED, $0CC3B5C9FCEF81AA, $29AE8000000035C9, $D039E9E8EC79E626, $BEFFF60AABEDD1D1, $D78B9BFB79177521, $2CC52C9E858467D8, $6F22FEE8FFBD1AB4
  Data.q $AC7ADE7A0F909933, $1BF0F87020A55BA3, $C030C040A55B5D5D, $0A53BAB3591F1F47, $000007B896030C07, $A533AA583C44F800, $FB577522975F5300, $E3226A3884DF5B45
  Data.q $DD0EB935C80475C8, $A7BF0538AA1BEAF6, $D235127D626631AD, $5024C7C81D6ACDAE, $D47B9B6A4B493EA1, $2DEF342FB6C6EB91, $D7CE0F344C0150B0, $349C160B7D2AB1A7
  Data.q $3A3C2C44737A3574, $8000000E33F7DCCC, $602C52DDF58E94D2, $801860C19578A018, $F01865E7560CE0CA, $4876DC6864D1CD63, $6ABAAF812A32CEA1, $72F73519DD68549F
  Data.q $4254EF7124BFEA43, $A7A2224C91FFF53B, $D53DFD0D2850D2A9, $8898001AE4D726B9, $86F544BCDDDECBFF, $CFCE6673CFBE1C71, $5AC92B7E5E952D19, $DA36D0B455CCAD48
  Data.q $920440BD085445A6, $140D30C8AAD06044, $2A2A2E4556890C84, $2A062AB45C03FA4D, $5A837B082110B45A, $3CE7339D8E336988, $9338E062D125671D, $B8606186AD73E79E
  Data.q $A733733CBE1DF0CF, $6ABE8EB408909D84, $F4A8DFD2A7DD8651, $3FC94EEA34BDA2E7, $59DF451302A490FC, $E4615F0F22957E8A, $E4D726B915975C9A, $000535FE6B935C9A
  Data.q $0000001C47600000, $88A00000001C4500, $0000025000000003, $E69DE2200E228000, $4AD7201AE4000436, $0E2270000000004C, $E9276B2120000000, $B5A7BEF92FCAFCD4
  Data.q $D25994BCDCF20A96, $FF652942B5914949, $4AA956566E7B4A97, $DF183FF3964989D5, $F3CE7E73F5274904, $B2CF477B2BA041F2, $6529149D4D74E15F, $B7EA9B93B0912A59
  Data.q $262F535D527DF1FC, $BBAE04DF19E765C9, $52D6B5C958585B9C, $7AAA5994A2DCF941, $3B6C255AC4AD14B3, $7B125538EB5B5D59, $37F3F03C2D8788A0, $1AFFBF4F9E4F3327
  Data.q $B5AC7D3EBDB29ACF, $00623BE060FBB869, $28F034BF81E16C20, $128B6F87E3FAF533, $B70D2D1D52EB5B47, $080018B2EE0BDA7B, $4DDE2706176DB85B, $34B7B75CE314F9BD
  Data.q $5098AE0A0D6B9E8C, $32647F020F1141C4, $0389F2F77B25F333, $EF7ECF4D1C49777B, $CCF7B2FE31BA9B1F, $D7BE0A03D897DF21, $4F7AC6B5973330FF, $5E8C5EC757D73BC5
  Data.q $FBE01DC4BCDCF4EC, $7D8A9CB9DBC4E0DE, $21DB3A1ABC1FFBAE, $DF859E143C450026, $5AD6A779ADBC74B9, $EC8FE76D8ECF68E2, $89EC3AEBEF1E1EEF, $9395DEFC2CF08011
  Data.q $A9C763D0D775CFB1, $21B859E10388A432, $D89020EB49E91EB9, $6948DC20EB5C4503, $25AD73141F0C6E6B, $C70FFE9AFBD6B476, $92C5AD0077592CB4, $09B5CBF84283A5B5
  Data.q $075C803314C70EB9, $16BD617656DAE526, $52CB1DAC84EB9071, $D278968881FBE222, $634522DB7F7AEB9E, $D93ED3ECC12975E7, $C346B9B184A96050, $64D767E7C12901D1
  Data.q $C1564AD72B328143, $2FF73304A4B7D3EE, $6E4B6B9D9BF06948, $B9F8FE08818206DC, $93EF77E503918F89, $FAF137685ED1BDAF, $1022ADD0134A23F1, $D35A41828A2985B6
  Data.q $AA8D88E0460D45CB, $8A68E62F418F6AAE, $C88B61567F8A4E1C, $31FD18EEBAEDD77E, $DC40457A70694C5C, $F1A59AA3A4E1397B, $9A680E6C10BFEFFD, $9FE9863F7DFFF7C6
  Data.q $2E1BE8AAD481BF5F, $0C325EBAE986D74D, $1B5D34E7DCB76BA6, $B614E7C80761197C, $A72182530EFBF6EC, $75D37EF5EF5290EA, $DBB6CDDBE8817ED3, $A2161A9837D6D30D
  Data.q $399739DAE9B5D36B, $5D30FAD3C2DDAC85, $3C7FB737D74DAE9B, $CD4D0B7EB4A4FD3F, $5757D855321F9F88, $1AD8EBFAFAFC4377, $1CBB7D98E9E3147C, $629DA74D198062AE
  Data.q $57D9D4357280D92B, $F4921E3DEF923554, $CF5D30663BC0F584, $51F92612E46E7387, $D6C99AE8459D53CE, $BA6D74CC77E5D031, $3F152B64A74C9586, $D9335D08B3AA79CA
  Data.q $27E23331DF5A06BA, $6EA838F2F2F1F9BC, $7D7D7193C52EB988, $C361414802EDF27F, $83527C16AA0EC1FF, $0E176463552D7119, $C198EFA8717FB58E, $45D9D5CEFB7F3D74
  Data.q $D523FCBAEBEB8A11, $F79C9AE9B5D331DF, $5D7D714228BB3A79, $711998EFF3A47B97, $68BA394519A0FF09, $298BFF3F3CBE6E6F, $A46105871C9341E2, $27982C26620190E9
  Data.q $21EA729C7F4CC46C, $6D3D89293852B8E7, $6DA7EBBB76C106FD, $741BEB6CEC310083, $D6A73991663D73D0, $2D84355791966245, $D303F7D10BE16FFF, $BA72808CC7B91F6E
  Data.q $4FD29CA8F5B12E1B, $4820DB7DEB6F766B, $FF442FA12440B8E3, $65A6DFAEBA197112, $EBA16535B14088BF, $654150CF5F0B7A7A, $ABAE9836236DDE7D, $3C866B0E2FD969B4
  Data.q $CF5F0B7A7AE945E2, $63B29EEF3D654150, $8D51D85F52E235EB, $23E3108570FF4F4F, $88228C477F6F6F8E, $E033613FC9629339, $E0B867DC1A575344, $B9AA3E58872A31C5
  Data.q $E45A23AD8435559B, $FAE6A6523DC4D637, $DBDC9B8F581C1F68, $8433F231BFE0B85D, $A6D75F2C4EB3AC7C, $A4AA3008018E366B, $C8C5311EBA156CB0, $571EEFAF5A410C99
  Data.q $DB23FAE9B5D31D43, $589135518042E1B4, $4CE462988F5D0AB6, $D9AB8F77D7AD2086, $AA15314A20B394D1, $BA2B496C11E23A81, $027706606AA32070, $0C3F4E172029F0BB
  Data.q $88EA975D306B2A38, $74EAFC7C548F9047, $1B8F77D413E7DCCD, $04788EF175D306E7, $CCD74EAFC7C548F9, $83A772BDDE413E7D, $53325628404D65EC, $81D0FE5E92C865EE
  Data.q $19C2E8A92D9F30AE, $E99DC999B73B5579, $BA60D9A602F02D0F, $A35F4DD399110E2E, $D30557AAEEBB99AE, $5D499A84715AE9B5, $C08BAAEEBB99AEA3, $25192B88CEF9F88C
  Data.q $510571755F914CA6, $71C22B595C4874E6, $043EF03EBAEF05DF, $687FDFC9A8A7EFAD, $7B4E09FB87E88AFA, $9321E1CED55E464E, $AC476548C26FBE8E, $B70EB797BE9F3B89
  Data.q $A4442A840526C9EF, $DBB7EB6DFA525347, $18B8917FA217D22E, $3AC601109B7FD75D, $A667B8E7AEBA7C2E, $37A199EECCB57273, $654601109B7DD75D, $E74EBC3DAD7522F1
  Data.q $71198CA3DD996AE4, $E080F77770934EF2, $A403223F4887F1F1, $360ECBDE9C701099, $3E2C2EBE03FDFDC5, $20A14E060FAE1A81, $3DCE1E21A6385D4E, $547C012401AC67A7
  Data.q $9D78F0BC73AA8A0E, $3774E5017E7FBDC2, $F9E6932230076180, $B8840DE7047C4D65, $F4975D306C5C7D6D, $0114068C375E4740, $E66BAFAC07DFDA32, $D692BC339DCAA985
  Data.q $BAE9833AF997BBEB, $406A44D4F9196010, $BAFAC07DFDA32011, $2BC339DCAA985E66, $3FEEBEC77BBEBD69, $038A208A341EEEF6, $C06373BDBD937BF8, $46C4480C458D8880
  Data.q $40B912B1411110B0, $0E118ADA8D251102, $A682049D80B90B41, $B48A602290A16230, $26236088DA589521, $E11512442907E168, $60761703CE73CE8C, $D2FFF998E5DEB219
  Data.q $DDE1FC57BD847ECC, $1B29A581152DECEC, $F73677B77FAD9F1B, $363320D6CDD38EE4, $4AE99756F7BB93AC, $034C92705AE95285, $2B476E38D58B1CDA, $57F9262EAB6A9AE9
  Data.q $E7E5D9483A50E675, $E2333337B7EE9BD7, $DBAE44E62F1C5EAD, $14D61E73371C4444, $F1ECBAF175CE6E91, $5DBAE4051D62AED6, $75A290FDA6E3B7CD, $BC7B2EBC5D734BA8
  Data.q $AB70EE2330A4ABD5, $53D4EAFE5A222FCB, $89EBFEE19F6052EF, $7AE23799DC55EB79, $03DAE690D7203E55, $2E2346B902875C80, $0593485AD11125E4, $1FFC07EDA2DC2DDE
  Data.q $92717EF0D722C5EF, $6E7AF0D7235C82FC, $4D61B51D7206BA82, $F260C991366B66C5, $C367FB12B3689085, $047DAE4001FE4814, $CE23300185335C80, $061FAB5793FA7BCC
  Data.q $EBF0D899A2D4EEF7, $75A7CAE6F649B5DB, $BDDAB14001852653, $18526536B908476B, $43D566B938715800, $3D1A2A3DE2340021, $031385F9E16A607E, $27F9A45F93F7F647
  Data.q $3B9CDE9766DF6BAB, $F9C585926B0EC439, $692AF3B267CEF1DD, $81F79C22AC83F42E, $F0FA7CB8E2307E50, $8500E8F67D7210BE, $52B5C9C38A54A001, $3CB8A3C46800428A
  Data.q $27EDE9FE677AB57D, $5CCC8F93AE3E572F, $8954AEA70753F9F8, $747BEDEE50000299, $17F9C9E5C3E6E463, $D99CCC8F92BED76F, $0614A3EBD9C1B1F0, $7F533B507BE93880
  Data.q $308DAFDF5CFBCCFC, $CC4A8F11A0020A2B, $7F38797EB552FD71, $0DC0ECCE452C92AE, $00535AD207EC9135, $8DA9992884952A00, $A24E52A0002790CF, $754D7BBB189E9A28
  Data.q $CE88B13D03A95E72, $C3FA220FC68D0634, $1861430C20A41DAE, $497FEF3BA0A6AF7C, $750278C629517441, $FC5900F6D330D363, $5CB2F8843E3A11F0, $176FDCF8EF8E2C63
  Data.q $47D75CF3E38E1FC7, $32012314C053637B, $38861B9035D8077A, $8400000711B80000, $4000007108000038, $0000071080000388, $35D8073A35903884, $3700000710DB7590
  Data.q $00000710800000E2, $0000710800000E21, $F20710800000E210, $5DEBB06BB00F76FD, $000711B800003886, $0071080000388400, $0710800003884000, $D6A00A319E210000
  Data.q $D760D76035DFBA68, $0535F8000009EC53, $C4200000E2100000, $4200000E21000001, $E9E3B5F12800001C, $43872973CC047F1C, $07FBAEC1AECAFC66, $ABC9F3DB57DA5D76
  Data.q $38C00A226D59FB9D, $DD0A026DA999DDFA, $3ED73B84BE570B88, $7287C0DF56E3AF8C, $5726C6DA1FFC5625, $1AE18743214CBB43, $C2FCDCC93206D9CE, $05E65DFEFB791647
  Data.q $BA4E8F27972E5EAA, $7449294D6A81CFBE, $01C87AE81F6EBA0D, $1992FAB9797ABF5E, $58B97AABFFDF4301, $6EBA0D7491975DF4, $9BA79601C87AE81F, $AE9294046679E9E5
  Data.q $741AE923276EFBEF, $162C0390F5D03EDD, $BA0D77F1C00A3967, $886000000A6BFC06, $8600000E21800003, $F6926A0091C94978, $3B32EEBA0D7406BB, $00000083CBA00000
  Data.q $0000E21800003886, $00388600000E2180, $E50018E4B5E21800, $BA0D7406BBF6E7AE, $83CBA000003B32EE, $1800003886000000, $00000E21800000E2, $E6A5E21800003886
  Data.q $06BBF6E7AEF50018, $00003B32EEBA0D74, $03886000000ECBA0, $E21800000E218000, $8600000388600000, $EA06BA01D69A9038, $E22FC00001C437FF, $8600000E21800000
  Data.q $8000038860000038, $CDC9D90C00000E21, $F9BF9FCECF27CBA7, $69F5F5CFB38FD756, $6E63FDF22EAC065A, $90F5D06BA035DF35, $DDD79FB6AD59FC9D, $4E6D7B35F57D66EA
  Data.q $F57EC94A99AD57B2, $F66A5240BA2607DE, $4A79F232EBBCD32B, $7A4C2325D2F23249, $87D93AD03B1B52F7, $A6BDC942DE89D4AF, $9F4A6DD4EFF5D03B, $EB5D6BAD75AEFDA4
  Data.q $0FD3C975D6BAD75A, $D98D7B729D99FB39, $652D593AC7F4EE6F, $E2638BE0996A35E4, $5C9C3326A5F634BB, $578F41D7308F6163, $8FD5CEB366D93E93, $D6BAD75AEF1A2FF4
  Data.q $D90F5D6BAD75AEB5, $BF6804472BF5645E, $7E7BA05FC0D7406B, $0000009A53A8522A, $6042AE444E454900
  Data.a $82
EndDataSection


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Sat Feb 29, 2020 8:44 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14014
Location: France
Thanks for confirming, that's why we used a temporary static back then. May be we can avoid the create/delete by just caching the static control and resizing it properly before using DrawTheme(), what do you think ?


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Sun Mar 01, 2020 9:49 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 705
Location: Linz, Austria
Oops, forgot about XP... This should fix it :wink:
Code:
Global oldProc , WinXP = Bool(OSVersion() = #PB_OS_Windows_XP)

Procedure WndCallback(hWnd, Msg, wParam, lParam)
  Select Msg
     
    Case #WM_CTLCOLORSTATIC, #WM_CTLCOLORBTN
      SetBkMode_(wParam, #TRANSPARENT)
      If WinXP = 0
        ProcedureReturn GetSysColorBrush_(#COLOR_WINDOW)
      Else
        Static brush
        If brush
          DeleteObject_(brush)
        EndIf
        GetClientRect_(lParam, cRect.RECT)
        hdc = CreateCompatibleDC_(wParam)
        bmp = CreateCompatibleBitmap_(wParam, cRect\right, cRect\bottom)
        obj = SelectObject_(hdc, bmp)
        parent = GetParent_(hWnd)
        MapWindowPoints_(lParam, parent, cRect, 2)
        OffsetViewportOrgEx_(hdc, -cRect\left, -cRect\top, orig.POINT)
        SendMessage_(parent, #WM_PRINTCLIENT, hdc, #PRF_CLIENT)
        SetViewportOrgEx_(hdc, orig\x, orig\y, 0)
        brush = CreatePatternBrush_(bmp)
        DeleteObject_(SelectObject_(hdc, obj))
        DeleteDC_(hdc)
        ProcedureReturn brush
      EndIf
     
    Case #WM_NCDESTROY
      SetWindowLongPtr_(hWnd, #GWL_WNDPROC, @oldProc)
      DeleteObject_(brush)
      ProcedureReturn DefWindowProc_(hWnd, Msg, wParam, lParam)
     
  EndSelect
  ProcedureReturn CallWindowProc_(oldProc, hWnd, Msg, wParam, lParam)
EndProcedure

Procedure ResizePanel()
  ResizeGadget(0, #PB_Ignore, #PB_Ignore, WindowWidth(0, #PB_Window_InnerCoordinate)-20, WindowHeight(0, #PB_Window_InnerCoordinate)-20)
  ResizeGadget(2, #PB_Ignore, WindowHeight(0, #PB_Window_InnerCoordinate)-85, #PB_Ignore, #PB_Ignore)
EndProcedure

OpenWindow(0, 0, 0, 320, 200, "", #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget|#PB_Window_ScreenCentered|#PB_Window_Invisible)
BindEvent(#PB_Event_SizeWindow, @ResizePanel())

PanelGadget(0, 10, 10, 300, 180)
  AddGadgetItem(0, -1, "Panel 1")
    ButtonGadget(1, 10, 115, 80, 24,"Button 1")
    oldProc = SetWindowLongPtr_(GetParent_(GadgetID(1)), #GWL_WNDPROC, @WndCallback()) ;;; <-- comment for PB's solution
    TextGadget(2, 95, 115, 80, 24,"Text 2", #SS_CENTER|#SS_CENTERIMAGE)
    CheckBoxGadget(3, 180, 115, 80, 24, "Checkbox 3")
    TrackBarGadget(4, 10, 60, 200, 30, 0, 100)
  AddGadgetItem(0, -1, "Panel 2")
CloseGadgetList()

HideWindow(0, #False)

While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Fri Mar 06, 2020 1:58 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 705
Location: Linz, Austria
Is the above code suitable as a replacement?


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Fri Mar 06, 2020 2:21 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Dec 21, 2015 8:12 pm
Posts: 164
You should not use GetSysColorBrush_(#COLOR_WINDOW) for newer Windows.
It's still a PNG image inside aero.msstyles, even if MS is using a boring white image.


Top
 Profile  
Reply with quote  
 Post subject: Re: PanelGadget with STATIC controls
PostPosted: Fri Mar 06, 2020 3:42 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 705
Location: Linz, Austria
fryquez wrote:
You should not use GetSysColorBrush_(#COLOR_WINDOW) for newer Windows.
It's still a PNG image inside aero.msstyles, even if MS is using a boring white image.
GetSysColorBrush would speed up the code a bit, so that the panel is (or should be) less flickering when resized. Less flickering is still flickering, though... Why bother :). I never managed to completely remove flickering from panels without using WS_EX_COMPOSITED anyway.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye