I notice that, in addition to the legacy DialogItemMessage and related C-style structs, there is a C++ DialogItemHookHandler class that has various methods to respond to dialog events. See header file dlogitem.h .
However, there's no SDK example that…