|
Then the vector<CString> stuff is fine.
ATLTRACE, by the way, is like cerr << stuff but outputs to a debug window. It assumes you're using ATL, which generally, if you're using ATL explicitly, or WTL, you will be doing, and it also assumes you're running a debug version, with something like VS.NET or DebugWin catching the output.
Steve S
Developer for hire!
|
|
|
|
|
i had created a ATL DLL now i wants to call the dll in mfc project
i know 1 way-->
include .H file and >C which contain the IID and CLSID defination
is there any other better way to call the dll
virender
|
|
|
|
|
If ur dll is an automation compliant IDispatch implimented dll u can do the following:
Press Ctrl+W, goto class wizard --->Automation tab. Then click "Add Class" button. It will popup a file browse dialog. select the dll from there. Wizard will generate a class for ur COM CoClass.
1) Create an object fo that class class.
2) Call CreateDispatch method on that by passing the PROGID of ur class.
use the class object as a c++ class to make calls to its methods.
rgds...mil10
|
|
|
|
|
I have no problem compiling "normal" Win32 apps in either Release mode or Debug mode. However, whenever I compile a WTL app it compiles successfully in Release mode, but when I try to compile it in WTL mode I get the following two errors at link time:
Demo.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
Demo.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
This happens with every WTL project I try.
What's wrong ?
|
|
|
|
|
hello,
i use the ATl write a word2000 addin,and add a button into the word toolbars,and now i want to add a picture into the word document when i hit the button,this picture can be a bmp or jpeg.after i insert the picture i can drag it to a proper location.
i tried a long time,but in vain,who can help me?
|
|
|
|
|
Hi,
I am upgrading VC compiler on a windows machine from version 6.0 to 7.1
after upgrading when I tried to compile my application and got this error
\\Vc7\atlmfc\include\atlalloc.h(218) : error C2629: unexpected 'class ATL::CTempBuffer<t,t_nfixedbytes,allocator> ('
I was able to compile code on 6.0 version
Please tell me reason and solution for this problem.
Regards... Ankur
|
|
|
|
|
Hello!
I am new in ATL programming. I am trying to write a program where I need to pass a class pointer to one of the method inside the library. Class is written by me and the purpose is to store some data in a linked list. I am always getting next error:
c:\documents and settings\...\dblib.h(30): error MIDL2025 : syntax error : expecting a type specification near "class"
Some code:
this is an IDL file:
[id(3),helpstring("method LoadOptions")] HRESULT LoadOptions([out] class OptionList *op);
this file/line is generated by the compiler.
that how it looks in .h file:
[id(3), helpstring("method LoadOptions")] HRESULT LoadOptions([out] OptionList *op);
(Error in this line)
I have no idea how to correct the error. As I understood, the problem that I can pass only simple data type to the ATL method. Class is not so simple...
I read next article:
http://www.codeproject.com/atl/udtdemo.asp
Did not helped me a lot... I can not find any other information.
Any help appreciated.
Thank you!
|
|
|
|
|
Give the method definition as follows -
[id(3),helpstring("method LoadOptions")] HRESULT LoadOptions([out] DWORD *op);
Before passing in the class pointer, typecast it to DWORD* and inside the method typecast it back to the class pointer.
« Superman »
|
|
|
|
|
hi
I am having a problem in Calling Web Service through ATL with MFC support project.
I have created this project but not bale to call.
I used the Soap tool kit which helps to give call to Web service but not successful.
Is there any method by which we can give call to WebService.
Waiting fo the reply.
cheers
Ganesh
|
|
|
|
|
Hi
Is ATL window programming widely used? Or MFC is still the first choice in window programming, then followed by the new WTL?
thx
|
|
|
|
|
I would be shocked if there is anything but a very small group of people doing large scale application development with just ATL. Application with WTL is much more common, but I would still say rare when compared to MFC.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
In the UK we do occasionally see job ads which specify experience with WTL. In fact I once had an application rejected because I said I didn't know WTL. As I could satisfy 10 out of the 11 requirements I didn't think WTL would be taken as a deciding factor. But then this was at the bottom of the downturn when employers were even fussier than they are now.
Kevin
|
|
|
|
|
|
Hello...
I like to support custom text printing in my application (without an edit control)...
The wtl examples that i found at codeproject only support text printing with edit controls...
I implemented the CPrintJobInfo class but unfortunely when it draw the text to the dc (in the PrintPage method) it only print the first drawing operation...
For example .:
bool CMainFrame::PrintPage(UINT nPage, HDC hDC)
{
CDCHandle dc = hDC;
CString text = _T("A Test");
dc.TextOut(0,0,text,text.GetLength()); // This text is only visible on page
dc.TextOut(0,20,text,text.GetLength());
dc.TextOut(0,40,text,text.GetLength());
return true;
}
I hope anybody can help me ...
|
|
|
|
|
Ehmmm... I have found the bug or better my own mistake...
I forget the different resolutions between the screen and printer dc...
The distance between the 3 strings was to small to see them completly...
For example.:
dc.TextOut(0,0,text,text.GetLength());
dc.TextOut(0,400,text,text.GetLength());
dc.TextOut(0,800,text,text.GetLength());
woks...
|
|
|
|
|
I am working on MCSE certifications. I also plan to take the network+ test offered by CompTIA. Is it necessary or beneficial for me? Where can I find the best training resources for this exam? Can anybody tell? Now there is 30% discount offer by uCertify on new exam N10-003. Tell me more about discount offer.
Alisia
|
|
|
|
|
you registered codeproject for that ??
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
my server application(in this case chat) crashes a firewall on XP but not in 98 .
i wan to run it in XP. What shall i do????
C U SOON
|
|
|
|
|
Hi,
sorry if this has been asked before, but i read the two articles on COM Addins for Outlook 2000/2003:
http://www.codeproject.com/com/outlookaddin.asp[^]
http://www.codeproject.com/atl/outlook2k3addin.asp[^]
and have to implement an Addin for Outlook 2003.
Seemingly, i have not been able to create the Addin properly, as i experienced the following problem:
When it comes to importing the Office & Outlook typelibraries i face the problem of not knowing which DLLs are appropriate.
You know, the articles use Outlook 2000 DLLs, even the one on Outlook 2003...
<br />
#import "C:\Program Files\Microsoft Office\Office\mso9.dll" \<br />
rename_namespace("Office") named_guids <br />
using namespace Office;<br />
<br />
#import "C:\Program Files\Microsoft Office\Office\MSOUTL9.olb" <br />
rename_namespace("Outlook"), raw_interfaces_only, named_guids <br />
using namespace Outlook;<br />
I manage to find the second file, the appropriate *.olb file, but not the also needed MSOXXX.dll file of my Office installation, as the dll is renamed in Office 2003.
I tried several DLLs in the directory, but none has worked as i get a failure when i build the project (in MS Visual C++ 6.0).
Any ideas?
Regards,
Harry
|
|
|
|
|
Use the following files
#import "E:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE11\\mso.dll" \
rename_namespace("Office") named_guids
using namespace Office;
#import "E:\\Program Files\\Microsoft Office\\OFFICE11\\msoutl.olb" \
rename_namespace("Outlook"), raw_interfaces_only, named_guids
using namespace Outlook;
cheers
Ganesh
ganesh.takawle@solversa.com
|
|
|
|
|
I have build an activeX controller in ATL VC++ that uses a window and shows camera captured frames, it works well in VisualC environment.
In Visual Basic 6, however, When I tried to integrate the control into a project, it was loaded ok but when I tried to save or run the project, I got a system Error
&H80004005 (-2147467259).
When I tried the same under .net environment, this problem didn't appear.
DO you have any idea what can be the problem or how can I debug it ?
Thanks
Amos.A
|
|
|
|
|
Hi
Can some one help me. I need to make a window with multiple viewports like in 3DS MAX, using WTL. Each viewport must be rendered with OpenGL.
|
|
|
|
|
Hi,
I want to use the string argument in switch case statement. Can you please give some sample program.
Thanks
|
|
|
|
|
itkid wrote:
I want to use the string argument in switch case statement.
Not possible in C and C++.
|
|
|
|
|
switch only works with integer types (char, short, int, long)...
to use strings, replace the switch with if... :
CString str;
ReadString(str);
ASSERT(!str && !str.GetLength());
<font color=blue>if</font> (!strcmp(str, <font color=gray>"string1"</font>)) { <font color=green>
<font color=green>
}
<font color=blue>else if</font> (!strcmp(str, <font color=gray>"string2"</font>)) { <font color=green>
<font color=green>
}
<font color=blue>else</font> { <font color=green>
<font color=green>
}
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|