On approximately 4/27/2004 3:32 PM, came the following characters from
the keyboard of Glenn Linderman:
On approximately 4/27/2004 11:24 AM, came the following characters from
the keyboard of Laurent ROCHER:
Hi,
I remove Win32::GUI::MDI because it's current implementation not
realy permit to use it in an MDI application context. I don't
think anyone use this class ;o) And, i don't know this usage too.
Yes, I did get the idea when I started using Win32::GUI::MDI that it
wasn't "true" MDI.
I can restore old Win32::GUI::MDI class. But, this class name
probably confuse user for create MDI application.
I wonder if restoring it under a different name would cause problems? It
would provide a migration path, albeit, an incompatible change. But if
we can find a work-alike, then there is no need to add the class back.
Or it would be nice to document the work-alike if we can find it.
Well, I see that there is really very little code in Win32::GUI to
support the old Win32::GUI::MDI class. But it must be very magic code,
because I haven't found a way to make it out of what is presently in the
CVS.
Win32::GUI::MDI use same window class than Win32::GUI::MDIClient.
You can replace Win32::GUI::MDI with a Win32::GUI::MDIClient but
AddLablel method don't exist for this class.
It's only have a AddChild. And this class it's not same as a
Win32::GUI::Window like Win32::GUI::MDI.
For compatibility, i think you can replace Win32::GUI::MDI by
something like that :
$mdi_window = Win32::GUI::Window->new (
-remstyle => WS_OVERLAPPEDWINDOW,
-addstyle => WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL
| WS_HSCROLL,
-classname => 'MDICLIENT',
-name => 'mdi_window',
-parent => $mw,
-text => 'MDI',
-top => 0, -left => 0,
-width => $mwsw, -height => $mwsh - 40,
);
So when I try doing this, it sort of works, as I mentioned earlier (see
below), but not quite enough to be able to use it.
From perusing the code, the biggest difference that I can find is that
during the window creation, the above code leaves perlcs.iclass as
WIN32__GUI__WINDOW, making it susceptible to executing code in other
places that is cased on perlcs.iclass ! Whereas when it had type
WIN32__GUI__MDICLIENT then some of those cases didn't happen.
At least, that is the best "educated guess" that I can come with.
So, because I can't find a replacement, and it seems quite useful to my
code, and for backward compatibility, could this MDICLIENT window type
be reinstated in the source code?
This is much closer than anything I found. But:
The scroll bars appear immediately (but maybe that's just because I need
to juggle some sizes that might be a little different than the old
class). But after playing some more, I don't think that was it.
The scroll bars seem to be "stuck" at the top left... attempting to drag
them to see other parts of the window fails, they jump back to the top
left.
Removing WS_CLIPCHILDREN produced no discernible difference.
Removing the WS_VSCROLL and WS_HSCROLL eliminated the inital scroll
bars, but it actually eliminated them completely :(
--
Glenn -- http://nevcal.com/
===========================
The best part about procrastination is that you are never bored,
because you have all kinds of things that you should be doing.