Intercepting messages inside `IsDialogMessage`, installing the message filter
Summary
The post explains how to intercept dialog messages in Windows using IsDialogMessage and a MSGFILTER hook to catch ESC and route it to a custom handler. It provides a first approach based on a global dialog handle and a custom DM_ESC_PRESSED message, then discusses pitfalls around threading and multiple dialogs, offering thread_local as a potential fix. It highlights the complexity of dialog state management when customizing message processing.