Re: How can I implement IOleCommandTarget?
From: Kim Gräsman (kim_at_mvps.org)
Date: 09/29/04
- Next message: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Previous message: Mervin Williams: "Re: Unsatisfied forward declaration?"
- In reply to: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Next in thread: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Reply: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Sep 2004 20:46:07 +0200
Igor, et al,
> > You need STDMETHOD() in the header, STDMETHODIMP
> > goes in the CPP file.
>
> STDMETHODIMP happily works in both places. You only need STDMETHOD when
> defining your own interface. The only difference between the two is that
> STDMETHOD adds "virtual" in front, which is needed when you define a
> method but not when you override one from the base class.
Yeah, I guess ATL-style Impl-classes need STDMETHOD, since they are derived
from, and their methods can be overridden. I always use STDMETHODIMP as
well, since most of what I write is at the bottom of the inheritance chain
(barring CComObject).
Might be worth to keep in mind, though, that if you're building a class to
be derived from, STDMETHOD is the better choice (unless I've misunderstood
the state of affairs).
-- Best regards, Kim Gräsman
- Next message: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Previous message: Mervin Williams: "Re: Unsatisfied forward declaration?"
- In reply to: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Next in thread: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Reply: Igor Tandetnik: "Re: How can I implement IOleCommandTarget?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|