Dialog Box Problems
From: Andras Zoltan (anonymous_at_discussions.microsoft.com)
Date: 02/11/04
- Next message: R Selvam: "RE: Future?"
- Previous message: WizardLee: "[Emergency!] How to set system default language by code?"
- Next in thread: Jeff Partch [MVP]: "Re: Dialog Box Problems"
- Reply: Jeff Partch [MVP]: "Re: Dialog Box Problems"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Feb 2004 05:46:07 -0800
Oh dearie me, I'm sure this is a totally rudimentary problem to solve but, nevertheless, I am having no joy!
I have a Dialog Box resource and class that I am sharing between two projects. Therefore, I have copied the resource from one project to another, and keep the class code in a path that is a .h and .cpp search path. That's all very good. All it does is to display a text box, ok and cancel buttons, and is used to request a numerical value from the user. When DoModal() ends, I query the double value to get the number only if IDOK is returned.
Problem is that the thing won't even create - yet it used to work!!! Delving into the CDialog Constructor, I notice that the IDD_ I'm passing is not being converted to a valid resource string, hence causing DoModal() to fail. I've checked my IDs, to make sure they marry up with what's in the resource files of the two projects using the dialog, and they do. I'm using MFC in a Shared DLL, because one project is an EXE and the other is a DLL which is loaded by the application (well, a static library used in the application). So I've tried using AFX_MANAGE_STATE() to ensure the resource is found, but it doesn't work either.
There is another Dialog in my extension DLL which is working fine, so it's not down to the configuration of the DLL. The dialog box isn't even working when called from code within the EXE, with the .h and .cpp included in that project (and the resource embedded within it too!).
Please help!
Andras
- Next message: R Selvam: "RE: Future?"
- Previous message: WizardLee: "[Emergency!] How to set system default language by code?"
- Next in thread: Jeff Partch [MVP]: "Re: Dialog Box Problems"
- Reply: Jeff Partch [MVP]: "Re: Dialog Box Problems"
- Messages sorted by: [ date ] [ thread ]