How to do flickerfree resizing of gadgets?

Just starting out? Need help? Post your questions and find answers here.
mestnyi
Addict
Addict
Posts: 1001
Joined: Mon Nov 25, 2013 6:41 am

Re: How to do flickerfree resizing of gadgets?

Post by mestnyi »

Code: Select all

 line 239   UpdateWindow_(hWnd)  
only helps
User avatar
VB6_to_PBx
Enthusiast
Enthusiast
Posts: 625
Joined: Mon May 09, 2011 9:36 am

Re: How to do flickerfree resizing of gadgets?

Post by VB6_to_PBx »

line 239 UpdateWindow_(hWnd)

Code: Select all

         ; 3rd Step: Redraw Background only on invalid area (i.e. excluding the 'good' gadgets) and refresh Gadgets
         
         BeginPaint_(hWnd, ps.PAINTSTRUCT)
         EndPaint_(hWnd, ps.PAINTSTRUCT)
         RedrawWindow_(hWnd,#Null,#Null,#RDW_INVALIDATE);
         UpdateWindow_(hWnd)
      EndIf;
   EndIf     ;
thanks mestnyi for that code addition ,

that stopped all flickering on my Win7 Computer w/PB541LTS 32-bit version
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2071
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: How to do flickerfree resizing of gadgets?

Post by Andre »

PureLust wrote: The big advantage of using XML-Dialogs is, that you don't have to care about the resizing.
I could imagine, how long it took you, to get the resize of your example right.
With XML-Dialogs you just have to set it up right, and anything else is magic. :wink:

....

As long as there is no good XML-Dialog Designer available (even mine is far away from being finished) I use a Wrapper to create the XML-Strings.
This makes it much easier to create a XML-Code with correct Syntax and the code looks much cleaner as well.
The Wrapper still doesn't wrap all Dialog-Elements, but it worked quite well while building a copy of your Example.
(The only Gadget which I had to create 'manually' was the ListIconGadget (see AddXML() in Line 148).)
[LINK] to download the wrapper.

...
Maybe XML-Dialogs will be of some interest for you in the future. ;)
I think the Wrapper makes it really a lot easier to build error-free + well-formatted XML Dialog descriptions for your GUI declarations. As soon more people will find out the advantages, and maybe use your Wrapper (many thanks for this! :D), the use of Dialogs will increase a lot.

There are still some things to improve, and I'm hoping too, that Fred will take care of them! :twisted:
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Michael Vogel
Addict
Addict
Posts: 2680
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: How to do flickerfree resizing of gadgets?

Post by Michael Vogel »

mestnyi wrote:

Code: Select all

 line 239   UpdateWindow_(hWnd)  
only helps
Hm, when adding this line, the background around the frame gadget text is drawn in a little bit lighter color than the standard background (Windows 8.1).
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Re: How to do flickerfree resizing of gadgets?

Post by PureLust »

srod wrote:@Purelust : that is a pretty nifty utility there for creating XML dialogs. Very nice.
Little Update on that:

In the meantime the Wrapper has been almost finished and was renamed to 'DynamicDialogs'.
It supports any Dialog-Gadget now and offers several syntax-variations (there is a 'plain'-, 'suffixed'-, 'suffixed_IDonly'- and a 'suffixed_NameOnly'-Version) to support various likings or needs.
In combination with the also included "indentation injector' you could easily get a correctly layoutet code in your IDE as well.
Further it supports Fonts and Images (which are not handled by PBs native Dialog-Library so far).

Right now I have only published it at the german forum, but if you don't mind you are welcome to take a look and download it THERE.
(If you have problems understanding the german thread, just have a look at the included samples. Most of them are commented in (terrible) english.)
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Re: How to do flickerfree resizing of gadgets?

Post by PureLust »

Hi Michael,

I've just released my Module 'DeFlicker'.
Even though you already have a working deflicker-solution for your project now, 'DeFlicker' will provide you a more flexible way to deflicker your gorgeous GUI.
Maybe have a look at it and leave me a comment it you replace my previous Solution with 'DeFlicker'.

Thanks and Greetz,
PureLust.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
Post Reply