of course, it is somehow possible to access the current Dialog from the C code within your Device Driver.... but let me highly recommend to do that NOT.
A device should never have any knowledge about the GUI implementation! Just let the device provide the information and let react the GUI accordingly.
Therefore, let me recommend the chapter System Event and System Event Handler - they describe how you can inform your GUI about some external state which may happen randomly.
I hope this helps to find an appropriate and maintainable software architecture.