🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Modal forms in modalless forms

#15138
From: Remy Lebeau (TeamB)
Date: Wed, 16 Jul 2003 16:46
30 lines
2104 bytes
"Moshe Shahar" <msachar@tiogatech.com> wrote in message
news:3f151179@newsgroups.borland.com...

> I add a modalless form to my app with WS_EX_APPWINDOW ExStyle
> and with the desktop window as parent.
>
> Now, I have 2 buttons on the task bar window.
> One for the MainForm and one for the new form (lets call it MyForm).
>
> So, where is the problem ?

There is no problem.  It is doing exactly what it is supposed to be doing.
You altered a form to be an AppWindow and with a different parent window.
Those are exactly the criteria needed for making a secondary form have its
own TaskBar button and minimize/maximize independantly of the rest of the
application.

> The problem is that when I show a modal form or msg box
> from the MyForm the MainForm pop up to the front and the
> modal form appear on it, and when it closed the MyForm
> return to the front.

Modal forms, Application->MessageBox(), ShowMessage(), MessageDlg(), etc.
are all tied to the main application, but you created a new form that is
separate from it instead.  Try using just the Win32 API MessageBox()
directly.


Gambit
Technical Details
Message-ID: <3f15801b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f151179@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,34b8c1844f10f9f0
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-16 10:10:39 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f151179@newsgroups.borland.com>
Subject: Re: Modal forms in modalless forms
Date: Wed, 16 Jul 2003 09:46:13 -0700
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f15801b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1058373659 207.175.226.26 (16 Jul 2003 09:40:59 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail