Solved TD-21437: Modal Dialog with MessageBox is no longer modal

Report TD 5.x and 6.x bugs and possible workarounds.
Christoph
Germany
Posts: 11
Joined: 13 May 2019, 11:33
Location: Germany

TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Christoph » 01 Dec 2014, 13:22

Hello Supporters!
I'm creating a modal Dialog with SalModalDialog( ... )
Whenever a MessageBox is called within SAM_Create the Dialog isn't modal anymore.
In my example you are able to open several 'modal' dialogs which don't prevent activating the calling form window but the other dialogs.
A sample is attached. I'm using cbi62 SP2 Build 41010, german Windows 7.

Best regards
Christoph Spangehl
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Dave Rabelink » 01 Dec 2014, 14:00

Ay, that is a severe one !

I tested this on the latest TD 6.2 SP2 UPD2 build 42744 and issue is present there also.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Dave Rabelink » 01 Dec 2014, 14:10

As a temporary workaround you could use the WinApi msgbox.
(which solves another issue that the SalMsgBox is not displayed on top of a TOPMOST window, but beneath it which will block your application).

See attachment.
ModalDialogWithMessageBox_workaround.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Christoph
Germany
Posts: 11
Joined: 13 May 2019, 11:33
Location: Germany

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Christoph » 01 Dec 2014, 15:13

Thank you Dave,
as a workaround it is good enough for me to call the MessageBox in SAM_CreateComplete :D
The problem was to isolate the problem.

Maybe your workaround will help me with another issue that I found 3 minutes ago. This one will be harder...

Bye
Christoph

-- 10 minutes later: I think I will replace all SalMessageBox with yours ...

User avatar
markus.essmayr
Austria
Posts: 892
Joined: 06 Mar 2017, 06:07
Location: Austria

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by markus.essmayr » 02 Dec 2014, 07:57

Good morning,

please keep in mind, that the Win API message box is NOT themed!

Max
Markus Eßmayr
teamdeveloper@t-mx.com

Christoph
Germany
Posts: 11
Joined: 13 May 2019, 11:33
Location: Germany

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Christoph » 02 Dec 2014, 10:02

thanks, I was wondering about the difference...

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Dave Rabelink » 03 Dec 2014, 16:42

Just to inform you that this issue is entered as defect by Gupta:

TD-21437: Displaying a message box within a modal dialog makes it modeless


Furthermore, two other SalMsgBox issues are registered as defect:

TD-21428: SalMessageBox does not take TOPMOST style into account

(this issue is about SalMessageBox not being displayed on top of a TOPMOST modeless dialog. It is displayed beneath the dialog so when the msgbox is completely obscured the application is blocked)

and

TD-21427: SalMessageBox not centered on modeless dialogs

(this issue is about SalMessageBox not being centered on the calling modeless dialog, but is centered on screen)
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Dave Rabelink » 11 Mar 2015, 10:12

Just to inform you that this issue
TD-21437: Displaying a message box within a modal dialog makes it modeless

has been fixed in TD62 SP3r UPD1


The issues:
TD-21428: SalMessageBox does not take TOPMOST style into account
TD-21427: SalMessageBox not centered on modeless dialogs

Are planned to be fixed in TD62 SP3r UPD2
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-21437: Modal Dialog with MessageBox is no longer modal

Post by Dave Rabelink » 06 May 2015, 06:51

Just to inform you that this issues

TD-21428: SalMessageBox does not take TOPMOST style into account
TD-21427: SalMessageBox not centered on modeless dialogs

have been fixed in TD62 SP3r UPD2
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 4 guests