|
Thanks man, you saved my time.
|
|
|
|
|
|
I tried to use it's earlier version (1.2.3) with VC 2005 Express and WTL but it didn't work - couldn't even open rc files It all started to look promising when they came up with 1.3.1 and added support for include paths. I made a few test WTL projects in VC 2005 Express and all rc files opened just fine. When rc file is saved all #pragmas, #ifdefs and #endifs are removed, but the file still compiles under VC 2005 Express. It's REALLY worth a try .
--
Vladimir Svrkota,
CardWare
Novi Sad, Serbia.
|
|
|
|
|
This is a quote from their main page:
"An include file always named resource.h (it is impossible to change it), witch contains the ID definitions."
If they can't spell "which" correctly, then I do not trust them to generate my code.
Nana Nana Nana Nana dog thief!
|
|
|
|
|
How do you set the include path of it ?
|
|
|
|
|
I followed all the instructions so that I can use Visual C++ 2005 Express Edition to compile general WIN32API source programs as well as WTL source programs.
I also installed WTL appwizard with setup80x.js but I always failed to make WTL project. An error message box appears and says: "Runtime error! Will you debug it? Line: 382. Error: Object is necessary." (I am using Korean one and the message was in Korean language so that I translated it into English.) If I click "yes" button, Visual studio Just-in-time Debugger runs. And then if I choose "new instance Microsoft Script Editor" and then click "yes" button again, "Remote Procedure Call step-by-step code execution" window appears. If I click "confirm" button, an alart message box appears and says: "Microsoft JScript Runtime Error: object necessary". If I click "abort" button, C:\Program Files\Microsoft WTL\AppWiz\Files\HTML\1033\default.htm is loaded and it pointed the line 383, "setDirection();". Thread was [1840] 730 thread.
Please help me!
-- modified at 6:03 Sunday 1st October, 2006
__(*^.^*)__
|
|
|
|
|
I found the solution!
I think that Microsoft has updated the VC++ 2005 Express Edition without noticing it. I have downloaded the .iso files of Visual Studio 2005 Express Edition in November, 2005. And I installed VC++ 2005 Express Edition with the file and followed all the instructions to use WTL with Visual C++ 2005 Express Edition but it didn't work.
So, I tried to download the .iso files of Visual Studio 2005 Express Edition again and compared new one with old one. I found that the sizes of them were different from each other. The date of the latest file in the old .iso file was 23rd, September, 2005 while that of the new one is 13th, December, 2005.
I installed VC++ 2005 Express Edition with the new one and followed all the instructions to use WTL with Visual C++ 2005 Express Edition. Finally, it worked.
Now I can use WTL in VC++ 2005 Express Edition.
__(*^.^*)__
|
|
|
|
|
The atlwin.h shipped with PSDK doesn't define the functions IsMsgHandled() or SetMsgHandled(BOOL bHandled). See approx line 1956 in atlwin.h from PSDK compared to line 2768 of atlwin.h shipped with MSVC7.1
I attempted to copy the two functions across but then discoverd PSDK atlwin.h doesn't define the _ATL_MSG type either. Further tinkering with things eventually resulted an ambiguous call to SetMsgHandled at which point I gave up.
All in all the problem seems to lie with the fact that the ATL version in PSDK is only 3.1
|
|
|
|
|
Include the atlcrack.h of WTL library at your stdafx.h, pls
then
#define BEGIN_MSG_MAP BEGIN_MSG_MAP_EX
///////////////////////////////////////////////////////////////////////////////
// Message map macro for cracked handlers
// Note about message maps with cracked handlers:
// For ATL 3.0, a message map using cracked handlers MUST use BEGIN_MSG_MAP_EX.
// For ATL 7.0/7.1 you can use BEGIN_MSG_MAP for CWindowImpl/CDialogImpl derived classes,
// but must use BEGIN_MSG_MAP_EX for classes that don't derive from CWindowImpl/CDialogImpl.
.... ....
|
|
|
|
|
Hello Baryon,
Thanks for such a speedy reply I really appreciate it. Your suggestion worked perfectly, thank you very much.
Kind Regards, Eoin.
|
|
|
|
|
|
|
GOOD! This means that it is no need to do the work as you said beyond that I should include the PlatformSDK/atl, right? Thank you all the same!
|
|
|
|
|
although i've made the changes given above i get still these:
d:\microsoft platform sdk\include\atl\atlbase.h(287) : error C2059: syntax error : 'constant'
d:\microsoft platform sdk\include\atl\atlbase.h(287) : error C2059: syntax error : ')'
d:\microsoft platform sdk\include\atl\atlbase.h(352) : error C2143: syntax error : missing ';' before '{'
d:\microsoft platform sdk\include\atl\atlbase.h(352) : error C2447: '{' : missing function header (old-style formal list?)
d:\microsoft platform sdk\include\atl\atlbase.h(383) : error C2146: syntax error : missing ';' before identifier 'CStdCallThunk'
d:\microsoft platform sdk\include\atl\atlbase.h(383) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\microsoft platform sdk\include\atl\atlbase.h(383) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\microsoft platform sdk\include\atl\atlwin.h(1498) : error C2146: syntax error : missing ';' before identifier 'thunk'
d:\microsoft platform sdk\include\atl\atlwin.h(1498) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\microsoft platform sdk\include\atl\atlwin.h(1498) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\microsoft platform sdk\include\atl\atlwin.h(1502) : error C2065: 'thunk' : undeclared identifier
d:\microsoft platform sdk\include\atl\atlwin.h(1502) : error C2228: left of '.Init' must have class/struct/union
type is ''unknown-type''
wolkan
|
|
|
|
|
There are a editor miss of CP in the code of atlbase.h.
correct:
#define AllocStdCallThunk() HeapAlloc(GetProcessHeap(),0,sizeof(_stdcallthunk))
not good
#define AllocStdCallThunk()
HeapAlloc(GetProcessHeap(),0,sizeof(_stdcallthunk))
Share our software. Love Programming, Love Life.
|
|
|
|
|
Hi, Baryon Lee.
I start a WTL project in visual studio 2005(team edition), select "create as a COM Server", then after Wizard finish its job, I select "Add Class", "ATL Simple Object", but a exception dialog occurs, say"ATL classes can only be added MFC EXE and MFC DLL projects or projects with full ATL support". So I want to ask what happens about this? Is ATL 8.0 crazy? If I want to add a ATL COM Object, what can I do?
jikanyanwin32
|
|
|
|
|
One solution is to modify C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\1033\common.js as follows:
1. locate the function IsATLProject
2. change the line:
if (strTypeString == "ATL::CComModule" || strTypeString == "ATL::CAutoThreadModule")
to:
if (strTypeString == "ATL::CComModule" || strTypeString == "ATL::CAutoThreadModule" || strTypeString == "WTL::CServerAppModule" || strTypeString == "WTL::CAppModule")
3. save your changes
FYI, IsATLProject is referenced in C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\VCAddClass\ATLSimple.vsz as the PREPROCESS_FUNCTION .
For more info, see The .vsz File (Project Control)[^].
|
|
|
|
|
Thank you for this solution!!!!
I recently ported my project from .NET 2003 to .NET 2005 and, today, went to add a new ATL dialog. I got the same error message. I have spent three hours searching for a solution.
This one did the trick!
Thanks again.
|
|
|
|
|
Hi,
Just wanted to say thank you and it works like a charm.
|
|
|
|
|
not working(automation error).
|
|
|
|
|
The reason that this is happening is because VC++ 2005 Express does not
have resource editor. WTL App Wizard is trying to open dialog template
in resource editor, and that fails.
It is not as bad as it looks - all files and the project are created
after this error, and if you open the project in VC++ 2005 Express, it
will build just fine.
Cheers,
Nenad
Share our software. Love Programming, Love Life.
|
|
|
|
|
Managed to get as far as linking. BTW in case it helps someone, the resource compiler also needs the WTL and PSDK include directories defined in Configuration properties/Resources/General/Additional include directories and don't forget to add the additional library directories too in Configuration properties/Linker/General too. Oddly, I also had to add winuser.h to my wizard-generated .rc file to avoid compiler errors.
However I'm now stuck with this linker error;
LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
Can anyone help?
JG
|
|
|
|
|
Answering my own question to save anyone else the effort.
This error occurs if you are using CRT functions that require CRT startup code. Changing "Minimizing CRT use in ATL3" to "No" fixed it. Hoorah, it now works.
|
|
|
|
|
where can I setup the order of the lib files?
Thanks
|
|
|
|
|
I got everything working, and can compile the WTL sample programs. I tried out the radasm resource editor suggested on this web page, but am having problems. This resource editor is the same one that is packaged in the C++-IDE MingGW Studio at http://www.parinyasoft.com.
It edits the rc files OK, but after saving the rc file, it is completly changed. After the change the Visual C++ 2005 express edition resource compiler won't compile the resource.
I used the radasm resource editor ResEd.exe to edit the MDI.rc file in the MDIDocVw sample. This is the error I get when I try to compile with the new rc file.
".\MDI.rc(17) : error RC2104 : undefined keyword or key name: IDOK"
OK this is a pretty simple error, so I added definitions for IDOK and all other missing key names to the resource.h file, now I get this error.
"rc.exe has generated errors and will be closed by Windows."
Has anyone modified a resource file with ResEd.exe and gotten it to succesfully compile with WTL and Visual C++ 2005 Express edition?
|
|
|
|