Jump to content

Preventing gui redraw


Recommended Posts

Hi again

I think I am not understanding something with regards to _WinAPI_Redrawwindow. What I want to do is essentially lock my gui from redrawing regardless if a message is sent to the window until I say otherwise. Can someone help me get my head wrapped around this and if there is another method can you let me know.

I thought this would work. The first line would prevent redraws and the second line would force a redraw. I know the second line works....but how to prevent it? This is obviously wrong and I'm likely on a completely wrong track.

_WinAPI_RedrawWindow($gui,0,0,BitOR($RDW_NOERASE,$RDW_NOFRAME, $RDW_NOINTERNALPAINT))

_WinAPI_RedrawWindow($gui,0,0,BitOR($RDW_ERASE,$RDW_INVALIDATE,$RDW_UPDATENOW,$RDW_FRAME,$RDW_ALLCHILDREN))

Thanks for the help

Link to comment
Share on other sites

  • 1 year later...

To prevent redrawing or refreshing of a form or gui

be sure you have it selected by using GUISWITCH() if you have multiple forms

and use GUISetState(@SW_LOCK) and GUISetState(@SW_UNLOCK) to stop refreshing / repainting and to resume it once

your update is complete. I only found this by researching API calls and finding that other languages are using "disable" to work around this. Then when I looked up the other options for GUISetState, I found it. But could not find it by searching help or this forum.

I hope this post is detailed enough so that future searches will find it.

:x

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...