Click here to Skip to main content
15,901,284 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralChang Dll Version Pin
Tony Li26-Jun-01 10:54
Tony Li26-Jun-01 10:54 
GeneralChang Dll Version Pin
Tony Li26-Jun-01 10:53
Tony Li26-Jun-01 10:53 
GeneralRe: Chang Dll Version Pin
26-Jun-01 11:29
suss26-Jun-01 11:29 
GeneralRe: Chang Dll Version Pin
Tony Li26-Jun-01 17:10
Tony Li26-Jun-01 17:10 
GeneralDBTIMESTAMP Pin
Don Burton26-Jun-01 10:39
Don Burton26-Jun-01 10:39 
GeneralCommenting code Pin
26-Jun-01 9:09
suss26-Jun-01 9:09 
GeneralRe: Commenting code Pin
Chris Losinger26-Jun-01 9:35
professionalChris Losinger26-Jun-01 9:35 
GeneralNLS implementation Pin
Lakshmi26-Jun-01 8:11
Lakshmi26-Jun-01 8:11 
Hi,

I'm working on making an application NLS compliant which is mainly dialog based. What I've to do is I need to load the application's dialog from a resource dll based on the operating system's language. My implementation is as below.

GetUserDefaultUILanguage = (GETUSERDEFAULTUILANGUAGE*)GetProcAddress(hClusAPI, "GetUserDefaultUILanguage");
LANGID Language = GetUserDefaultUILanguage();

_stprintf(g_tcsTemp, _TEXT("res%x.dll"),Language);
if(strcmp(g_tcsTemp, "res409.dll"))
{
HMODULE hLibrary = LoadLibraryEx(g_tcsTemp, NULL,LOAD_LIBRARY_AS_DATAFILE);

if(hLibrary!=NULL)
AfxMessageBox("Other library has been successfully loaded in the system");
HRSRC ResInfo = FindResource(hLibrary,"#102",RT_DIALOG);
ResHndl = LoadResource(hLibrary,ResInfo);
}
else
{
HMODULE hLibrary = LoadLibraryEx(g_tcsTemp, NULL, LOAD_LIBRARY_AS_DATAFILE);
res = GetLastError();

HRSRC ResInfo = FindResource(hLibrary, "#102",RT_DIALOG);
ResHndl = LoadResource(hLibrary, ResInfo);
}


dlg1.CreateIndirect(ResHndl,NULL);
dlg1.ShowWindow(SW_SHOWNORMAL);

This method seems to work, but since CreateIndirect returns immediately the dialog is seen for a fraction of second. Then I used InitModalIndirect API instead of CreateIndirect making the dialog resource modal. Dialog comes up but it always gives assersion in ASSERT(m_lpszTemplateName == NULL);(DLGCORE.CPP line no.430).

nResponse = dlg1.InitModalIndirect(ResHndl,NULL);
dlg1.DoModal();
If any one knows about NLS implementation by loading dialog from resource dll, Please let me know.

Thanks in advance,
Lakshmi.

GeneralRe: NLS implementation Pin
26-Jun-01 8:35
suss26-Jun-01 8:35 
GeneralRe: NLS implementation Pin
Lakshmi26-Jun-01 9:42
Lakshmi26-Jun-01 9:42 
GeneralRe: NLS implementation Pin
26-Jun-01 10:10
suss26-Jun-01 10:10 
GeneralRe: NLS implementation Pin
Ben Burnett26-Jun-01 10:31
Ben Burnett26-Jun-01 10:31 
Generalget JUST necessary info from Http Pin
26-Jun-01 6:18
suss26-Jun-01 6:18 
GeneralCompression for Multiples Files Pin
BLaZe26-Jun-01 4:33
BLaZe26-Jun-01 4:33 
GeneralCan't access varables in theApp! Pin
26-Jun-01 4:06
suss26-Jun-01 4:06 
GeneralRe: Can't access varables in theApp! Pin
26-Jun-01 5:01
suss26-Jun-01 5:01 
GeneralSubmitting array of data to a VB OCX through VC++ Pin
Dashmesh A. Singh26-Jun-01 3:03
Dashmesh A. Singh26-Jun-01 3:03 
GeneralRe: Submitting array of data to a VB OCX through VC++ Pin
26-Jun-01 8:32
suss26-Jun-01 8:32 
GeneralDisabe a ctreectrl item Pin
26-Jun-01 2:59
suss26-Jun-01 2:59 
QuestionCall one process from another process? Pin
Kiddxin26-Jun-01 2:00
Kiddxin26-Jun-01 2:00 
AnswerRe: Call one process from another process? Pin
Claudius Mokler26-Jun-01 4:50
Claudius Mokler26-Jun-01 4:50 
AnswerRe: Call one process from another process? Pin
Tomasz Sowinski26-Jun-01 5:11
Tomasz Sowinski26-Jun-01 5:11 
GeneralPutting an icon in the systray Pin
26-Jun-01 0:48
suss26-Jun-01 0:48 
GeneralRe: Putting an icon in the systray Pin
Le Ridder Noir26-Jun-01 1:18
Le Ridder Noir26-Jun-01 1:18 
Generaldatabase Pin
26-Jun-01 0:12
suss26-Jun-01 0:12 

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.