Click here to Skip to main content
15,921,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
ganesa moorthy28-Mar-08 2:59
ganesa moorthy28-Mar-08 2:59 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
Rajesh R Subramanian28-Mar-08 3:10
professionalRajesh R Subramanian28-Mar-08 3:10 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
NormDroid28-Mar-08 2:59
professionalNormDroid28-Mar-08 2:59 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
Rajesh R Subramanian28-Mar-08 3:11
professionalRajesh R Subramanian28-Mar-08 3:11 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
ganesa moorthy28-Mar-08 2:41
ganesa moorthy28-Mar-08 2:41 
QuestionRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
Matthew Faithfull28-Mar-08 2:11
Matthew Faithfull28-Mar-08 2:11 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
ganesa moorthy28-Mar-08 2:46
ganesa moorthy28-Mar-08 2:46 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
Royaltvk28-Mar-08 4:33
Royaltvk28-Mar-08 4:33 
NO U Need not Create all the interfaces once again.

U Just need to Give id to all the Controls and load them using

Resource Dll.
<br />
<br />
inline HINSTANCE LoadResourceDll()<br />
{<br />
	<br />
	HKEY hkey;<br />
	unsigned long no = 2048;<br />
	DWORD pos;<br />
	BYTE strRegValue[2048] = "\0";<br />
	CString csLanguage = _T("");<br />
	CString csDllPath;<br />
	wchar_t *pwcDllPath = NULL;<br />
	HINSTANCE m_hResInstance = NULL;<br />
//get the current language information from the registry<br />
	if (RegCreateKeyEx(HKEY_LOCAL_MACHINE,_T("Path to ur registered application"),0,_T("Registration"),REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hkey,&pos) == ERROR_SUCCESS)<br />
	{<br />
		if(	RegQueryValueEx(hkey,_T("CurrentLanguage"),NULL,NULL,strRegValue,&no) == ERROR_SUCCESS)								  		<br />
		{	<br />
			csLanguage = (wchar_t*)strRegValue ;<br />
			csLanguage.TrimLeft();<br />
			csLanguage.TrimRight();<br />
		}<br />
	<br />
	}<br />
	TCHAR lpBuffer[1028];<br />
	//get the system directory as the resource dlls will be there<br />
	GetSystemDirectory(lpBuffer,1028);<br />
	csDllPath = (LPCTSTR) (const char*) lpBuffer;<br />
	csDllPath.TrimLeft();<br />
	csDllPath.TrimRight();<br />
	//append the language dll based on the current lang info in registry along with system directory<br />
	if (Encrypt(_T("ENG")) == csLanguage)<br />
		csDllPath+= "\\DUresENG.dll";<br />
	else if (Encrypt(_T("JPN")) == csLanguage)<br />
		csDllPath+= "\\DUresJPN.dll";<br />
	else<br />
		csDllPath+= "\\DUresENG.dll";<br />
<br />
  // Load resource DLL<br />
	m_hResInstance = LoadLibrary(csDllPath);<br />
<br />
	<br />
	return m_hResInstance;<br />
}




And In ur .Cpp


Call Controls like this, Call all controls in one Function. call them in OnInitDialog of Ur Dialog Class.

void CAttributeProperties::SetDialogLabels()
{

m_csLabel = LoadResourceString(m_hResInstance ,AfxGetApp()->m_hInstance,1);<br />
	GetDlgItem(IDOK)->SetWindowText(m_csLabel);


}


And call them in OnInitDialog of Ur Dialog Class.

BOOL CAttributeProperties::OnInitDialog() <br />
{<br />
	CDialog::OnInitDialog();<br />
<br />
	SetDialogLabels();<br />
}

GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
Matthew Faithfull28-Mar-08 4:43
Matthew Faithfull28-Mar-08 4:43 
QuestionRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
ganesa moorthy28-Mar-08 4:52
ganesa moorthy28-Mar-08 4:52 
GeneralRe: Multilingual preparation - How to make Chinese Text or japanese text appear on menu items or button captions etc., Pin
Matthew Faithfull28-Mar-08 5:09
Matthew Faithfull28-Mar-08 5:09 
GeneralRe: Multilingual preparation - Small doubt may be silly sorry to trouble you [modified] Pin
ganesa moorthy29-Mar-08 1:53
ganesa moorthy29-Mar-08 1:53 
GeneralRe: Multilingual preparation - Small doubt may be silly sorry to trouble you Pin
Matthew Faithfull29-Mar-08 5:43
Matthew Faithfull29-Mar-08 5:43 
GeneralRe: Multilingual preparation - Small doubt may be silly sorry to trouble you Pin
ganesa moorthy29-Mar-08 5:52
ganesa moorthy29-Mar-08 5:52 
GeneralRe: Multilingual preparation - Small doubt may be silly sorry to trouble you Pin
Royaltvk31-Mar-08 3:12
Royaltvk31-Mar-08 3:12 
GeneralRe: Multilingual preparation - Small doubt may be silly sorry to trouble you Pin
ganesa moorthy31-Mar-08 3:19
ganesa moorthy31-Mar-08 3:19 
QuestionHow Can Show Dialog Box Initially Maximize? Pin
Le@rner28-Mar-08 1:27
Le@rner28-Mar-08 1:27 
AnswerRe: How Can Show Dialog Box Initially Maximize? Pin
Saurabh.Garg28-Mar-08 2:18
Saurabh.Garg28-Mar-08 2:18 
GeneralRe: How Can Show Dialog Box Initially Maximize? Pin
Le@rner28-Mar-08 2:23
Le@rner28-Mar-08 2:23 
GeneralRe: How Can Show Dialog Box Initially Maximize? Pin
Le@rner28-Mar-08 19:06
Le@rner28-Mar-08 19:06 
GeneralRe: How Can Show Dialog Box Initially Maximize? Pin
Saurabh.Garg28-Mar-08 20:06
Saurabh.Garg28-Mar-08 20:06 
GeneralRe: How Can Show Dialog Box Initially Maximize? Pin
Le@rner28-Mar-08 21:05
Le@rner28-Mar-08 21:05 
AnswerRe: How Can Show Dialog Box Initially Maximize? Pin
Hamid_RT16-Apr-08 0:33
Hamid_RT16-Apr-08 0:33 
QuestionTo Access Visual Studio Command Prompt Programmatically Pin
Mushtaque Nizamani28-Mar-08 0:40
Mushtaque Nizamani28-Mar-08 0:40 
GeneralRe: To Access Visual Studio Command Prompt Programmatically Pin
rp_suman28-Mar-08 0:58
rp_suman28-Mar-08 0:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.