🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #59196

Xnews - Luu, a fix for the grayed - out close button

#59196
From: Wayne Menzie
Date: Tue, 14 Mar 2000 00:00
32 lines
1723 bytes
Luu,

If you are interested, here is a fix for the close button being grayed out 
when the child window is maximized.

It's not a vcl bug, but very old windows bug (at least from win3.1). 
The simplest way to do it is to make a little change in FORMS.PAS, but then 
you can't use packages:
 
**** FORMS.PAS - line 2440 - problem with maximized MDI child,
    when merging menus:
procedure TForm.MergeMenu(MergeState: Boolean);
[snip]
    if MergeState and (FormStyle = fsMDIChild) and (WindowState = 
wsMaximized) then
    begin
      { Force MDI to put back the system menu of a maximized child }       
Size := ClientWidth + (Longint(ClientHeight) shl 16);
      SendMessage(Handle, WM_SIZE, SIZE_RESTORED, Size);
      SendMessage(Handle, WM_SIZE, SIZE_MAXIMIZED, Size);
 
      {!!!!! RWare}
      { Re-force MDI to put back the system menu of a maximized child }       
SendMessage(Handle, WM_SIZE, SIZE_RESTORED, Size);
      SendMessage(Handle, WM_SIZE, SIZE_MAXIMIZED, Size);
    end;

Let me know what you think.

Wayne Menzie

Technical Details
Message-ID: <8EF7E20F1wayneshammalammading@206.66.240.253>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <8EF7E20F1wayneshammalammading@206.66.240.253>
Subject: Xnews - Luu, a fix for the grayed - out close button
Date: Tue, 14 Mar 2000 00:00:00 +0000
From: waynem@bosmedtechdotcom.nospam (Wayne Menzie)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 597632577
X-Trace: 14 Mar 2000 22:20:37 -0500, 216-064-104-236.inaddr.vitts.com
Organization: Boston Medical Technologies
User-Agent: Xnews/03.01.23
Newsgroups: news.software.readers