ENUM_GUI_ERR_CODE
| Code | Constant | Description |
|---|---|---|
| 0 | GUI_ERR_NO_ERROR |
Success. |
| -1 | GUI_ERR_INVALID_HANDLE |
Bad gui_id or object handle; also returned by guiGetLastError for unknown gui_id. |
| -4 | GUI_ERR_NO_DATA |
No data for requested property/index. |
| -9 | GUI_ERR_INVALID_PARAM |
Invalid parameter or index. |
| -11 | GUI_ERR_NOT_SUPPORTED |
Property or operation not supported for this type. |
| -12 | GUI_ERR_INVALID_RADIO_GROUP |
Radio group id not allocated (value still stored). |
| -100 | GUI_ERR_UNKNOWN |
Unclassified failure. |
string guiErrorDescription(int err_code); // e.g., "GUI_ERR_INVALID_HANDLE"
Return Convention (decision Tree)
After any gui* call:
│
├─ Value getter? (guiObjectGetInteger/String, guiObjectsTotal, guiObjectHandle, guiAdd/guiAddMenu on failure)
│ ├─ Check guiGetLastError(gui_id)
│ ├─ GUI_ERR_NO_ERROR → success (even if value is 0, empty, -1 for dropdown sel, etc.)
│ └─ non-zero → failure; returned value is neutral (0, "", 0 handle)
│
├─ Bool action? (guiObjectSet*, guiRemove, dropdown row helpers)
│ ├─ true → GUI_ERR_NO_ERROR
│ └─ false → inspect guiGetLastError
│
├─ Bool predicate? (guiIsClicked, guiHasRestoredState, GUI_OBJPROP_CHECKED/ENABLED reads)
│ ├─ Both true and false can be valid → GUI_ERR_NO_ERROR on success
│ └─ non-zero last error → real failure
│
└─ guiGetLastError with bad gui_id → always GUI_ERR_INVALID_HANDLE (-1), never 0
guiDeinit has no return value.