Article View: borland.public.cppbuilder.nativeapi
Article #4960Re: stop undocked controls from closing
From: Stefano Bonifazi
Date: Fri, 14 Oct 2005 21:24
Date: Fri, 14 Oct 2005 21:24
36 lines
2397 bytes
2397 bytes
Thank You Mr Gambit, Well the problem was that when undocking the controls they created their floating window by themselves so I had no way to manage their OnClose event at all :( But I found that I can set the class of the window they use as floating window when undocked by the "FloatingDockSiteClass" property. So now I implemented a descendant of TCustomDockForm to use with them, that does not show the "biSystemMenu" at all :-) Best Regards, Stefano B. "Remy Lebeau (TeamB)" <no.spam@no.spam.com> ha scritto nel messaggio news:43501a5f@newsgroups.borland.com... > > "Stefano Bonifazi" <stefboombastic@libero.it> wrote in message > news:434ffd95$1@newsgroups.borland.com... > >> Is there a way to prevent a floating undocked control from being >> closed by pushing the "x" on its windows's upper right corner? > > If you are using a TForm, then set the CanClose parameter to False in the > OnCloseQuery event, or the Action parameter to caNone in the OnClose > event. > > If you are creating your own HWND via CreateWindow/Ex(), then your window > procedure will have to intercept the WM_SYSCOMMAND message. The message's > wParam value will contain the SC_CLOSE flag when the window is being > closed. > Discard the message without passing it to DefWindowProc() to prevent the > closure. > > > Gambit > >
Technical Details
Message-ID:
<43502184@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!hwmnpeer01.lga!hwmedia!feed7.newsreader.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<434ffd95$1@newsgroups.borland.com> <43501a5f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,30cfa311941310b6 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Stefano Bonifazi" <stefboombastic@libero.it> Newsgroups: borland.public.cppbuilder.nativeapi References: <434ffd95$1@newsgroups.borland.com> <43501a5f@newsgroups.borland.com> Subject: Re: stop undocked controls from closing Date: Fri, 14 Oct 2005 23:24:42 +0200 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 151.28.103.212 Message-ID: <43502184@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1129324932 151.28.103.212 (14 Oct 2005 14:22:12 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!hwmnpeer01.lga!hwmedia!feed7.newsreader.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail