Monday, January 22nd 2018, 11:07am UTC+1

You are not logged in.

  • Login
  • Register

mjanas10

Beginner

Date of registration: Oct 5th 2017

Posts: 30

1

Thursday, December 14th 2017, 5:14pm

Why child window preserves what was drawn by the grandparent?

Dear all

I created a child window and I called GUI_Clear() in WM_PAINT of the parent window hoping that it would clear the background of the child window. What happens is the parent window gets cleared leaving a hole in the place where the child window is. Why child window preserves what was drawn by the grandparent?

Thanks

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 468

2

Monday, December 18th 2017, 11:30am

Hi,

Please take a look into the manual at chapter 18.2 'Callback mechanism, invalidation, rendering and keyboard input'.

The tilling mechanism is the reason why it is not working as you expect. To save resources the area of the child window gets skipped. In a lot of cases it is not necessary to redraw the child window if the parent gets redrawn.

Regards
Sven