[ wxwindows-Bugs-1705685 ] MSW/GTK paint differences

SourceForge.net noreply at sourceforge.net
Sat May 5 00:52:30 PDT 2007


Bugs item #1705685, was opened at 2007-04-23 01:41
Message generated for change (Settings changed) made by oneeyeman
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1705685&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: wxMSW specific
>Group: Platform specific
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: ONEEYEMAN (oneeyeman)
Assigned to: Nobody/Anonymous (nobody)
Summary: MSW/GTK paint differences

Initial Comment:
Hi, ALL,
Attached please find 2 screenshots about different behavior between MSW and GTK running same code, which is also attached.

I believe that this is bug in MSW code.

However, for some reason GTK also has a problem: dc is transparent, but I see the white space between "focus" rectangle and the bitmap.

I'm using 2.8.1 on WinXP and Gentoo Linux/GNOME/gcc-4.

Please comment, even if it will be "upgrade to the latest stable and test" ;-)

Thank you.

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-24 07:40

Message:
Logged In: YES 
user_id=1325635
Originator: YES

Robert,
According to the code, wxGTK produces correct results, and wxMSW does
not.
I'm trying to paint a "focus rectangle" around a static bitmap. I'm not
trying to paint on the bitmap (i.e. "native control), if I understood you
correctly.

Thank you.

----------------------------------------------------------------------

Comment By: Robert Roebling (roebling)
Date: 2007-04-24 02:50

Message:
Logged In: YES 
user_id=77100
Originator: NO

You cannot just draw over an existing native control under GTK+. I
remember this is somehow possible with Win23 and getting the control client
dc may indeed work, but this is not portable. You can draw *around* the
control by catching the paint event of the underlying window/panel/dialog.

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-23 22:22

Message:
Logged In: YES 
user_id=1325635
Originator: YES

I just tried to use paint dc instead of client dc with the MSW version.
There is no rectangle.
I also tried to create the client dc out of the dialog itself. Same
result.

Thank you.

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-23 10:07

Message:
Logged In: YES 
user_id=1325635
Originator: YES

Thank you, Robert. I was missing the transparency of the brush.
However, what do I do to make the code work on both platform the same?



----------------------------------------------------------------------

Comment By: Robert Roebling (roebling)
Date: 2007-04-23 02:24

Message:
Logged In: YES 
user_id=77100
Originator: NO

You cannot just get the DC of a native control under wxGTK. It may happen
to work (it may work here), but this is in general not supported. Also, you
need to call dc.SetBrush( *wxTRANSPARENT_BRUSH ) not any background mode.

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-23 01:48

Message:
Logged In: YES 
user_id=1325635
Originator: YES

File Added: test.cpp

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-23 01:46

Message:
Logged In: YES 
user_id=1325635
Originator: YES

File Added: test.h

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-23 01:44

Message:
Logged In: YES 
user_id=1325635
Originator: YES

File Added: test_gtk.PNG

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1705685&group_id=9863




More information about the wx-dev mailing list