JFee Posted August 26, 2008 Posted August 26, 2008 So I have painted an image onto my window using GDIPlus functions, but when the window gets redrawn, the GDI stuff I drew doesn't get redrawn with it. Is there a way to do lock the GDI graphic without doing manual redrawing? I have tried using GUIRegisterMsg($WM_PAINT, "_ReDraw") and having _ReDraw draw the image again, but it crashes whenever it tries to redraw it. Func _ReDraw() If $gPreviewBox <> 0 And $imgBackground <> 0 Then _GDIPlus_Startup() _GDIPlus_GraphicsDrawImageRect($gPreviewBox, $imgBackground, 0, 0, 720, 486) _GDIPlus_Shutdown() EndIf EndFunc;==>_ReDraw The if statement just makes sure its been drawn once already Regards,Josh
JFee Posted August 26, 2008 Author Posted August 26, 2008 Alright, so I got the redraw thing to work (one gdi startup and one gdi shutdown total), but when I maximize the window, it redraws and then the pic control that it draws on top of goes on top of it. I am not sure what is happening here Regards,Josh
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