PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Anonymous on January 05, 2006, 12:30:53 AM

Title: MDI Modal Form
Post by: Anonymous on January 05, 2006, 12:30:53 AM
I'm having problems making a form modal in MDI mode.

I'm doing this in WM_COMMAND (toolbar button):

IF wID = IDC_MDIFORM_TOOLBAR1_BUTTON3 THEN BEEP : MDITEST_SHOW (HWND_MDIFORM_MDICLIENT, %TRUE)

It always seems to freeze it.  It works if I use %FALSE, but this defeats
the purpose :)

I have been trying out various options, but I'm stuck.  Is it possible to do
this with MDIs?

Thanks!

John
Title: MDI Modal Form
Post by: TechSupport on January 05, 2006, 11:16:55 AM
Hi John,

I just did a quick test and it appears that it will work if you make the main window the parent instead of the client window. For example, use the following:

MDITEST_SHOW (HWND_MDIFORM, %TRUE)
Title: MDI Modal Form
Post by: Anonymous on January 05, 2006, 07:55:12 PM
I had tried that too, but it still didn't work.  I didn't mention this in my
original post, but I had the MDIChild to true.  When I turned it to false
this worked.  Is this the correct way to do it?

Thanks!
Title: MDI Modal Form
Post by: TechSupport on January 06, 2006, 12:07:10 AM
Yes, that is correct. MDI child forms can not be modal. They will always display as non-modal.
Title: MDI Modal Form
Post by: Anonymous on January 06, 2006, 12:50:16 AM
Cool.  Thanks Paul. :)