PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How to reduce screen flicker in a ListView  (Read 631 times)

Jean-pierre Leroy

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 460
  • expect nothing, be prepared for everything ...
How to reduce screen flicker in a ListView
« on: October 11, 2016, 12:25:00 PM »

Hi Paul,

I saw recently your reply on the PowerBASIC forum about "How to reduce screen flicker in a ListView":

https://forum.powerbasic.com/forum/user-to-user-discussions/programming/751841-how-to-reduce-screen-flicker-in-a-listview?p=751855#post751855

Is-it possible to enable double buffering extending style (%LVS_EX_DOUBLEBUFFER) for a ListView control with FireFly ? this option doesn't seem to be available in the visual designer.

Thanks,
Jean-Pierre
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8090
  • Windows 10
    • PlanetSquires Software
Re: How to reduce screen flicker in a ListView
« Reply #1 on: October 11, 2016, 08:22:21 PM »

Hi Jean-Pierre,

You would need to add code to WM_CREATE to set the style for the Listview. Here is some FB code that I am using in my editor project to set some extended styles for the Listview.

Code: [Select]
   ' Add some extended styles
   Dim dwExStyle As DWORD
   dwExStyle = ListView_GetExtendedListViewStyle(hLV)
   dwExStyle = dwExStyle Or LVS_EX_FULLROWSELECT Or LVS_EX_GRIDLINES Or LVS_EX_DOUBLEBUFFER Or LVS_EX_FLATSB
   ListView_SetExtendedListViewStyle(hLV, dwExStyle)
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Jean-pierre Leroy

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 460
  • expect nothing, be prepared for everything ...
Re: How to reduce screen flicker in a ListView
« Reply #2 on: October 12, 2016, 06:26:47 AM »

Thanks Paul.

I will follow your advice.

Regards,
Jean-Pierre
Logged