Official eMule-Board: Taskbarnotifier And Windows Aero - Official eMule-Board

Jump to content


Page 1 of 1

Taskbarnotifier And Windows Aero bug with windows region

#1 User is offline   gureedo 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 10
  • Joined: 28-October 09

Posted 22 January 2010 - 07:23 PM

In windows seven and vista with activated aero effects i have bug with TaskbarNotifier region.
It's shown as single rect with background and image on it.

According to SetWindowRgn on msdn:

Quote

If you do, you are left with lost regions on the screen that never repaint and never go away. To resolve this, call SetWindowRgn(NULL) before calling SetWindowPos, and then call SetWindowRgn again with the new region.


method void CTaskbarNotifier::OnTimer(UINT_PTR nIDEvent) has two calls of SetWindowPos.

here code before for each call SetWindowPos
SetWindowPos(...);

and after:
HRGN hRgn = CreateRectRgn(0,0,0,0);
GetWindowRgn(hRgn);
SetWindowPos(...);
VERIFY( SetWindowRgn(hRgn, TRUE) != 0 );

coping rgn done because of windows dose not applies same region twice on window.
0

#2 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3,412
  • Joined: 27-June 03

Posted 08 March 2010 - 11:15 PM

I had a hard time understanding the post and the MSDN article you quoted applies to Windows Mobile/Embedded, the default system SDK article doesn't have this additional text.
However you are completely correct, i never noticed the bug actually but it was there and it is fixed with your changes. Thanks for pointing out :)

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users