Re itijl:
是的,这样的问题在我学习GDI函数以来一直困扰着我,帮助文件的几个例子也存在此问题。用最笨的方法吧,复原窗口后再重绘一次,应该还有别的方法。#include <WinAPI.au3>
#include <GDIPlus.au3>
#include <GUIConstants.au3>
_GDIPlus_Startup()
$hLibrary = _WinAPI_LoadLibrary("Shell32.dll")
$hBitmap = _WinAPI_LoadBitmap($hLibrary, 131)
_WinAPI_FreeLibrary($hLibrary)
$hGUI = GUICreate("Test", 400, 300)
GUISetState()
$hBmp = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap)
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
_GDIPlus_GraphicsDrawImage($hGraphic, $hBmp, 0, 0)
Do
$iMsg = guiGetMsg()
if $iMsg = $GUI_EVENT_RESTORE Then
_GDIPlus_GraphicsDrawImage($hGraphic, $hBmp, 0, 0)
EndIf
Until $iMsg = -3
_GDIPlus_BitmapDispose($hBmp)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
|