From: Ralph T. <ra...@gm...> - 2006-02-02 09:24:17
|
I took a look at the nested group issue on Win32 this evening. The issue was that groups inside groups used the wrong font when visual styles were enabled (they calculated metrics for the correct font, but then went and used the "System" font to draw text). I think that this is actually a bug in Win32 (it seems to be exposed in some versions of Windows.Forms, according to newsgroups). To partially address the issue I now do not send the WM_SETFONT message to the group box control in set_theme, this means that the group box will draw with the font given to it in response to the WM_CTLCOLORSTATIC message it sends out. This has the distinct disadvantage that the nested groups no longer seem to be able to measure the text they have correctly, and thus draw the group line behind the group title text (but giving the group a font via WM_SETFONT means I can't work around the Win32 bug with WM_CTLCOLORSTATIC). So what I have checked in is better than what was happening before, but still not perfect. Hopefully there is a message that I can do something with to ensure that the text measurement is correct (but I didn't have time to look tonight). Ralph |