|
It is supported, but be warned it is not backward compatible. It is very likely a VC++6.0 dsw/dsp project does not recompile with 0 error.
Though most errors can be easily handled, some of them turn out to be much tougher in practice, because the STL code (templates everywhere) is behind all MFC code now.
Recompiling the code requires updating stuff either from MFC classes, or ATL classes.
Distribution also changes. Now it is MFC70.DLL, MSVCRT70.DLL, ... (in fact you have a merge module in the VS.NET cd).
Good luck!
If you have spare time, an article about tips for the upgrade would be welcome!
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Hello Stephane,
Thanks for useful reply
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello there ...
What's wrong in below code ?
void CTestthreadDlg::OnStart()
{
DWORD dwThreadID, dwThreadParam = 1;
hThread = ::CreateThread( NULL, 0, ThreadFunc, &dwThreadParam, 0, &dwThreadID );
}
DWORD WINAPI CTestthreadDlg::ThreadFunc(LPVOID lpParam)
{
m_List.AddString( "I wanna die, die for you ... Cause i know you are my only one" ); //
return 0;
}
Compiler show me this error:
E:\Microsoft Visual Studio\MyProjects\testthread\testthreadDlg.cpp(102) : error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)'
None of the functions with this name in scope match the target type
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Well, now my source code works fine by declaring ThreadFunc as global !
Cup, can you show me how declare ThreadFunc as static function ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hadi_Rezaie wrote:
Cup, can you show me how declare ThreadFunc as static function ?
Hmmmm! No one's ever called me "cup" before
Anyway making a member function static is easy. Just add static to the function declaration.
For example :-
static int GetTotal();
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Hello dear Nishant S
I'm so sorry about my wrong in typing your name ...
It's because i asked this question in two message board, cup is the name of he ...
And i want to thank you for all helps
With Best Regards
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I think the method ThreadFunc should be declared as static .
Or you can use an ordinary function, not a method. This, i think, is the best choice because it always keeps you away from the attempt of using static /non static members in a static method.
rechi
|
|
|
|
|
If I recall correct you have to declare your ThreadFunc static if you want it to be a member function. Or you can declare it global.
In cpp file
DWORD WINAPI ThreadFunc(LPVOID lpParam);
<br />
DWORD WINAPI ThreadFunc(LPVOID lpParam)<br />
{<br />
DoStuff();<br />
}<br />
<br />
van Padoea<br />
|
|
|
|
|
Thanks, it works fine
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Well, now my source code works fine by declaring ThreadFunc as global !
Cup, can you show me how declare ThreadFunc as static function ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
In *.h
static UINT ThreadFunc(LPVOID lParam);
In *.cpp
UINT MyClass::ThreadFunc(LPVOID lParam)<br />
{<br />
}
van Padoea
|
|
|
|
|
Hello van Padoea,
Your help is very USEFULL, thank you
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I need to create project in VSI that
automatically installs MFC DLLs and my
application.
How must I set the following properties
for the MFC DLLs (MFC42D.DLL, MFCD42D.DLL,
MFCO42D.DLL, MSVCTRD.DLL)??
- Condition
- DoNotIninstall
- Folder
- Hidden
- ReadOnly
- Register
- SharedLegacyFile
- System
- Transitive
- Vital
Thank you very much.
|
|
|
|
|
You shouldn't be doing this. Those are all debug DLLs and according to the VC++ license, they are not redistributable.
You should only ship release build binaries, and you probably don't need to ship the MFC DLLs for those, since the first three you name are all rolled into MFC42.DLL, which is present on a lot of machines anyway, unless you have a big Win95 market.
The MSVCRT.DLL is also there, otherwise a lot of MS apps would break.
Steve S
[This signature space available for rent]
|
|
|
|
|
So, if I have well understood, I do not
need to install any DLL.
The only ones needed are MFC42.DLL and
MSVCRTD.DLL that are installed in all machines
with the OS.
Do you think that my installer must try
to install them in order to avoid problems ?
Or also them are not redistributable ?
If I can (or must) try to install them, which
properties have I to set ?
The problem is that my application is very
critical and there must be none problem for
its installation.
|
|
|
|
|
In that case, why not build them with minimal dependencies, by specifying that you want to link statically to MFC and the CRT library?
Steve S
[This signature space available for rent]
|
|
|
|
|
That could be a solution. Anyway we have to distribute other files
as, in example, MsFlexGrid.ocx. We have think to dinamically
link DLLs also to minimize the amount of load memory if more than
one application is launched in the same time. So we'd prefer to follow
this way if it is possible.
Anyway,we have not considered license problems so we would like to
examine it.
What do you think about ?
Where can we find some docs ?
Any other problems ??
|
|
|
|
|
First of all MFC42.DLL, ..., is not part of the operating system. You cannot assume the DLLs are installed. And you cannot assume the right MFC42.DLL version is installed (which is 4.21 for VC++5.0, and 6.0 for VC++6.0).
MSVCRTD.DLL is a debug build, something you don't distribute. I guess you are talking about MSVCRT.DLL.
To know the DLLs that you need to distribute, you can use "dependency walker" (Visual studio tool directory). Beware that's a static listing, it does not show dynamically loaded DLLs.
MS requires you to build a .msi package (or your program will not install on Windows XP depending on user profile). This package references Merge Modules (*.msm files), and there is a merge module for the MFC run-time DLLs provided with the VS.NET cd. See redist.txt file in the cd.
I guess you can download the merge module from the MS site too. (don't know the url).
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
I have found mfc42.dll and msvcrt.dll in the
REDIST.TXT file among "REDISTRIBUTABLE CODE - Extended Use"
files.
So, can I assume that I can deliver them without problems ??
I have also found mfc42.msm and msvcrt.msm in the following position:
"C:\Programmi\Microsoft Visual Studio\Common\Tools\VSInst\BuildRes"
can I use them ??
And how ??
As you can see, I not skilled and I need Help !!!
Thanks a lot.
|
|
|
|
|
You are using VC++ 6.0, right ?
VC.NET has better .msi support, but with VC++ 6.0 you must rely on InstallShield 7 to build your setup.
Of course, if you are distributing a shareware, you may just play on the low side and distribute a simple zip file with both your .exes and .dlls and the MFC dlls in the SAME directory (you can test for yourself, it works).
If you are working on a real world software project, then I guess the company you work for must pay a lot of attention to the Deployment part.
You have plenty of documents to read on MSDN : download the Windows Installer SDK from the MS site...
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Yup, VS.NET does have better MSI support, which is to say "some".
However, it's possible to use Visual Studio Installer (downloadable from MS' site) as well, for VC++ 6.0.
I hadn't intended to imply that MFC42.DLL was part of the OS, although I have yet to see a machine that doesn't have MSVCRT.DLL on it (so I'll probably find one later today!), but the most important bit you mentioned was "pay a lot of attention to the Deployment".
Steve S
[This signature space available for rent]
|
|
|
|
|
I use this code to chane the caption of my frame in my formview class in OnInitUpdate:
CMainFrame * pWnd = (CMainFrame *) (AfxGetMainWnd());
ASSERT_VALID(pWnd);
pWnd->SetWindowText(str);
But nothing change in title of maniframe!
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
|
Thanks Nish.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|