All WinBinder functions return a value. If there is no meaningful value to return, a boolean is returned: TRUE if the function is successful, FALSE if failed.
Multiple values are returned as arrays. For example:
|
WinBinder functions are generally multi-purpose, being able to perform similar operations on several control classes. This allows several Windows functions and messages to use a single function. This also reduces the function count, processing many different Windows functions and messages, according to the object being affected. This makes Windows programming much simpler than usual. For example, see the code below:
|
To further simplify the code, optional function arguments with default values are used abundantly in WinBinder. For example:
|
Another important way to reduce code size and ease maintenance is trying to use the value returned from one function as a parameter for another function whenever possible. For example:
|
Also, care has been taken to ensure that function parameters and return values follow some common PHP conventions, written or not. For example, the function calls
|
will always return a / or \ character appended to them because this is how paths are generally used in PHP.
How WinBinder works
Naming conventions