int main() { Application app; OpenFileCommand command( &app ); Widget widget; widget.SetCommandListener( &command ); widget.SendClick(); return 0; }