🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #66

Re: MDI form flicker when maximized

#66
From: Mike Collins
Date: Thu, 19 Jun 2008 14:11
45 lines
2245 bytes
Hay Carlos,

There was a well know bug in the (AFAIK) MS implementation of the MDI Window 
which caused this problem i.e. even if you set your child form to maximise, 
it was painted normal and then visually maximised (which looked crap).

The old hack to resolve this was to use the LockWindowUpdate() i.e.

   LockWindowUpdate(ClientHandle);
   try
   {
      if (!MDIChildFrm)
         MDIChildFrm= new TMDIChildFrm(MainForm);

      MDIChildFrm->WindowState = wsMaximized;
      MDIChildFrm->Show();
      MDIChildFrm->BringToFront();
   }
   __finally
   {
      LockWindowUpdate(NULL);
   }

However, in XP and Vista this still doesn't resolve the painting issue. (Bit 
of a pointless post on my behalf :-) )

Mike


"Carlos" <a@a.com> wrote in message 
news:4858a2ef$1@newsgroups.borland.com...
> Hello,
>
> When I have various MDI childs form maximized, and I click for create new 
> child form windows are flicker.
>
> Other question is, in windows vista, when MDI is maximized the right 
> border are wrong painted...
>
> Where is the best location for invoke a showmessage function, when I 
> create a new form, and I needs set to Maximized:
> - OnShow (works but maximization is wrong)
> -
>
> Regards 
Technical Details
Message-ID: <485a5867$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!feeder.ecngs.de!ecngs!feeder2.ecngs.de!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4858a2ef$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5df76efea47eb233
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mike Collins" <its@TheBottomOfThePost>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4858a2ef$1@newsgroups.borland.com>
Subject: Re: MDI form flicker when maximized
Date: Thu, 19 Jun 2008 14:11:51 -0000
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.3959
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133
NNTP-Posting-Host: 89.242.30.218
Message-ID: <485a5867$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1213880423 89.242.30.218 (19 Jun 2008 06:00:23 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!feeder.ecngs.de!ecngs!feeder2.ecngs.de!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail