Jump to content

_WinAPI_InvalidateRgn() VS _WinAPI_RedrawWindow()

Recommended Posts

Somewhat strange question maybe... But _WinAPI_InvalidateRgn($hWndCtrl) VS _WinAPI_RedrawWindow($hWndCtrl) - wich function is better to use in wich case and why?

Assume I have some GUI in on-event mode wich use custom painting on ListView(s) and TreeView(s) and happen to run function wich change variables to choose icons, colours of items in those controls, boldness of text etc.

Link to post
Share on other sites

For a ListView you should not use any of these functions but _GUICtrlListView_RedrawItems.

For a TreeView it doesn't matter which function to use. Personally, I prefer _WinAPI_RedrawWindow( $hTV, 0, 0, $RDW_INVALIDATE ) because it clearly tells what's going on: The TreeView window is invalidated and then redrawn.

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

    No registered users viewing this page.

  • Create New...