LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Sun Mar 15, 2015 3:32 pm Post subject: |
|
|
Well I can't find it anywhere either, but I did when I mentioned it.
At the time I was puzzling over the two kinds of handles. I seem to remember being on the verge of understanding.
1. A Windows handle
2. A Clearwin+ handle
A Windows handle is given back to the program by windows every time a window (obviously) or any single control in a window is created. In early Windows versions these were called resources, and they were strictly rationed, and Windows would crash if it ran out! This is the handle that you get given with %lc, %lw or %hw.
Clearwin+ is a wrapper for some of the more complex aspects of the Windows GUI, andmost of the time it shields the Fortran programmer from some of the complexities such as handles.
Now, just as every window and control needs an identifying number (handle) so do the complicated things created by Clearwin+ from Windows primitives. The originators could have done the same as Windows does, and returned a handle every time a %gr was invoked, but no, they want the programmer to specify it - that makes it, by analogy, like a Fortran i/o unit number!
Clearwin+ doesn't need the handle (of either type) every operation: you use the Clearwin+ handle to set or reset the current graphics object, just like most of the time Clearwin+ hides the complexities of Windows handles and positioning of controls. If you only ever use one %gr object you can forget about it. |
|