Jump to content

Recommended Posts

Posted

Hello, everyone!

I haven't played with GDI+ functionality very much, but I have managed to insert some graphics into a script I'm writing. I noticed that when I move the Gui where the graphic is off screen or minimize and restore it, the image disappears (_GDIPlus_GraphicsDrawImage). The help file example for that function does the same thing, so I don't think I'm doing anything wrong.

I have tried some workarounds such as starting a timer in the Case and every 2 seconds, redraw the image. However, _Timer_Diff runs continuously and the image gets redrawn way too much. I thought about detecting a minimize and restore and only redrawing it then, but I can't think of a way of detecting if someone moves the graphic off screen (well, I can but it would be lengthy).

This isn't crucial for the program to work, so if it is a difficult solution, I just won't worry about it. Just wondering if anyone has any quick fixes.

Thanks for any advice!

Posted

You have to redraw on GUI restore and additionally on GUI erase (WM_ERASE or WM_PAINT). Search for it and you should find many examples.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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
  • Recently Browsing   0 members

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