Klar kann man.

Sub SetWindowModified(w as Window, b as Boolean)
    #if TargetMacOS then
      Dim osErr As Integer
      dim v as variant

      #if TargetCarbon then
Declare Function SetWindowModified Lib kCarbonCompatibility (window As WindowPtr, modified As Integer) As Integer
      #else
Declare Function SetWindowModified Lib "WindowsLib" (window As WindowPtr, modified As Integer) As Integer
      #endif // TargetCarbon

      v=b
      osErr=SetWindowModified(w,v)
    #endif // TargetMacOS
End Sub


Und diese Funktion kannst Du nehmen, ob den aktuellen Status des Fensters abzufragen.

Function GetWindowModified(w as Window) as Boolean
    #if TargetMacOS then
      #if TargetCarbon then
Declare Function IsWDirty Lib kCarbonCompatibility Alias "IsWindowModified" (wPtr as WindowPtr) as Boolean
      #else
Declare Function IsWDirty Lib "WindowsLib" Alias "IsWindowModified" (wPtr as WindowPtr) as Boolean
      #endif // TargetCarbon

      Return IsWDirty(w)
    #endif // TargetMacOS

  #endif // Target68k
end Function


Gruß
Christian

--

----------------------------------------
Christian Dorn
Email: [email protected]

REALbasic 2007.3 Pro
iMac 3.06 GHz Intel Core 2 Duo, 4 GB RAM
PowerMac G5 2x2GHz, 1.5 GB RAM
----------------------------------------

Am 29.01.2009 um 11:14 schrieb Mike Ott:

Guten Tag allerseits

Kann man eigentlich den roten Schliessknopf oben links bei jedem Fenster mit einem Punkt versehen? Viele Apps zeigen ja einen dunklen Punkt im roten Kreis wenn ein File noch nicht gespeichert ist. Kann man das mit Realbasic
nutzen oder nur mit Plugin?

Gruss
Mike





Antwort per Email an