| |
|
|
| Systemmenü Menü erweitern aus der XProfan-Hilfe: KompilierenMarkierenSeparieren-Begin-----------------------------------------------------------------
-Header-Datei--------------------------------------------------------
$H Windows.ph
-Konstantendeklaration-----------------------------------------------
Declare False&
False& = 0
Declare True&
True& = 1
-Variablendeklaration------------------------------------------------
Declare Windowname$
Declare Ok%
Declare Hwin&, Hsystemmenu&
Declare About#
Dim About#, 255
-Init----------------------------------------------------------------
Proc Init
-CreateWindow------------------------------------------------------
Windowstyle 280
Windowtitle "Menu Test"
Window 100, 100 - 200, 200
Hwin& = @Findwindow("Menu Test")
-AddSystemMenu-----------------------------------------------------
Hsystemmenu& = ~Getsystemmenu(Hwin&, False&)
~Appendmenu(Hsystemmenu&, ~Mft_separator, 0, 0)
String About#, 0 = "&About"
~Appendmenu(Hsystemmenu&, ~Mft_string, 1, About#)
~Drawmenubar(Hwin&)
Endproc
-Main----------------------------------------------------------------
Proc Main
Clear Ok%
Whilenot Ok%
Waitinput
If @Menuitem(-4000)
Ok% = 1
Elseif @Menuitem(1)
@Messagebox("System Menü Test", "About", 64)
Endif
Endwhile
Endproc
-Done----------------------------------------------------------------
Proc Done
Dispose About#
@Destroywindow(Hwin&)
Endproc
-Main----------------------------------------------------------------
Init
Main
Done
-End-------------------------------------------------------------------
End
|
|
|
| |
|
|