User Profile

Collapse

Profile Sidebar

Collapse
dshin
dshin
Last Activity: Dec 9 '08, 08:56 PM
Joined: Sep 12 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dshin
    replied to custom exit of MFC modeless dialogs
    in C
    Never mind, figured it out: just needed to override OnCancel().
    See more | Go to post

    Leave a comment:


  • dshin
    started a topic custom exit of MFC modeless dialogs
    in C

    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...
    See more | Go to post

  • dshin
    replied to Variadic template functions
    in C
    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?...
    See more | Go to post

    Leave a comment:


  • dshin
    replied to Variadic template functions
    in C
    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.
    See more | Go to post

    Leave a comment:


  • dshin
    started a topic Variadic template functions
    in C

    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
    ...
    See more | Go to post
No activity results to display
Show More
Working...