[wxMSW 2.8.4] Dialog's wxSTAY_ON_TOP style getting ignored.

Vadim Zeitlin vadim at wxwidgets.org
Sun Oct 7 15:17:39 PDT 2007


On Tue, 21 Aug 2007 21:51:32 +0200 Jurko Gospodnetić <jurko.gospodnetic at docte.hr> wrote:

JG> I just ran into a bug with creating wxSTAY_ON_TOP dialogs on wxMSW.

 Hello,

 Thanks a lot for the detailed description of the problem and its analysis
and sorry for the delay with reply (I was away when you wrote this and
couldn't reply immediately).

JG>    Could someone please test and apply the attached patch?

 I added a test to the dialogs sample for wxSTAY_ON_TOP and it seems to
work for me on a couple of Windows versions I've just tried. So I applied
the patch to the trunk and I think we could backport it to the next 2.8
release if no problems are found with it until then.

JG>    The implemented solution seems such a natural way that it scares me 
JG> that I am most likely missing some undocumented knowledge about why the 
JG> current implementation is the way it is? Possibly some portability issues?

 No, I think it's just a side effect of the (long and winding) code
evolution. I.e. MSWGetStyle() didn't exist when this code was initially
written so it couldn't be easily written like this because there was no
simple way to get all the extended styles at once. Also, the dialogs were
not created from the templates until relatively recently (a couple of
years) ago. Or maybe it was just an oversight. If you're really curious you
can use the svn annotate command to find out what really happened but I'll
just limit myself to correcting the code :-)

JG>    I googled and found no references to problems with wxSTAY_ON_TOP, 
JG> except for some unreplied questions about how to change this at run-time 
JG> for an already existing window (which is an interesting but separate 
JG> topic :-)).

 FWIW this is supposed to work, at least I'm pretty sure we do have the
code for it somewhere...

 Thanks again for your patch!
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list