Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

RC Localization Tool (LocalizeRC)

, 14 Jan 2004 BSD
A tool for localizing/translating Resource Scripts
localizerc.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc1.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_15.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_ansi14.zip
LocalizeRC.exe
LocalizeRC07.dll
localizerc_src.zip
res
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
LocalizeRC.dsw
German
German.dsp
German.ini
German.lws
res
LocalizeRC.ico
LocalizeRC.manifest
localizerc_src1.zip
LocalizeRC.dsw
LocalizeRC.ico
LocalizeRC.manifest
German.dsp
German.ini
German.lws
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
localizerc_src14.zip
LocalizeRC.ico
LocalizeRC.manifest
German.dsp
German.ini
German.lws
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
LocalizeRC.dsw
localizerc_src_15.zip
German.dsp
German.ini
German.lws
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
LocalizeRC.dsw
LocalizeRC.ncb
localizerc_unicode.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_unicode1.zip
LocalizeRC.exe
LocalizeRC07.dll
localizerc_unicode14.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_unicode_15.zip
LocalizeRC07.dll
LocalizeRC.exe
// LocalizeRC.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "LocalizeRC.h"
#include "LocalizeRCDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CLocalizeRCApp

BEGIN_MESSAGE_MAP(CLocalizeRCApp, CWinApp)
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()


// CLocalizeRCApp construction

CLocalizeRCApp::CLocalizeRCApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}


// The one and only CLocalizeRCApp object

CLocalizeRCApp theApp;


// CLocalizeRCApp initialization

BOOL CLocalizeRCApp::InitInstance()
{
	// InitCommonControls() is required on Windows XP if an application
	// manifest specifies use of ComCtl32.dll version 6 or later to enable
	// visual styles.  Otherwise, any window creation will fail.
	InitCommonControls();

	//AfxEnableControlContainer(); no ActiveX support
	
	AfxInitRichEdit();

	CWinApp::InitInstance();

	SetRegistryKey(_T("LocalizeRC"));

	CurLangID = STANDARD_LANGID;

	if( !LoadLangIDDLL( static_cast<LANGID>( GetProfileInt( SEC_LASTPROJECT, ENT_LANGID, 0 ) )) )
		if( !LoadLangIDDLL(GetUserDefaultLangID()) )
			LoadLangIDDLL(GetSystemDefaultLangID());

	CLocalizeRCDlg dlg;
	dlg.LangID = CurLangID;

	m_pMainWnd = &dlg;
	INT_PTR nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
	}

	if( CurLangID != STANDARD_LANGID )
		FreeLibrary( AfxGetResourceHandle() );

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}

BOOL CLocalizeRCApp::LoadLangIDDLL(LANGID LangID)
{
	HINSTANCE hInstance;
	CString strLangIDDLL;
	
	if( LangID == STANDARD_LANGID )	// integrated language is the right one
		return true;
	
	strLangIDDLL.Format( _T("LocalizeRC%.2x.dll"), LangID );
	hInstance = LoadLibrary( strLangIDDLL );
	if( hInstance )
	{
		AfxSetResourceHandle( hInstance );
		CurLangID = LangID;
		return true;
	}
	return false;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License

Share

About the Author

Konrad Windszus
Web Developer
Germany Germany
Author of the shareware WinCD.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 15 Jan 2004
Article Copyright 2003 by Konrad Windszus
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid