User Profile
Collapse
-
Never mind, figured it out: just needed to override OnCancel(). -
custom exit of MFC modeless dialogs
I created a dialog-based MFC application. The initial dialog has a button, which when pressed, constructs and displays a new modeless dialog. When I click the top-right "X" on this modeless dialog, I wish to do some custom-clean-up. I cannot figure out how to do this.
I believe the right way to do it is to override the virtual function PostNcDestroy() , and to somehow intercept the event corresponding to the click of... -
It seems to me then that I'd need the specialized template to rewrite the entire class Template<Bar>, just to add the one extra method, which is not nice.
So that gets me thinking that I'd need to create a SpecializedTemp late<Bar> class to inherit from Template<Bar>, in order to add the extra method() without rewriting the rest of Template<T>.
Is that what you are suggesting?...Leave a comment:
-
I realized my use of "variadic" is a little misleading here - the underlying methods themselves are not variadic.
Basically, I want Template::metho d() to pass its arguments on to an appropriate constructor. The variadicity comes from the fact that the different constructors do not share the same signature.Leave a comment:
-
Variadic template functions
Is it possible to create a a variadic template function? Something like this:
Code:class Foo { ... Foo(int x); ... }; class Bar { ... Bar(int x, double y); ... }; template<typename T> class Template { ... static void method(...) { T t(...); // variadic call ... } }; int
No activity results to display
Show More
Leave a comment: