IanN1990 Posted June 5, 2019 Share Posted June 5, 2019 (edited) Hi All, I have run into a small problem on my latest project. My GUI has a large number of dynamically generated labels, to help with performance i use @SW_Lock / @SW_UNLOCK but i am finding if the GUI loses focus it resumes it repainting / updating. I tired using GUIRegisterMsg($WM_PAINT, "WM_Paint") but my code is causing an endless loop. Is there like a "skip this paint" i can return? Func WM_Paint($hWnd, $iMsg, $wParam, $lParam) If $Paint = 1 Then Return $GUI_RUNDEFMSG Else Return 0 EndIf EndFunc ;==>WM_Paint Update 2. Just found the following; _SendMessage($hMainGUI, $WM_SETREDRAW, False, 0) ;Disables _SendMessage($hMainGUI, $WM_SETREDRAW, True, 0) ;Enables _WinAPI_RedrawWindow($hMainGUI, 0, 0, BitOR( $RDW_FRAME, $RDW_INVALIDATE, $RDW_ALLCHILDREN)) ;Repaints Though this correctly prevents any repainting, the taskbar icon disappears and makes the GUI becomes click-throughable? Ian Edited June 5, 2019 by IanN1990 Link to comment Share on other sites More sharing options...
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