[分享]用pecmd绘制一个无边框窗口
2022-9-4 1544

TEAM ENVI^ ENVIMODE=1| ENVI^ FORCELOCAL=1
SET  &::WM_MOUSEENTER=0x1000
SET  &::WM_MOUSELEAVE=0x02A3
SET  &::WM_LBUTTONDOWN=0x0201

CALL $--ret:&DPIA user32.dll,SetProcessDPIAware
SCRN -desk  ,,,,,,,,scaleY
WIN1
_SUB WIN1,W660H570,新窗口1,,,#,,-scale:%scaleY%
    ENVI @this.HitTest=668:570
    ENVI @this.Font=10:微软雅黑
    ENVI @this.bkcolor=0xffffff
    IMAG IMAG3,L5T5W20H20,<img><size:512><color:0x000000><font:385:Segoe Fluent Icons**###0>\uE138,
    LABE -left -trans -ncmd LABE1,L30T5W355H20,窗口标题,,
    SWIN -:最小化,L560T0W50H30
    SWIN -:关闭,L610T0W50H30
_END

_SUB 最小化,W50H30,,,,,,-scale:%scaleY%
    ENVI @this.bkcolor=0xffffff
    IMAG IMAG1,L18T7W15H15,<img><size:512><color:0x000000><font:385:Segoe Fluent Icons**###0>\uE004,
    ENVI @this.MSG=%&WM_MOUSEENTER%:ENVI @this.bkcolor=0xEEEEEE
    ENVI @this.MSG=%WM_MOUSELEAVE%:ENVI @this.bkcolor=0xffffff
    ENVI @this.MSG=_%&WM_LBUTTONDOWN%:ENVI @WIN1.Visable=*4
_END
        

_SUB 关闭,W50H30,,,,,,-scale:%scaleY%
    ENVI @this.bkcolor=0xffffff
    IMAG IMAG1,L18T7W15H15,<img><size:512><color:0x000000><font:385:Segoe Fluent Icons**###0>\uE106,
    ENVI @this.MSG=%&WM_MOUSEENTER%:ENVI @this.bkcolor=0x0600F4
    ENVI @this.MSG=%WM_MOUSELEAVE%:ENVI @this.bkcolor=0xffffff
    ENVI @this.MSG=_%&WM_LBUTTONDOWN%:KILL \新窗口1
_END

 

 

 

收藏
点赞
分享
瞎搞协会会长
最新回复 (1)
  • avatar image
    anson4 2023-11-16

    看起来挺好的,感谢分享!

    请教一下,怎样才能把窗口的直角弄成圆角?

    单机计算
返回