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

C / C++ / MFC

 
Questiontool for memory Pin
duta13-May-08 0:39
duta13-May-08 0:39 
AnswerRe: tool for memory Pin
Hamid_RT13-May-08 1:04
Hamid_RT13-May-08 1:04 
QuestionObject detection Pin
projectip13-May-08 0:25
projectip13-May-08 0:25 
AnswerRe: Object detection Pin
Cedric Moonen13-May-08 0:47
Cedric Moonen13-May-08 0:47 
GeneralRe: Object detection Pin
projectip13-May-08 18:57
projectip13-May-08 18:57 
QuestionRe: Object detection Pin
Nelek13-May-08 21:13
protectorNelek13-May-08 21:13 
AnswerRe: Object detection Pin
projectip13-May-08 22:07
projectip13-May-08 22:07 
QuestionResource ID not found even though exists Pin
kildareflare13-May-08 0:12
kildareflare13-May-08 0:12 
Hello,

I have an windows application that has been working for about a year.
It consists of an application that uses dlls to provide localized langauge support. Each dll simply contains the dialogs used in the main app but with the text translated. They also contain the resource.h file.

I have recently made some updates to the main app which have required new buttons and text on the dialogs. The same changes have been made to the dialogs in the dlls.

When I run the app and select an alternate language the appropriate dll is loaded. However a call to GetDlgItem fails because it cannot find the Resource ID listed as it's argument. I know this ID exists, and in fact have placed the offending code within #ifdef just to prove that the symbol is indeed defined.

The same resource ID names are used in both the main app and the dlls.
When using the mains apps dialogs (english) all is fine, but when using the dialogs loaded from the dll a NULL pointer is returned by GetDlgItem.

The call to getDlgItem is not new and has been working fine until now.

Can anyone offer any insight?

The code is listed below. Originally I had this all on one line as per the line commented out. However I have expanded to debug.

Cheers
Rich

//GetDlgItem(IDC_STATIC_OTHER_CURR)->GetWindowPlacement(&wpa);

Static* pItem;

#ifdef IDC_STATIC_OTHER_CURR
	pItem= (CStatic*) GetDlgItem(IDC_STATIC_OTHER_CURR);
	if(pItem == NULL)
	{
              //alternate language versions allways here
        }
	else
	{       //english version ends up here
		pItem->GetWindowPlacement(&wpa);
	}
#endif

AnswerRe: Resource ID not found even though exists Pin
Rajkumar R13-May-08 0:22
Rajkumar R13-May-08 0:22 
GeneralRe: Resource ID not found even though exists Pin
kildareflare13-May-08 0:33
kildareflare13-May-08 0:33 
GeneralRe: Resource ID not found even though exists Pin
kildareflare13-May-08 0:48
kildareflare13-May-08 0:48 
GeneralRe: Resource ID not found even though exists Pin
Rajkumar R13-May-08 1:11
Rajkumar R13-May-08 1:11 
GeneralRe: Resource ID not found even though exists Pin
Rajkumar R13-May-08 1:07
Rajkumar R13-May-08 1:07 
GeneralRe: Resource ID not found even though exists [modified] Pin
kildareflare13-May-08 2:30
kildareflare13-May-08 2:30 
GeneralRe: Resource ID not found even though exists Pin
Rajkumar R13-May-08 2:48
Rajkumar R13-May-08 2:48 
AnswerRe: Resource ID not found even though exists Pin
Iain Clarke, Warrior Programmer13-May-08 2:01
Iain Clarke, Warrior Programmer13-May-08 2:01 
GeneralRe: Resource ID not found even though exists [modified] Pin
kildareflare13-May-08 3:05
kildareflare13-May-08 3:05 
GeneralRe: Resource ID not found even though exists Pin
Iain Clarke, Warrior Programmer13-May-08 3:39
Iain Clarke, Warrior Programmer13-May-08 3:39 
GeneralRe: Resource ID not found even though exists [modified] Pin
kildareflare13-May-08 4:06
kildareflare13-May-08 4:06 
GeneralRe: Resource ID not found even though exists Pin
Iain Clarke, Warrior Programmer13-May-08 4:20
Iain Clarke, Warrior Programmer13-May-08 4:20 
GeneralRe: Resource ID not found even though exists Pin
kildareflare13-May-08 4:47
kildareflare13-May-08 4:47 
GeneralRe: Resource ID not found even though exists Pin
Iain Clarke, Warrior Programmer13-May-08 5:06
Iain Clarke, Warrior Programmer13-May-08 5:06 
GeneralRe: Resource ID not found even though exists Pin
kildareflare13-May-08 5:12
kildareflare13-May-08 5:12 
GeneralRe: Resource ID not found even though exists -RESOLVED Pin
kildareflare15-May-08 4:58
kildareflare15-May-08 4:58 
Questioncreate bitmap out of bytearray and display it on dialog ??? Pin
cmos12-May-08 23:45
cmos12-May-08 23:45 

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.