extending save_dlg

  • Anonymous - 2004-12-11

    How do you extend from save_dlg (or any other window class that has a non-default constructor)?

    • Steven Weiss

      Steven Weiss - 2004-12-14

      you just do this:

      struct some_wnd : wnd_extend<window_base, some_wnd>
      some_wnd(int arg1);

      -> your class
      struct derived_wnd : wnd_extend<some_wnd, derived_wnd>
      derived_wnd() : wnd_extend<some_wnd, derived_wnd> (0)

      // or easier (though this doesn't work for multiple inheritance):
      derived_wnd() : extend_base(0)


      wnd_extend passes the arguments to the c'tor of some_wnd. wnd_extend itself has a templated c'tor with up to 6 parameters (so that's the limit of some_wnd's c'tor!)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks