希望可以清楚上一次绘图的图片,- @echo off
- CAPI
- mode con: cols=40 lines=20
- set CAPI=API Call user32 LoadImageW ;0 $6.ico ;1 ;0 ;0 ;16
- set hIcont=%CAPI_Ret%
- set CAPI=API Call kernel32 GetConsoleWindow
- set hCMD=%CAPI_Ret%
- set CAPI=API Call user32 GetDC ;%hCMD%
- set hDC=%CAPI_Ret%
- set CAPI=API Call gdi32 CreateCompatibleDC ;%hDC%
- set hDCMem=%CAPI_Ret%
- set CAPI=API Call gdi32 CreateCompatibleBitmap ;%hDC% ;500 ;352
- set hBMPMem=%CAPI_Ret%
- set CAPI=API Call gdi32 SelectObject ;%hDCMem% ;%hBMPMem%
- set x=0
- set y=0
- set m=320
- set CAPI=API Call gdi32 Rectangle ;%hDCMem% ;0 ;0 ;320 ;342
-
- :loop
- set CAPI=API Call gdi32 Rectangle ;%hDCMem% ;0 ;0 ;64 ;%y%
- set CAPI=API Call user32 DrawIconEx ;%hDCMem% ;%x% ;%y% ;%hIcont% ;64 ;32 ;0 ;0 ;3
- set CAPI=API Call gdi32 BitBlt ;%hDC% ;0 ;0 ;320 ;342 ;%hDCMem% ;0 ;0 ;13369376
- CAPI Call kernel32 Sleep #3
- set /a y+=4
- if "%y%" == "%m%" (
- set /a m=%m%-32
- set x=0
- set y=0
- )
- goto loop
复制代码 可是但我改变 Rectangle 想清除上一个方块时修改成
set CAPI=API Call gdi32 Rectangle ;%hDCMem% ;%x% ;%y% ;64 ;32
却不是我我要的结果,我希望可以清除像开始那样,清除上一次的图片,表达不好,见谅,有大神有办法吗? |