Nerdworld Posted October 18, 2013 Posted October 18, 2013 (edited) Hey folks! I'm currently drawing an image on a GUI. Global $preview = _GDIPlus_GraphicsCreateFromHWND($gui_main) [...] Local $new = _GDIPlus_ImageLoadFromFile($PATH_PREVIEW) _GDIPlus_GraphicsDrawImageRect($preview, $new, [...]) [...] _GDIPlus_ImageDispose($new) But now i found out that the images won't be painted if the window is minimized or invisible. My first idea was to WinActivate the main gui everytime the image is getting updated, but the same problem appears on _GUICtrlStatusBar_SetIcon - which is getting called when i don't want to maximize the whole GUI everytime. Is there any way to paint images on hidden windows except drawing it in a loop? The only things i can imagine are some dirty workarounds with WM_PAINT or listening for WinActivate-events. Regards, Daniel Edited October 18, 2013 by Nerdworld
UEZ Posted October 18, 2013 Posted October 18, 2013 (edited) You can use the WM_PAINT message handler to repaint your image to the gfx handle or you just send the image to a picture control which will be repainted by the os automatically. Btw, it is GDI+ not GDI! Br, UEZ Edited October 18, 2013 by UEZ 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Nerdworld Posted October 18, 2013 Author Posted October 18, 2013 You can use the WM_PAINT message handler to repaint your image to the gfx handle or you just send the image to a picture control which will be repainted by the os automatically. Btw, it is GDI+ not GDI! Br, UEZ Well, saying it's GDI+, not GDI is like saying "That's not Windows. It's Windows 7." Okay - so i'll give it a try with WM_PAINT...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now