Kirix Support Forums

Fix for a Vista bug

Please post any wxAUI patches or modifications you've created here. Thanks!

Fix for a Vista bug

Postby juan on Fri Oct 26, 2007 10:46 am

A fix for this bug:

viewtopic.php?f=15&t=434&p=1068#p1068

It seems Vista doesn't like transparent pens.

Code: Select all
--- framemanager-base.cpp   Fri Oct 26 12:10:02 2007
+++ framemanager.cpp   Fri Oct 26 14:52:15 2007
@@ -68,4 +68,9 @@
#endif

+#ifdef __WXMSW__
+    #include "wx/msw/wrapwin.h"
+    #include "wx/msw/private.h"
+#endif
+
IMPLEMENT_DYNAMIC_CLASS(wxAuiManagerEvent, wxEvent)
IMPLEMENT_CLASS(wxAuiManager, wxEvtHandler)
@@ -224,8 +229,13 @@
     wxBrush brush(stipple);
     dc.SetBrush(brush);
+   
+#ifdef __WXMSW__
+    PatBlt(GetHdcOf(dc), rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight(), PATINVERT);
+#else   
     dc.SetPen(*wxTRANSPARENT_PEN);

     dc.SetLogicalFunction(wxXOR);
     dc.DrawRectangle(rect);
+#endif
}
juan
Registered User
 
Posts: 2
Joined: Sun Jan 01, 2006 10:26 am

Re: Fix for a Vista bug

Postby Jes on Mon Oct 29, 2007 5:12 am

tnx for patch - that's actual :)
Let improove it together
Jes
Registered User
 
Posts: 15
Joined: Mon Oct 15, 2007 10:27 am

Re: Fix for a Vista bug

Postby Ben on Mon Oct 29, 2007 3:07 pm

Looking good. I'm happy this problem is fixed.

Ben
Ben Williams
Kirix Support Team
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Re: Fix for a Vista bug

Postby Jes on Sat Nov 03, 2007 5:56 am

Ben wrote:Looking good. I'm happy this problem is fixed.

Ben

All transparent manipulation in Vista is slow, that is in another application
maybe present other function specialy for Vista in WinAPI?
Let improove it together
Jes
Registered User
 
Posts: 15
Joined: Mon Oct 15, 2007 10:27 am

Re: Fix for a Vista bug

Postby Julian Smart on Fri Nov 09, 2007 6:53 am

Just to say I've committed the fix to 2.8 SVN (for the forthcoming 2.8.7) and 2.9 SVN.

Thanks!

Julian
Julian Smart
Registered User
 
Posts: 17
Joined: Sun Nov 05, 2006 4:45 pm

Return to wxAUI Patches & Modifications