Hi
I have (had) a window with 50 child-windows (each a data label). Double-buffering would not work as the paint time was just taking too long. Performance was very poor and my processor was being fully loaded.
Each child-window has its own timer to perform its own data check and refresh (if required). What I have tracked down (and now read in the manual) is that each WM_Invalidate() of a child window causes the parent window to undergo a full refresh. I do not understand why as the child-window is neither transparent nor has it moved location or changed size: there is no need for parent paint(). The problem is made worse as the parent then wants to repaint the background (800x480 c-coded image) and then paint all child-windows: performance drops off a cliff.
To resolve this I tried WM_CF_MEMDEV, tried CF_LATETILING and eventually just modified my code to switch off self-refresh of child windows and implement a timed parent window refresh. This works fine but should not be required and it limits my redraw speed to that of a full screen (about 3-4Hz at 800x480 resolution on 32F429I at 168MHz).
I also increased the background paint speed by loading the background converted bitmap to a MEMDEV and _draw that (I had hoped to store this background image in hardware vram buffer VRAMADDR0 to eliminate repeated repaint but that was not working: discussed in another thread).
I will eventually go back and look at this again (I would prefer self-refreshing window objects) but if you have comment it would be appreciated.
Thanks
Mark
I have (had) a window with 50 child-windows (each a data label). Double-buffering would not work as the paint time was just taking too long. Performance was very poor and my processor was being fully loaded.
Each child-window has its own timer to perform its own data check and refresh (if required). What I have tracked down (and now read in the manual) is that each WM_Invalidate() of a child window causes the parent window to undergo a full refresh. I do not understand why as the child-window is neither transparent nor has it moved location or changed size: there is no need for parent paint(). The problem is made worse as the parent then wants to repaint the background (800x480 c-coded image) and then paint all child-windows: performance drops off a cliff.
To resolve this I tried WM_CF_MEMDEV, tried CF_LATETILING and eventually just modified my code to switch off self-refresh of child windows and implement a timed parent window refresh. This works fine but should not be required and it limits my redraw speed to that of a full screen (about 3-4Hz at 800x480 resolution on 32F429I at 168MHz).
I also increased the background paint speed by loading the background converted bitmap to a MEMDEV and _draw that (I had hoped to store this background image in hardware vram buffer VRAMADDR0 to eliminate repeated repaint but that was not working: discussed in another thread).
I will eventually go back and look at this again (I would prefer self-refreshing window objects) but if you have comment it would be appreciated.
Thanks
Mark