|
Hi Cédric,
what you are looking for is known as 'Private Assemblies'. The VS2005 DLLs (CRT, ATL, MFC) can be installed as shared assemblies in the WinSxS folder so every application can use them or they can be locally installed as private assemblies. In the latter case only your application will be able to use them.
You'll likely get all necessary information here:
Assembly Searching Sequence[^]
Short summary: If the redistributable package (vcredist_x86.exe) isn't installed on the target machine then your local app folder is checked for the DLLs. I propose to test it well, e.g. Windows 2000 and XP don't behave in the same way.
But the fun really starts if you have an application that has references to VS2005 RTM and SP1 DLLs. So... welcome to Manifest Hell!
cheers,
mykel
OMM: "Let us be thankful we have commerce. Buy more. Buy more now. Buy. And be happy."
|
|
|
|
|
You can still use the static-LIB versions of MFC and the CRT, do that and you won't need to run the redist installer. If you really have to use the DLL versions, you can still do so w/o running the installer, however it involves messing with manifests which I've never taken the time to funny grok, since I always use the static LIB versions.
|
|
|
|
|
|
in older program, I used resource dll to load resource French. but now, I don't
want to use dll. I want to use string table to support multilingual.
use "String Tables" instead of creating a new set of Dialogs for each supported
language. String Tables are to support multiple languages.
Ex:
I have created 2 stringtables (French and English):
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_CREATE "Create"
END
#endif // English (U.S.) resources
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_CREATE "Crée"
END
#endif // French (France) resources
InitDialog function:
CButton *pButtonName = (CButton *)GetDlgItem(IDC_CREATE); //create a button with ID: IDC_CREATE
m_LoadString.LoadString(IDS_STRING104); //Load stringtable
pButtonName->SetWindowText(m_LoadString); // Set button text
When I compile, button name is Create (Load English Stringtable)
Could you tell me how do I load button name is Crée (Load French Stringtable)
Please show me a solution to solve it.
Thanks a lot
Papais
|
|
|
|
|
1. Please post code only when required.
2. Please use the <pre> </pre> tags to post code.
3. As a specific question.
4. Do not cross post.
Use the ID of your French string with m_LoadString.LoadString instead of IDS_STRING104 to load the French string.
Let us not listen to those who think we ought to be angry with our enemies, and who believe this to be great and manly. Nothing is so praiseworthy, nothing so clearly shows a great and noble soul, as clemency and readiness to forgive.
- Marcus Tullius Cicero
|
|
|
|
|
Did you define AFX_TARG_FRA in your project settings?
Society is composed of two great classes, those that have more dinners than appetite, and those who have more appetite than dinners
Fold with us! ¤ flickr
|
|
|
|
|
Hello,
Is the assignment operator that is = available for CDBVariant class.
If I have
CDBVariant v,m;
v=m;
Should the above assignment give error.
Prithaa
|
|
|
|
|
|
prithaa wrote: Is the assignment operator that is = available for CDBVariant class
No.
prithaa wrote: CDBVariant v,m;
v=m;
Should the above assignment give error.
Yes.
|
|
|
|
|
Hello,
There are 2 answers which I have received and they are contradictory.
so what is it that I should do.
I am getting error if I use the assignment operator.And the error appears when the destructor of CDBVariant is called.It seems that the destructor is not able to delete the CString pointer.
Prithaa
Thanks for the answers
|
|
|
|
|
prithaa wrote: so what is it that I should do.
There is no assignment operator present for this class. You will not get error though, as compiler provides its own version here,which does shallow copy.
prithaa wrote: am getting error if I use the assignment operator.And the error appears when the destructor of CDBVariant is called.
Without relevent code snippet, nobody could satisfy your query.
prithaa wrote: It seems that the destructor is not able to delete the CString pointer.
You are corrupting memory for sure some where in your code.
|
|
|
|
|
prithaa wrote: I am getting error if I use the assignment operator.
This is very confusing. What kind of error ? A compilation error ? If yes, post the appropriate error message.
If it is a run-time error, then you should use your debugger to locate the problem.
|
|
|
|
|
My program is recording plain AVI file and i am looking for way to compress it.
(i don't need realtime processing) just to have opportunity to make file smaller from my program,
so far I produce gigabytes
Is there any free command line coder? (something like LAME or OGGENC for audio)
Or any C++ library for simple codec usage?
Thank you
viliam
|
|
|
|
|
look here
http://www.codeproject.com/audio/avitowmv.asp
Cheers,
Russell
|
|
|
|
|
You could have a look to VirtualDub sources[^]. And if it solves your problem, an article on how you did it would be welcome!
Society is composed of two great classes, those that have more dinners than appetite, and those who have more appetite than dinners
Fold with us! ¤ flickr
|
|
|
|
|
Hi all.
I want to make "BOLD"; the text from a static control.
How I can do this?
Thanks
Sameer Thakur
|
|
|
|
|
Have a look at LOGFONT-->lfWeight .
Set its value to FW_BOLD .
And use this font for static text.
|
|
|
|
|
1. Change the name of ID of Static Text from IDC_STATIC1 to some other name like ID_ST.
2. Declare a member variable of CFont, Say
CFont m_Font;
3. In OnInitDialog()
use CreateFont() function to create a font with bold attributes.
4. Call
GetDlgItem(ID_ST)->SetFont(&m_Font);
|
|
|
|
|
There is an example of this in the Extras section of this article.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all.
I need to change one character in CString :
Ex;
from
"C:\\My Folder\\*.exe"
to
"C:\\My Folder\\1.exe"
|
|
|
|
|
david bagaturia wrote: I need to change one character in CString:
Ex;
from
"C:\\My Folder\\*.exe"
to
"C:\\My Folder\\1.exe"
Use CString::Find and CString::SetAt ...
An Example...
CString csPath = _T( "C:\\My Folder\\*.exe" );
const int nLoc = csPath.Find( _T( '*' ));
if( nLoc != -1 )
{
csPath.SetAt( nLoc, _T( '1' ));
}
|
|
|
|
|
|
One Method:
Use Find and Replace methods of CString.
|
|
|
|
|
|
Hi,
I have an MDI Application with one DocTempate to handle .mpp files [My Program Files] added to it. Now I need to add one more doc template to it in order to open files of another extension, say *.mpj [My Project Files] so that when user double-clicks on .mpj files in explorer, my application can be asked to load that file. The problem is that, the data I am intending to store in .mpj files will be used to populate a tree control in one of the dialogs in my application. As a result, I do not have frame window and view classes for this file type. At present I am using the open menu option in my dialog to allow users to select/open/save .mpj files. But I want to add shell support to .mpj files so that I can open that file from explorer using my application.
How can I create and add one more DocTemplate that does not have a frame window and view class?
|
|
|
|