Tuesday, January 23rd 2018, 7:02am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

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: 469

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