Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC - how to get an edit box text from another dialog?? (Constructor) Pin
David Crow12-Oct-11 3:10
David Crow12-Oct-11 3:10 
GeneralRe: MFC - how to get an edit box text from another dialog?? (Constructor) Pin
symeramon12-Oct-11 3:43
symeramon12-Oct-11 3:43 
GeneralRe: MFC - how to get an edit box text from another dialog?? (Constructor) Pin
symeramon12-Oct-11 3:48
symeramon12-Oct-11 3:48 
GeneralRe: MFC - how to get an edit box text from another dialog?? (Constructor) Pin
Chandrasekharan P12-Oct-11 21:38
Chandrasekharan P12-Oct-11 21:38 
QuestionLANGID Pin
zon_cpp11-Oct-11 20:52
zon_cpp11-Oct-11 20:52 
AnswerRe: LANGID Pin
Richard MacCutchan11-Oct-11 21:42
mveRichard MacCutchan11-Oct-11 21:42 
AnswerRe: LANGID Pin
Richard MacCutchan11-Oct-11 23:18
mveRichard MacCutchan11-Oct-11 23:18 
AnswerRe: LANGID Pin
Randor 11-Oct-11 23:34
professional Randor 11-Oct-11 23:34 
zon_cpp wrote:
how do i get a list of LANGID in array?


Hi,

I believe Microsoft discourages using the MLANG interface. At least that's what it use to say on MSDN. However I looked just now and could not find the do-not-use disclaimer. With that being said... A few years ago I managed to figure out how to use some of the vaguely documented interfaces. Here is what I use to enumerate available locales:

C++
HRESULT hr = CoInitialize(NULL);
if(SUCCEEDED(hr))
{
	IMultiLanguage * pml;
	hr = CoCreateInstance(CLSID_CMultiLanguage,NULL,CLSCTX_ALL,IID_IMultiLanguage,(void**)&pml);
	if(SUCCEEDED(hr))
	{
		RFC1766INFO info;
		ULONG num;
		IEnumRfc1766 *rfc1766;
		hr = pml->EnumRfc1766(&rfc1766);
		if(SUCCEEDED(hr))
		{
			while(S_OK == rfc1766->Next(1,&info,&num)) 
			{
				WORD wLangID = LANGIDFROMLCID(info.lcid);
				//You can also get the locale name such as 'English' or 'Chinese' at info.wszLocaleName[32]
			}
		}
	}
	pml->Release();
}
CoUninitialize();


Best Wishes,
-David Delaune
QuestionCListCtrl Pin
john563211-Oct-11 20:43
john563211-Oct-11 20:43 
AnswerRe: CListCtrl Pin
zon_cpp11-Oct-11 21:03
zon_cpp11-Oct-11 21:03 
GeneralRe: CListCtrl Pin
john563211-Oct-11 22:00
john563211-Oct-11 22:00 
GeneralRe: CListCtrl Pin
Randor 11-Oct-11 23:10
professional Randor 11-Oct-11 23:10 
AnswerRe: CListCtrl Pin
Rolf Kristensen12-Oct-11 2:24
Rolf Kristensen12-Oct-11 2:24 
Questionhow to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 7:29
antonio34311-Oct-11 7:29 
AnswerRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 7:49
mveRichard MacCutchan11-Oct-11 7:49 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 7:53
antonio34311-Oct-11 7:53 
GeneralRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 8:08
mveRichard MacCutchan11-Oct-11 8:08 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 8:30
antonio34311-Oct-11 8:30 
AnswerRe: how to write/read in text file with mfc project?? Pin
Maximilien11-Oct-11 7:55
Maximilien11-Oct-11 7:55 
AnswerRe: how to write/read in text file with mfc project?? Pin
Chris Meech11-Oct-11 7:59
Chris Meech11-Oct-11 7:59 
AnswerRe: how to write/read in text file with mfc project?? Pin
Madhu Nair11-Oct-11 8:02
Madhu Nair11-Oct-11 8:02 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 8:19
antonio34311-Oct-11 8:19 
GeneralRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 8:36
mveRichard MacCutchan11-Oct-11 8:36 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 8:51
antonio34311-Oct-11 8:51 
GeneralRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 10:58
mveRichard MacCutchan11-Oct-11 10: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.