- this doesn't work giving a "non-composited" look with ugly
bacjground rects around all the controls:
Declare Function ChangeWindowAttributes Lib "Carbon" (window
as WindowPtr, setTheseAttributes as Integer, clearTheseAttributes as
Integer) as Integer

- MacProcID=5 and frame=MetalWindow doesn't work for me giving a
window where most controls don't show

Thx anyway Folks, cosmetics was never RB's forte anyway.
P.


On 1/18/07, Terry Ford <[EMAIL PROTECTED]> wrote:

On Jan 18, 2007, at 3:01 PM, Peter K. Stys wrote:

> I have a metal window and when I call:
>
> myMetalWindow.showmodal
>
> it appears but is not modal, wreaking havoc with my app if the user
> closes windows behind its back.

But ShowModal doesn't make a window modal. I wish people would
understand that fact. ShowModal just stops the execution of the code
in the calling method.

To get a modal window you must select it's Frame type in the IDE.

To get a modal metal window you must use a declare to alter the
appearance of a regular Modal window.

The following Declare in the Open event of a MoveableModal window
will work. The other Modals don't seem to.


  Const attrib = 256
   Dim err As Integer
   #If TargetCarbon
     #If TargetMachO
       Declare Function ChangeWindowAttributes Lib "Carbon" (window
as WindowPtr, setTheseAttributes as Integer, clearTheseAttributes as
Integer) as Integer
     #else
       Declare Function ChangeWindowAttributes Lib
"CarbonLib" (window as WindowPtr, setTheseAttributes as Integer,
clearTheseAttributes as Integer) as Integer
     #endif
   #endif

   err = ChangeWindowAttributes(self, attrib, 0)

This is in complete contradiction of Apple's HIG which say that Modal
type windows should NOT be metal. I quote:

"Don't use it for supporting windows, such as preferences and other
dialogs."

-Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



--
-------------------------------------------------------------------------------
Peter K. Stys, MD
Professor of Medicine(Neurology), Senior Scientist
Ottawa Health Research Institute, Div. of Neuroscience
Ottawa Hospital / University of Ottawa
Ontario, CANADA
tel:    (613)761-5444
fax:    (613)761-5330
http://www.ohri.ca/profiles/stys.asp
-------------------------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to