Jump to content

GDI+ Clear bitmaps drawed in window


MrKris1224
 Share

Recommended Posts

Hi, i'am making small application to my job. I need to draw some icons / bitmaps in another application window. I'am drawing icons by this code:

 

;(...)
$aPos = ControlGetPos($hWin, "", $hCtrl)
$hDC = _WinAPI_GetWindowDC($hWin)
$hGraphic = _GDIPlus_GraphicsCreateFromHDC($hDC)
_GDIPlus_GraphicsClear($hGraphics)
_GDIPlus_GraphicsDrawImage($hGraphic, $hIcon, $aPos[0] + $aPos[2] + 5, $aPos[1] + $aPos[3] - 5)
_GDIPlus_GraphicsDispose($hGraphic)
_WinAPI_ReleaseDC($hWin, $hDC)
;(...)

But now i must delete drawed bitmaps from window. I can't handle graphics objects all time because i'am closing and opening another windows of that application but sometimes i must draw icons then draw them again in another places. But there's problem because i can't delete older icons. _Winapi_RedrawWindow doesn't work.

There's any method to clear that icons? That's what i drawing for example in this window (info icon):
 

ico.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...