class AFX_EXT_CLASS foo
{
... blah...
};
now, these two files reside in a common folder for me to use, or so I would
like, in other projects as I see fit. The wrinkle is, I would like to have
the ability to include this class in a project directly (sans DLL business)
as an initial attempt, I did try
#ifdef _NOT_IN_DLL
#undef AFX_EXT_CLASS
#endif
class AFX_EXT_CLASS foo
{
... blah...
};
but that does not work. And yes, I see that by doing that I would screw
that definition up for the remainder of the program and likely hose up any
other DLLs I might be using, or trying to. That said, I was trying to see
if that worked at all. VC08 totally ignored that I JUST undefined
AFX_EXT_CLASS and just went on about its business telling me how stupid I
am.
So.. can this be done? And have I explained what I am trying to do
thoroughly enough?
thanks for your help
Andy
>hello,
> I was curious if anyone has ever done the following and if so, how. I
>have a class written in a .cpp and .h file. Currently, this class is a
>member of an MFC extension DLL project, so I have the AFX_EXT_CLASS macro
>before the name of the class
>
>class AFX_EXT_CLASS foo
>{
>... blah...
>};
>
>now, these two files reside in a common folder for me to use, or so I would
>like, in other projects as I see fit. The wrinkle is, I would like to have
>the ability to include this class in a project directly (sans DLL business)
>
>as an initial attempt, I did try
>
>#ifdef _NOT_IN_DLL
> #undef AFX_EXT_CLASS
>#endif
****
This would not make any sense whatsoever. It guarantees that the compilation will fail
because the symbol is not defined.
If you wanted it to go away, you could use
#define AFX_TEXT_CLASS
which would give it an empty body.
If you want to make this local to the header file, you would use
#pragma push_macro("AFX_EXT_CLASS")
#define AFX_EXT_CLASS
...stuff
...end of everything interesting
#pragma pop_macro("AFX_EXT_CLASS")
that will preserve the integrity of the macro elsewhere
joe
****
>
>class AFX_EXT_CLASS foo
>{
>... blah...
>};
>
>but that does not work. And yes, I see that by doing that I would screw
>that definition up for the remainder of the program and likely hose up any
>other DLLs I might be using, or trying to. That said, I was trying to see
>if that worked at all. VC08 totally ignored that I JUST undefined
>AFX_EXT_CLASS and just went on about its business telling me how stupid I
>am.
>
>So.. can this be done? And have I explained what I am trying to do
>thoroughly enough?
>
>thanks for your help
>
>Andy
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
I am using windows xp sp2 which have been installed the latest version of
Microsoft Internet Explorer 8. I create a mfc project which used Microsoft
's WebBrowser control. i need catch the DocumentComplete event. but the
DocumentComplete event does not fire when WebBrowser is not visible. I have
tried to use the solution in article
http://support.microsoft.com/kb/259935/en-us/,but the problem is still
exist. why?,is there any solutions in windows xp sp2.
any suggestions is appreciate.
thanks.
best wishes.
Did you make the IE control visible after moving it off the screen? The
Visible property must be set to true.
-- David
I am using windows xp sp2 which have been installed the latest version of
Microsoft Internet Explorer 8. I create a mfc project which used Microsoft
's WebBrowser control. i need catch the DocumentComplete event. but the
DocumentComplete event does not fire when WebBrowser is not visible. I have
tried to use the solution in article
http://support.microsoft.com/kb/259935/en-us/,but the problem is still
exist. why?,is there any solutions in windows xp sp2.
any suggestions is appreciate.
thanks.
best wishes.
"sunny" <sound_o...@hotmail.com> wrote in message
news:11D5C414-C159-4DA5...@microsoft.com...
"Sheng Jiang [MVP]" <sheng...@hotmail.com.discuss> wrote in message
news:F845DBF2-23F4-4243...@microsoft.com...