🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: MDI without MDI

#5416
From: Thorsten Kettner
Date: Wed, 24 Aug 2005 07:27
32 lines
2434 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>It is technically possible to host MDI in a child form, but 
>you have to manage a few things manually.  Have a look at QC 
>#12006 for some details:
>
>http://qc.borland.com/wc/qcmain.aspx?d=12006

That looks promising. Thank you very much for the link Remy.

>> This is as well noticable when setting Left and Top after
>> SetParent - the child form gets drawn at another position!
>
>That is because you are setting the Left and Top properties 
>BEFORE calling SetParent(), so the property values are still 
>relative to the overall screen.  You should be calling 
>SetParent() immediately after instantiating the form and 
>before doing anything with coordinates.

Strange enough it is just the opposite. Calling SetParent after
setting Left and Top places the child form at the correct
position, whereas calling it beforehand kind of write-protects
the properties. I checked this in the debugger, Left and Top
keep their values, the assignments get ignored.

However, you have helped me a lot by showing that I can use MDI.
And there seems to be a solution without MDI, too. A collegue of
mine searched the web and found a solution by using the Parent
property and sending WM_NCACTIVATE to the child forms. Well,
this method has some drawbacks, like all child forms are kept activated for instance. The MDI solution seems better.

Thank you.
Technical Details
Message-ID: <430c215a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!news-out.nuthinbutnews.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <430982f9$1@newsgroups.borland.com> <430a0f6a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e6e8a404167d95ab
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Sender: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Reply-To: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Subject: Re: MDI without MDI
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 80.85.196.94     
References: <430982f9$1@newsgroups.borland.com> <430a0f6a$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <430c215a$1@newsgroups.borland.com>
Date: 24 Aug 2005 00:27:22 -0700
X-Trace: newsgroups.borland.com 1124868442 207.105.83.66 (24 Aug 2005 00:27:22 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!news-out.nuthinbutnews.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail