|
HAhahahahaha. You should have suggested that whoever did it post here so no-one else did. I'm sorry, I was in bed, I was about to do it myself from your email but lucky I read the forum first.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I am programing under WINDOWS NT4 with Visual C++6.0 and I use the MFC.
I would like to dynamicaly change the language of the standard windows as "Print setup dialog" or "Print preview view" and standard messages as "Please enter a number." when you type a character in a edit control wich is associated whith a real member variable .
I change the language ID with SetThreadLocal, it works for my own resources but not for these windows and stringtable.
I try to modify the path of the afxres.rc or afxprint.rc in my .rc file, it doesn't work better.
I found the print preview toolbar and the messages resources inside the mfc42loc dll so I maybe just have to find the English and German DLL for these resource but it doesn't work for the Print setup dialog wich depend of the System language.
The solution must work either under NT4 ,Windows 2000 and XP!!!
Thanks for help...
ZAZA
|
|
|
|
|
Yes, MFC42LOC.DLL contains the localized resources - it'll give you 'Please enter a number' and other UI elements implemented by MFC in your language. Note that MFC42LOC should be in the Windows system directory.
However, it will not change the strings in common dialogs for opening/saving file, print setup etc. - these are parts of the operating system itself. The only way to overcome that is to re-implement, but it would take a lot of effort.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hello Tomasz
I also found the messages and the print preview button text in the afxres.rc and afxprint.rc files. I try to include them in my own RC file but it still doesn't work.
|
|
|
|
|
You should include these files only if your app links to MFC statically - in such case there's no need to use MFC42LOC.DLL.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I have an idea: if i find the mfc42loc.dll in english, french and german, could I rename them and load the apropriate one dynamicaly ?
I would like to try, I use a french version of visual C++, could anyone send other language versions of mfc42loc.dll.
For the standard .rc file could I built resource DLLs and load them dynamicaly with AfxSetResourceHandle(LoadLibrary(mydll)) ?
Do you think it could work ?
elisabeth.sever@europlacer.fr
|
|
|
|
|
if i find the mfc42loc.dll in english, french and german, could I rename them and load the apropriate one dynamicaly ?
Use 'Find in Files' to locate MFC code which loads MFC42LOC.DLL - just search for 'MFC42LOC' in vc98\mfc\src. Do not change MFC sources, rather copy the code into your application and load appropriate DLL at runtime, depending on language settings.
For the standard .rc file could I built resource DLLs and load them dynamicaly with AfxSetResourceHandle(LoadLibrary(mydll)) ?
If by 'standard .rc' you mean resources of your app, then yes, this is the way to go. Also, you can consider placing one (main) language in the .exe. This will make working with IDE easier - you'll be able to add command handlers from ClassWizard, etc.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
You need to make diferent .rc files.
Then you need to set te resource file where the resources will be load using the following function:
AfxSetResourceHandle(HINSTANCE hInstResource); Where hInstance is the HINSTANCE that you get using LoadLibrary or AfxLoadLibrary(LPCTSTR lpszModuleName);
Cheers!!!
Carlos Antollini.
|
|
|
|
|
I would like to load dynamicaly the mfc42loc.dll to choose the apropriate language. I use a french version of visual C++, could anyone send me the English (UK or US) and the German versions of the mfc42loc.dll file ?
Thanks
elisabeth.sever@europlacer.fr
|
|
|
|
|
I trace through code and I watch variable values in watch window. I have a problem with watching structures: I can only see structure's address, I can't see structure members' values. This problem does not occur always. I use Visual Studio (C++) 6 adn Win2000. What would solve this problem?
Matjaz
|
|
|
|
|
are you sure it isn't a structure pointer ?, try adding a * in front of the variable or use "variable->member" to see the value for that field.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
The file <vs common="">/MSDev98/Bin/autoexp.dat contains the structures that will expand in the debugger and can be added to. You can also expand an array by putting ,# after it, for exmaple, myarray,10 will list the first 10 elements, and ((myarray+10),10 will list the next 10.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
In VC6 when you watch a strucutre there is usually a little (+) next to it which will expand the struct so you can see it's members and their values.
If it's a pointer to a struct you might have to put a * in front of it. Alternatively you can use the format Struct.Value or pStruct->Value
Hope that helps,
--
Andrew.
|
|
|
|
|
Hello
I use this function with access database it works properly but when I use it with MS SQL 6.5 database I havn't goten any record in my Recordset, for the same condition and identical tables.
any help
Best Regards
|
|
|
|
|
Hello again
I am so sorry if i bother any body, I found the error, it was in the table contents.
Best Regards
|
|
|
|
|
Hi, I have an MFC MDI app. If one user, running one instance of the app opens a file using OnOpenDocument then another user, running another instance of the same app opens the same file, MFC reports "Failure to open document". The app does not edit the file, it's just a viewer, so I don't care if many people are opening the document. How can I tell this to MFC?
thanks,
Kristian.
|
|
|
|
|
I've made an empty MFC app using wizard, added some serialization, and can't reproduce the behavior you're describing - two instances can open the same file. Did you override OnOpenDocument? If this is the case, please post the code.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
BOOL CSaturn2Doc::OnOpenDocument(LPCTSTR lpszPathName)
{
// the following line fails. The serialize function is empty.
if (!COleServerDoc::OnOpenDocument(lpszPathName))
return FALSE;
blah blah blah...
}
My document is derived from COleServerDoc.
|
|
|
|
|
Oooooh - you're using OLE. My experience is limited in this area, all I can advise is stepping inside COleServerDoc::OnOpenDocument and checking which call fails - probably it'll be call to something like StgOpenStorage.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
That's right, in COleDocument::OnOpenDocument() the call to StgIsStorageFile() fails. I guess I could work around this by copying every document I intend to open to a temporary file but that sucks.
|
|
|
|
|
|
I see where you are going with this. I found a call to EnableCompoundFile() in my document class, which I changed to EnableCompoundFile(FALSE). Now everything is groovy. Thanks.
|
|
|
|
|
I need iphlpapi.h when doing tasks with
Ip Helper.
I have to install SDK in order to get this iphlpapi.h.
Everybody tell me that i had to install SDK from microsoft.com but i cant do this...
THE QUESTION IS:
WHERE CAN I FIND SDK BUT MICROSOFT.COM.
DOES VISUAL STUDIO HAVE INTEGRATED THE SDK?
PLEASE, I NEED YOUR HELP...
|
|
|
|
|
I'm sorry to say that there is no other place to get the SDK. Visual Studio comes with the SDK as it stood at the time of release, the point of ongoing releases is that they are able to update the headers and add new stuff like GDI+. Downloading the SDK is a major pain, even with a decent connection, and I'm afraid ordering the CD can be a bit slow. Even if I emailed you this header, it is unlikely to help you, it almost certainly requires other headers and .lib files. I'm afraid you have no choice but to source a copy of the SDK.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Please, Christian can you e-mail me that iphlpapi.h, iptypes.h,ipexport.h and iphlapi.lib?
I've been tring to solve this problem for 3 days. I feel that ai get mad.
I HAVE WIN98 SE ON MY COMPUTER. SHOULD BE A PROBLEM?
You are a real help for everybody, Christian. Thank you very much.
My e-mail address is: dvisan@forte.ro
|
|
|
|