View previous topic :: View next topic |
Author |
Message |
srfpala
Joined: 20 Aug 2014 Posts: 12
|
Posted: Sat Sep 20, 2014 12:19 am Post subject: why not the X |
|
|
Seems to me that I ought to have the Windows Title Bar X (Kill)
available to use. But I don't - which seems strange.
How is this feature shown but made non functional.
Just curious.
BYW the Silverfrost app is excellent!
Bob |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Sat Sep 20, 2014 7:43 am Post subject: |
|
|
Bob,
you create the window with
j = winio@(%ca[Title] ......... )
Then if you click X, j has the value zero. Therefore in the following line you can do something like
if (j == 0) return
Wilfried |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sat Sep 20, 2014 6:58 pm Post subject: |
|
|
Just to enlarge on what Wilfried has said, many controls can have a callback function to service that control when it is selected, and some types of controls MUST have a callback (e.g. menus) and some can be specified without a callback - usually %bt buttons. The Close Window X is an example of that. Because WINIO@ is a function, it returns a value that can be tested for in the code that follows the last WINIO@. The codes start at zero (for the close X) and are assigned one by one to the controls as Clearwin+ set them up.
You probably need an introduction to %ww and %sy as well, if you want to produce the normal appearance of a master window, but do beware of generating the system menu on dialog boxes as that permits the user to maximise them.
Eddie |
|
Back to top |
|
|
|