Inherit wxFileDialogCustomControl from wxEvtHandler to allow Bind()ing to events on it and use this to handle wxEVT_BUTTON and wxEVT_CHECKBOX in the sample. And inherit from IFileDialogControlEvents in wxMSW code to actually generate these events when they happen.