BBGadTools

=BBWindowCloseHit()


Description:

With this Command can you checking the CloseGadget of current Window.
If a Window is opened, the CloseGadget showings locked. If you check
now with "BBWindowCloseHit()" the State, the CloseGadget will now showing
unlocked. If this Command is no longer running, the CloseGadget will again
showing locked. Two Values can this Command returns.:

0 = CloseGadget was not Clicked.
1 = CloseGadget was Clicked.

Parameter:

None!

Example:

BBScreenMode(2) ; Open a Screen in 800x600
BBScreenBar("MyTitleName")
BBOpenWindow(80,80,400,200,"MyWindow")
Repeat
BBShowMouse() ; Show MousePointer!
BBWindowMove() ; Checking for Window Movement!
a=BBWindowCloseHit() ; Check if CloseGadget was Clicked!
if a=1 then BBCloseWindow()
Until KeyDown(1) ; Wait for [ESC]!
Include "C:\BBGadTools.bb"

Back to the Menu