| Предыдущий | Следующий |
| ERROR_TIMEOUT | ERROR_INCORRECT_SIZE |
ERROR_INVALID_MONITOR_HANDLE
Что означает ERROR_INVALID_MONITOR_HANDLE
ERROR_INVALID_MONITOR_HANDLE — недопустимый дескриптор монитора.
Что проверить
Зафиксируйте HWND/объект интерфейса, поток UI и вызов, вернувший код.
- Проверьте существование объекта, его владельца/родителя и допустимость операции для текущего стиля, режима или потока.
- Для monitor/color/format ошибок отдельно сверяйте возможности выбранного устройства и фактический формат данных.
Исходная формулировка
A monitor API received an invalid or stale HMONITOR value.
a display is disconnected, disabled, or reconfigured
Choose the monitor nearest the current window or fall back to the primary monitor according to product policy. Recalculate work area, DPI, and placement before showing the window. Avoid restoring coordinates solely from a removed monitor; clamp the result so the interface remains reachable.
A laptop application stores an external monitor handle and later resumes after undocking. It calls GetMonitorInfo with the stale handle and gets 1461. Reacquiring the nearest monitor from the restored window rectangle places the window on the built-in display.
an arbitrary integer or display-device index is cast to HMONITOR
Технические ссылки
Нужно найти другой код? Найти другой код состояния или ошибки.
