|
Jay03 wrote: Could it because the precompiled header feature was on without including stdafx.h (#include "stdafx.h")
Yes. If your project settings say that you are using precompiled headers, but you don't include stdafx.h, you will get that error.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Great!
Thanks Zac
|
|
|
|
|
Hi,
I have a very strange problem:
In filter graph I have 3 filters (among the rest) connected in a row. When I try to
reconnect the first to the second I get a S_OK code that means that it was successful.
When I try to check if the pins are connected right afterwards - I get a E_NOT_CONNECTED
error.
Does anyone have any insight on this? I'd highly appreciate any help.
Thanks.
|
|
|
|
|
if the 3 filters are connected in a row, a->b->c and now you want to connect a->c then I think you need to disconnect the a->b pins before trying to connect a->c pins.
I'm assuming here that you have not 'run' the graph after connecting a->b->c so I'm a little curious why you connect the 3 in a row to begin with
cje
|
|
|
|
|
I have some objects derived from CObject. The topmost non-abstract classes have the
IMPLEMENT_SERIAL (CNewClass,CImmediateBaseClass,VERSION_SCHEMA)
and
DECLARE_SERIAL (CNewClass)
in their respective places. All appears to work well when project set to "Use MFC in a shared dll" but when I try "Use MFC in a static library" I get an error for my IMPLEMENT_SERIAL code sections that says...
NewClass.cpp(4) : error C2039: 'classCImmediateBaseClass' : is not a member of 'CImmediateBaseClass'
NewClass.h(8) : see declaration of 'CImmediateBaseClass'
NewClass.cpp(4) : error C2065: 'classCImmediateBaseClass' : undeclared identifier
Context:
Visual C++ 2003
Any ideas on what I might be missing?
|
|
|
|
|
bob16972 wrote: All appears to work well...
Are you sure? What does the code containing IMPLEMENT_SERIAL() and DECLARE_SERIAL() look like?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I probably should have said bottomost instead of "topmost". It is in the last derived class for clarification.
The base class has virtual functions, a class is derived from it. It has some virtual functions and it's serialization procedure calls the base class first, then it serializes itself. A class is then derived from that and provides implementations for all the virtual functions and it calls the immediate base class serialization method and then it's own. This last class is the only class that has the IMPLEMENT_SERIAL and DECLARE_SERIAL macros.
The serialization process was tested incrementally long ago as it was being built. It preserved all the fields being serialized on the stream. It is doing so today when using "shared" MFC. I was just trying to put it together for deployment and instead of redistributing the MFC 7.1 merge modules (.msm) in my MSI, I thought I'd try something different and statically link MFC in but hence, the errors jumped out. That is where I'm at now.
I may have some fundamental flaw in all of that but it "appears" to work as it always has when using MFC in a shared dll(s). I'm just checking here to see if it's commonplace to statically link, with an application that uses MFC serialization, and not have any problems or whether it's some common mistake that everyone (except me) knows about.
I'm not sure if that helps but wasn't not quite sure what you were getting at...
|
|
|
|
|
Thanks again for your assistance.
Viorel got me going down the road to recovery (I hope)
|
|
|
|
|
I think the base class should derive from CObject (or other) and should have definitions like
IMPLEMENT_SERIAL(CImmediateBaseClass, CObject, VERSION_SCHEMA)
and
DECLARE_SERIAL(CImmediateBaseClass)
(Or maybe just xxx_DYNCREATE or xxx_DYNAMIC ).
I hope it helps.
-- modified at 13:16 Tuesday 25th July, 2006
|
|
|
|
|
My base class has one pure virtual function. If I try that I get "cannot instantiate abstract class"
Although, thanks for the comments
|
|
|
|
|
Then try DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC macros in case of base class:
class CImmediateBaseClass : public CObject
{
DECLARE_DYNAMIC(CImmediateBaseClass)
virtual void f() = 0;
};
. . .
IMPLEMENT_DYNAMIC(CImmediateBaseClass, CObject)
I hope it works.
|
|
|
|
|
I got rid of the pure virtual function (well, not get rid of but made less than pure) and then I was able to put those macros at every level and it let me static link to MFC and it "appears" that the serialization is working correctly but a thorough analysis will probably be needed but you got me past that brick wall at a minimum.
Thanks Viorel!
-- modified at 13:54 Tuesday 25th July, 2006
|
|
|
|
|
How does an SMPT server work? When I use a SMTP client to connect to the SMTP server, how does it send the message later? How do the SMTP server and the target server (the mail server of the recipient) communicate?
modified 9-Mar-17 17:15pm.
|
|
|
|
|
Check out the O'Reilly book on sendmail.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
See here and here.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Daniel Kanev wrote: how does it send the message later? How do the SMTP server and the target server (the mail server of the recipient) communicate?
Is tanbaum book and white papers is of any help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
errors while compiling for 64 bit.
1. DWL_USER' : undeclared identifier
2. GWL_WNDPROC' : undeclared identifier
3. 'GCL_WNDPROC' : undeclared identifier
these are used in SetWindowLong but I don't know why these are giving errors all the files are included properly.
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
Have you looked in the (winuser.h) header file to see if there are any preprocessor directives in/around those identifiers?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all...
Is there any library that can be used to perform animated image transition, like those on power point presentation? For example, when I load several JPG files, the dialog shows the first image. If I click, say, "Next picture" button, the dialog shows the next image with animated transition like blurring or sliding, etc.
Thank you...
-Houari
|
|
|
|
|
Im not sure but I think you can find your answer in directx
|
|
|
|
|
I'm new to MFC and started developing applications just a few months back. I'm trying to build an application using which I can read a word document and get the information that I need.
Can anyone tell me how can I perform simple file operation on a word document similar to text files like Getline()? Something similar to C or C++ file operations.
Thanks,
Gajendra
|
|
|
|
|
I don't know that the doc format is well documented. I'd suggest using Word through COM to read / write the files, though this will require that Word be installed on the same machine as your program.
earl
|
|
|
|
|
earl wrote: though this will require that Word be installed on the same machine as your program
AFAIK, you don't need to install word on the target computer. Just a simple dll (don't remember its name) will be ok.
|
|
|
|
|
It is not that easy. A word document has a very specific format and you won't be able to read it like that. You need to go for Word automation (search this site or google or MSDN to learn how it works).
|
|
|
|