|
unresolved external symbol: something is missing
._WndProcThunkProc: that the name of it
I guess you missed including some ATL-libs in the project settings
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I think the out and input should be exchanged for stream in STL.
Take cin for example, the stream is from cin to memory,
just as the code shows:
cin >> i;
The stream is out from cin, so I think the name should be cout (relative to itself), then the code will be:
cout >> i;
Simpler, isn't it?
|
|
|
|
|
No. cin == "console input", cout == "console output". The stream names define the flow of information relative to the program, rather than from the stream's point of view.
I doubt you'll find any programming language where sending data to a stream is described as 'input' rather than 'output'.
|
|
|
|
|
I think 'relative to the stream' is better than
'relative to others'.
It's OO, isn't it?
|
|
|
|
|
followait wrote: I think 'relative to the stream' is better than 'relative to others'.
So...the stream should be named relative to itself? In that case it should be called 'me'. In fact, every object, if named relative to itself, should be called 'me'.
No - names of objects are selected based on the programmers viewpoint - which is the program. cin is your program's viewpoint of console input, so its name ought to reflect that. Similarly, cout is your program's viewpoint of console output.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I tried as below, but ostream cannot be instantiate?
ifstream ifs1("file1");
ifstream ifs2("file2");
ostream oss;
oss << ifs1 << ifs;
|
|
|
|
|
ostream is an abstract base class - that's why you can't instantiate it. Also, you can't use the insertion operator on streams to get what you're wanting.
So...what do you mean by "memory binary stream"? If you were using strings, then this should work:
ifstream ifs1("file1");
ifstream ifs2("file2");
ostringstream oss;
std::copy(std::istream_iterator<char>(ifs1), std::istream_iterator<char>(), std::ostream_iterator<char>(oss));
std::copy(std::istream_iterator<char>(ifs2), std::istream_iterator<char>(), std::ostream_iterator<char>(oss));
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
i have a composite control wich include progress bar and button, now the problem is
how can i draw same text on top of my progress bar. (m_MyProgress.SetWindowText("XXXX"))
has no effect!
any ideas?
Best Regards,
komofilms
|
|
|
|
|
You need to subclass the progress bar and override its WM_PAINT handler to draw the text - it won't do that by default.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Please help to create the machine certificate as I am working on AD RMS,I have installed the Virtual PC now I want to beging with coding in AD RMS project ........So I need to create Machine certificate and to have RAC..............
Help me Out ................
|
|
|
|
|
Your question has nothing to do with ATL/WTL/STL. In addition it seems that you have asked this same question several times. I have given you a generic answer[^] in the past. In the future you need to be more specific and describe the problem you are having with greater detail.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
I have created ATL project as a server (.exe) and add Simple Object in it with Aggregation,SupportInfo,Connectable objects. Now I trying to write Addin for Word,Exccel and PPT. I have created same project for all three applications. Now I want add these 3 applications interfaces and events in a single application, which i created first. Now I am trying to add Interfaces of Word into a main file by adding its interfaces and events information in mail applications .h file. I am expecting it should create .idl from it and it will contain all the interfaces of word.
But the problem is when I am compiling the code it first overrites the .h file where I have added Interface and events for word. Also I have added _cp.h, .h and .rgs files for word but it gives me following error
"error MIDL2337 : unsatisfied forward declaration :" or undeclared interfaces.
Pls let me know how can i add all these three applcaitons Interfaces and events into a single application.
Thanks
SNI
|
|
|
|
|
SNI wrote: I am expecting it should create .idl from it and it will contain all the interfaces of word.
What makes you think that? YOU create the IDL in an ATL project and IDL generates the C and H files.
Do you actually need the Word, Excel and PowerPoint items in the IDL? If not, then I'd use #import[^] in the .cpp file to reference them.
|
|
|
|
|
Hi,
I have a simple ATL server project created with VS2008 (e.g. IDummy)
with an connection point event (e.g. Fire_test) and a stand-alone thread.
My thread should notify all connected clients with the specified event.
How can I accomplish this?
Maybe using EnumConnectionPoints, but how?
Any examlples?
Thx in advance
|
|
|
|
|
a) make sure the ATL server uses an appropriate threading model (e.g. free threading)
b) Make sure the thread has a pointer to the C++ class instance underlying your COM object.
c) call the COM object's Fire_test method.
The important thing is to make sure teh thread has visibility of the C++ object instance, not just the COM interface pointers - otherwise, it won't see the Fire_test method.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Hey, guys.
I'm chasing some DEP voodoo with an IE add on and older versions of ATL have known issues in this regard. What I need to do is configure the project to specifically use ATL version 8 and nothing older, but for some reason I'm drawing a blank on how to specify this (I'm clearly spending too much time with C# these days!). It's a C++ dll project in VS 2005.
Any insights would be most appreciated.
Thanks!
|
|
|
|
|
Christopher Duncan wrote: What I need to do is configure the project to specifically use ATL version 8 and nothing older
The only way that the version of ATL can be reconfigured is to use a different version of Visual Studio, IIRC? There's only one version of ATL comes with each version of Visual Studio - Visual Studio 2005 has ATL 8, so if you rebuild with VS2005, you are, by definition, only using ATL 8?
So, unless you're manually setting include directories to point at an older ATL, I'm not sure what else you can do.
One last thing - you are obviously seeing usage of ATL older than ATL 8 - what have you seen that tells you that?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
#include <atldef.h>
#if _ATL_VER < 0x0800
#error This project requires ATL version 8 and nothing older
#endif // _ATL_VER < 0x0800
cheers,
AR
|
|
|
|
|
I don't actually have VS2005 installed (I don't use it - I've only got VS2003 and VS2008 installed) - and those only have one definition of _ATL_VER (0x900 for VS2008, 0x0710 for VS2003) so by interpolation, I'd presume the same for VS2005.
That implies that the compiler's finding the wrong atldef.h, so I'd suggest checking which atldef.h you're actually including - either by using the /P option (pre-process only) to the compiler and looking at the generated file for atldef.h, or using Process Monitor[^] to track which atldef.h the compiler finds.
Why would it find the wrong atldef.h? Project settings, the INCLUDE environment variable?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Good points. This project was originally created in VS 2003, and I know that the merge module used by the Wise installer currently includes ATL 7.1. However, I'm able to reproduce the bug in my dev environment from VS 2005 so I doubt that's the (only) issue.
You know, I've been away from in the trenches C++ for quite a few years now, and I feel I'm missing something fundamental conceptually. Regardless of _ATL_VER, at runtime how does my dll know which version of the atl.dll to load and reference? Is that handled internally in the version of the ATL code included in that version of the compiler (and driven by _ATL_VER), or are there other mechanisms at play.
Honestly, I don't recall feeling this stupid when I did C++ for a living...
|
|
|
|
|
Christopher Duncan wrote: at runtime how does my dll know which version of the atl.dll to load and reference
It doesn't - it'll go for the first one on the path.
You can statically link against ATL - open the project properties, go to General->Use of ATL and select Static Link to ATL. If you do that, then the version of ATL is fixed at build-time.
Christopher Duncan wrote: Honestly, I don't recall feeling this stupid when I did C++ for a living...
That's what C# does for you
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: That's what C# does for you
Ain't it the truth...
|
|
|
|
|
Hi, Alain.
This makes sense, but isn't there also a dll involved, and if so, how do I guarantee that the appropriate version is being referenced since there could obviously be any number of versions on target machines?
|
|
|
|
|
Hi Christopher
Christopher Duncan wrote: isn't there also a dll involved
There is no need of any dll with atl since 7.1: set the Use of ATL property to Static Link to ATL on the General property page and set the Runtime Library property to Multi-threaded (/MT) on the Code Generation property page (C/C++ folder).
See Redistributing ATL and OLE DB Templates[^] for more.
cheers,
AR
|
|
|
|