Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DoModal fails in my MFC Extension DLL

465 views
Skip to first unread message

Daniel Luna

unread,
Oct 29, 1997, 3:00:00 AM10/29/97
to


Environment: WIN95
Visual C++ 4.0


Hi there:

I've implemented a MFC Extension DLL (using shared MFC DLL)
called mydll.dll.
In mydll.dll I export a class for using from an application.

I'm bulding an application that implicitly links to mydll.dll,
so I add the import library ( generated when i built mydll.dll ) to the
Object/library modules text box on the LINK tab in the projects Settings.

I've added the include file for the dll to the source file that call
the DLL's exported class too.


<mydll.h>


#ifdef _EXPORTING_APPINI
#define CLASS_DECLSPEC_$$ __declspec( dllexport )
#else
#define CLASS_DECLSPEC_$$ __declspec( dllimport )
#endif

class CLASS_DECLSPEC_$$ CAppIni : public CObject
{
public:
/// public members
public:
// constructors ....
public:
// Definición de las funciones miembro públicas
// accesibles desde cualquier punto

BOOL addSign();
};

Internally, the function addSign invokes DoModal for
a Modal Dialog derived from CFileDialog:

BOOL CAppIni::addSign()
{
CSelDirAppIniDlg dlg;

if (dlg.DoModal()==IDOK)
return TRUE;

int res = CommDlgExtendedError();
return FALSE;
}


The problem is:

DoModal fails and I obtain CDERR_FINDRESFAILURE error.

What can I do for resolving my problem?

Thanks in advance.


.........................................

|
Daniel Luna Rodríguez .| |.
C/Villegas Marmolejo 9, Blq 3-4ºB | |
Sevilla,41005 | | |
| |
Tlfno 4644397 | | |
e-mail | |
<dlu...@mx3.redestb.es> | | |
| |



Jim Marshall

unread,
Oct 29, 1997, 3:00:00 AM10/29/97
to

Have you ensured the resource ID associated with the dialog doesn't conflict
with a resource ID used in the application (in other words you must ensure
the resource ID's used in the DLL are different from the ones used in the
EXE)


--
Its a big enough umbrella,
But its always me that ends up getting wet....
---------------------------------------------------------------------------
---
| Author for Pinnacle Publishing "Visual C++ Developer"
http://www.pinpub.com/ |
| http://lucifer.lotus.com/jim/main.htm
|
---------------------------------------------------------------------------
---

0 new messages