| Bug # | Delphi versions | Description |
| 8 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
If an item is added to one of the top-level sub menus (e.g. a history list item on the file menu), there can be trouble |
| 9 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Menu options and toolbar buttons are not always grayed like they should be |
| 10 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Minimized MDI child windows stop responding to keyboard input after a modal form has been used |
| 11 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
When an MDI Child Form is minimized at design time, upon running weird effects occur |
| 372 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
With multiple child windows, if you maximize and close one, the other child windows will have their close ('x') button greyed out, however the button is still active, and will close the window if clicked. |
Bug #8; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Exists | Exists | Exists | Unknown | Unknown | Unknown | Unknown |
Comment from checker:
I can confirm this bug-report. It still happens in Delphi 2.01 and
Delphi 3.01. The code for TMenuItem.RebuildHandle is still the same.
It deletes all items in the native Windows API level menu object
before copying the Delphi level MenuItem objects into the image kept
by the Windows API. The deletion also removes the system menu in the
cases described below, but these are not restored (there are no
corresponding Delphi objects).
It is interesting to see that the Delphi IDE itself uses the
workaround of having a separate level for the dynamic list
(File|Reopen).
Bug #9; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
Bug #10; last modified: 17-Oct-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Exists | Exists | Exists | Exists | Exists | Unknown | Unknown |
Note from checker: in fact, you can reproduce this bug without using ShowModal and a Delphi form. Just create two MDI children, minimise them and then close the child you minimised SECOND. You cannot now kill the remaining child using CTRL-F4.
I have found two possible workarounds; one involves "hotwiring" the TApplication.IsMDIMsg() function so that MDI children still receive messages when Screen.ActiveForm is Nil:
if (MainForm <> nil) and (MainForm.FormStyle = fsMDIForm) and
((Screen.ActiveForm = nil) or
(Screen.ActiveForm.FormStyle = fsMDIChild)) then
type
TMDIChildForm = class(TForm)
...
public
...
procedure WMNCActivate(var Msg: TWMNCActivate); message WM_NCACTIVATE;
end;
procedure TMDIChildForm.WMNCActivate(var Msg: TWMNCActivate);
begin
if Msg.Active and IsIconic(Handle) and Assigned(ActiveControl) then
SetFocusedControl(ActiveControl);
inherited
end;
Both these solutions fix the demonstration MDI application in the Delphi\Demos
directory, but neither solution has been exhaustively tested. Any feedback
would be welcome.
Bug #11; last modified: 27-Dec-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Absent | Exists | Exists | Exists | Exists | Exists | Exists | Exists |
Comment from checker: This is certainly not the behaviour a reasonable person would expect. As it does not happen in Delphi 1.0, I would expect this to be a VCL bug rather than the notoriously bug-ridden Windows MDI implementation
Bug #372; last modified: 18-May-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Exists | Exists | Exists | Exists | Exists | Unknown | Unknown |
A sample program in Delphi has been prepared by Raoul DeKezel. You can download the sources (which demonstrate the bug AND a workaround) here: Pr0372.zip.
Why it's a bug:
The correct behavior would be for the button not to be greyed. This is
evident in products not developed in delphi, eg word, photoshop.
Possible cause:
Don't know. A friend supposed it has something to do with the way delphi
creates an invisible window to control behavior of the visible ones, and
that this was complicating things somehow.
Version:
I'm using delphi 3.0, searching dejanews has revealed it is common to all
versions of delphi.
I've tested on win95, win95sp1, NT4workstation sp3, NT4server sp3.
Additional information, by Brad Stowers:
I've found that this only occurs with MDI apps that use menu merging. That
is, the MDI parent form has a menu, and the MDI child form has a menu that
is merged into the parent. If the MDI child does not have a menu, the
problem does not occur. It seems to indicate the bug is somewhere in the
menu VCL code, but I haven't been able to pinpoint the exact cause of the
problem.