<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using resource defined in MFC DLL project from ARXProject in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280945#M18840</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
We use AutoCad Architect 2009 with ObjectARX 2009 and Visual Studio 2005 SP1.&lt;BR /&gt;
&lt;BR /&gt;
We define in an ARX Project the function below :&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
CAcModuleResourceOverride temp;&lt;BR /&gt;
CDisplay a;&lt;BR /&gt;
a.Display();&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In this function, we want to display a resource define in a MFC extension DLL.&lt;BR /&gt;
&lt;BR /&gt;
void CDisplay::Display()&lt;BR /&gt;
{&lt;BR /&gt;
CString cs;&lt;BR /&gt;
cs.LoadStringW(IDS_Hello);&lt;BR /&gt;
AfxMessageBox(cs);&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
When we execute our command TEST1 in Autocad, we have an Assert in AfxWin1.inl :&lt;BR /&gt;
&lt;BR /&gt;
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()&lt;BR /&gt;
{ ASSERT(afxCurrentResourceHandle != NULL);&lt;BR /&gt;
return afxCurrentResourceHandle; }&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your help,</description>
    <pubDate>Wed, 18 Jun 2008 14:58:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-06-18T14:58:42Z</dc:date>
    <item>
      <title>Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280945#M18840</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
We use AutoCad Architect 2009 with ObjectARX 2009 and Visual Studio 2005 SP1.&lt;BR /&gt;
&lt;BR /&gt;
We define in an ARX Project the function below :&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
CAcModuleResourceOverride temp;&lt;BR /&gt;
CDisplay a;&lt;BR /&gt;
a.Display();&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In this function, we want to display a resource define in a MFC extension DLL.&lt;BR /&gt;
&lt;BR /&gt;
void CDisplay::Display()&lt;BR /&gt;
{&lt;BR /&gt;
CString cs;&lt;BR /&gt;
cs.LoadStringW(IDS_Hello);&lt;BR /&gt;
AfxMessageBox(cs);&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
When we execute our command TEST1 in Autocad, we have an Assert in AfxWin1.inl :&lt;BR /&gt;
&lt;BR /&gt;
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()&lt;BR /&gt;
{ ASSERT(afxCurrentResourceHandle != NULL);&lt;BR /&gt;
return afxCurrentResourceHandle; }&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your help,</description>
      <pubDate>Wed, 18 Jun 2008 14:58:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280945#M18840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-18T14:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280946#M18841</link>
      <description>&amp;gt; When we execute our command TEST1 in Autocad, we&lt;BR /&gt;
&amp;gt; have an Assert in AfxWin1.inl :&lt;BR /&gt;
&lt;BR /&gt;
  Is CDisplay::Display() defined in the .arx module?  Did you use the &lt;BR /&gt;
ObjectARX wizard to create your project skeleton?&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Wed, 18 Jun 2008 16:24:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280946#M18841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-18T16:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280947#M18842</link>
      <description>Hello Owen, &lt;BR /&gt;
&lt;BR /&gt;
Tanks for your reply.&lt;BR /&gt;
I've found a solution, and it's work fine!! But now, I've another problem when I try to load a DialogBoxe defined in my MFC dll...&lt;BR /&gt;
To answer, your question, yes I use the ObjectARX wizard to create my project skeleton and The CDisplay::Display() method is defined in my MFC DLL module.&lt;BR /&gt;
&lt;BR /&gt;
First, that is what I have done (if it could help someone else...) :&lt;BR /&gt;
&lt;BR /&gt;
In my ARX module  :&lt;BR /&gt;
------------------&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
	CAcModuleResourceOverride temp;&lt;BR /&gt;
	CDisplay a;&lt;BR /&gt;
	a.Display(acedGetAcadResourceInstance(), acedGetAcadFrame() );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In my MFC DLL module :&lt;BR /&gt;
--------------------&lt;BR /&gt;
&lt;BR /&gt;
In the CDisplay.h file :&lt;BR /&gt;
&lt;BR /&gt;
static HINSTANCE hInstanceSafe;&lt;BR /&gt;
&lt;BR /&gt;
In the entry point of my MFC DLL module :&lt;BR /&gt;
&lt;BR /&gt;
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)&lt;BR /&gt;
{&lt;BR /&gt;
	CDisplay::hInstanceSafe = hInstance;&lt;BR /&gt;
	...&lt;BR /&gt;
	...&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In the CDisplay.cpp file :&lt;BR /&gt;
&lt;BR /&gt;
HINSTANCE CDisplay::hInstanceSafe = NULL;&lt;BR /&gt;
void CDisplay::Display( HINSTANCE h, CWnd* pParent )&lt;BR /&gt;
{&lt;BR /&gt;
	AfxSetResourceHandle( hInstanceSafe );&lt;BR /&gt;
&lt;BR /&gt;
	CString cs;&lt;BR /&gt;
	cs.LoadStringW(IDS_Bonjour);&lt;BR /&gt;
	AfxMessageBox(cs);&lt;BR /&gt;
&lt;BR /&gt;
	AfxSetResourceHandle( h );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The Step2, and my real goal, is to display a DialogBoxe, defined in my MFC DLL module.&lt;BR /&gt;
I've tried all solutions I've found on the net, but nothing work for me.&lt;BR /&gt;
&lt;BR /&gt;
Now, when I call DoModal(), I have an Assert in objcore.cpp :&lt;BR /&gt;
&lt;BR /&gt;
BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const&lt;BR /&gt;
{&lt;BR /&gt;
	ENSURE(this != NULL);&lt;BR /&gt;
	// it better be in valid memory, at least for CObject size&lt;BR /&gt;
	ASSERT(AfxIsValidAddress(this, sizeof(CObject)));&lt;BR /&gt;
	...&lt;BR /&gt;
	...&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
That is what I have done :&lt;BR /&gt;
&lt;BR /&gt;
In my ARX module :&lt;BR /&gt;
------------------&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
	CAcModuleResourceOverride temp;&lt;BR /&gt;
&lt;BR /&gt;
	CDisplay a;	&lt;BR /&gt;
	a.Display( acedGetAcadResourceInstance(), acedGetAcadFrame() );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In my MFC DLL :&lt;BR /&gt;
--------------&lt;BR /&gt;
&lt;BR /&gt;
void CDisplay::Display( HINSTANCE h, CWnd* pParent )&lt;BR /&gt;
{&lt;BR /&gt;
	AfxSetResourceHandle( hInstanceSafe );&lt;BR /&gt;
&lt;BR /&gt;
	CDlgBidon* pDlg = new CDlgBidon( pParent );&lt;BR /&gt;
	pDlg-&amp;gt;DoModal();&lt;BR /&gt;
	pDlg-&amp;gt;DestroyWindow();&lt;BR /&gt;
	delete pDlg;&lt;BR /&gt;
&lt;BR /&gt;
	/*CString cs;&lt;BR /&gt;
	cs.LoadStringW(IDS_Bonjour);&lt;BR /&gt;
	AfxMessageBox(cs);*/&lt;BR /&gt;
&lt;BR /&gt;
	AfxSetResourceHandle( h );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
What's going wrong??&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help,&lt;BR /&gt;
&lt;BR /&gt;
Sophie D.</description>
      <pubDate>Thu, 19 Jun 2008 07:31:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280947#M18842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-19T07:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280948#M18843</link>
      <description>Having this problem in debug builds, release builds, or both?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;ELCOM&gt; wrote in message news:5961074@discussion.autodesk.com...&lt;BR /&gt;
Hello Owen, &lt;BR /&gt;
&lt;BR /&gt;
Tanks for your reply.&lt;BR /&gt;
I've found a solution, and it's work fine!! But now, I've another problem when I try to load a DialogBoxe defined in my MFC dll...&lt;BR /&gt;
To answer, your question, yes I use the ObjectARX wizard to create my project skeleton and The CDisplay::Display() method is defined in my MFC DLL module.&lt;BR /&gt;
&lt;BR /&gt;
First, that is what I have done (if it could help someone else...) :&lt;BR /&gt;
&lt;BR /&gt;
In my ARX module  :&lt;BR /&gt;
------------------&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
CAcModuleResourceOverride temp;&lt;BR /&gt;
CDisplay a;&lt;BR /&gt;
a.Display(acedGetAcadResourceInstance(), acedGetAcadFrame() );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In my MFC DLL module :&lt;BR /&gt;
--------------------&lt;BR /&gt;
&lt;BR /&gt;
In the CDisplay.h file :&lt;BR /&gt;
&lt;BR /&gt;
static HINSTANCE hInstanceSafe;&lt;BR /&gt;
&lt;BR /&gt;
In the entry point of my MFC DLL module :&lt;BR /&gt;
&lt;BR /&gt;
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)&lt;BR /&gt;
{&lt;BR /&gt;
CDisplay::hInstanceSafe = hInstance;&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In the CDisplay.cpp file :&lt;BR /&gt;
&lt;BR /&gt;
HINSTANCE CDisplay::hInstanceSafe = NULL;&lt;BR /&gt;
void CDisplay::Display( HINSTANCE h, CWnd* pParent )&lt;BR /&gt;
{&lt;BR /&gt;
AfxSetResourceHandle( hInstanceSafe );&lt;BR /&gt;
&lt;BR /&gt;
CString cs;&lt;BR /&gt;
cs.LoadStringW(IDS_Bonjour);&lt;BR /&gt;
AfxMessageBox(cs);&lt;BR /&gt;
&lt;BR /&gt;
AfxSetResourceHandle( h );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The Step2, and my real goal, is to display a DialogBoxe, defined in my MFC DLL module.&lt;BR /&gt;
I've tried all solutions I've found on the net, but nothing work for me.&lt;BR /&gt;
&lt;BR /&gt;
Now, when I call DoModal(), I have an Assert in objcore.cpp :&lt;BR /&gt;
&lt;BR /&gt;
BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const&lt;BR /&gt;
{&lt;BR /&gt;
ENSURE(this != NULL);&lt;BR /&gt;
// it better be in valid memory, at least for CObject size&lt;BR /&gt;
ASSERT(AfxIsValidAddress(this, sizeof(CObject)));&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
That is what I have done :&lt;BR /&gt;
&lt;BR /&gt;
In my ARX module :&lt;BR /&gt;
------------------&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
CAcModuleResourceOverride temp;&lt;BR /&gt;
&lt;BR /&gt;
CDisplay a; &lt;BR /&gt;
a.Display( acedGetAcadResourceInstance(), acedGetAcadFrame() );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In my MFC DLL :&lt;BR /&gt;
--------------&lt;BR /&gt;
&lt;BR /&gt;
void CDisplay::Display( HINSTANCE h, CWnd* pParent )&lt;BR /&gt;
{&lt;BR /&gt;
AfxSetResourceHandle( hInstanceSafe );&lt;BR /&gt;
&lt;BR /&gt;
CDlgBidon* pDlg = new CDlgBidon( pParent );&lt;BR /&gt;
pDlg-&amp;gt;DoModal();&lt;BR /&gt;
pDlg-&amp;gt;DestroyWindow();&lt;BR /&gt;
delete pDlg;&lt;BR /&gt;
&lt;BR /&gt;
/*CString cs;&lt;BR /&gt;
cs.LoadStringW(IDS_Bonjour);&lt;BR /&gt;
AfxMessageBox(cs);*/&lt;BR /&gt;
&lt;BR /&gt;
AfxSetResourceHandle( h );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
What's going wrong??&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help,&lt;BR /&gt;
&lt;BR /&gt;
Sophie D.&lt;/ELCOM&gt;</description>
      <pubDate>Thu, 19 Jun 2008 11:04:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280948#M18843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-19T11:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280949#M18844</link>
      <description>Hi Tony,&lt;BR /&gt;
&lt;BR /&gt;
I've this problem on both debug and release builds.&lt;BR /&gt;
&lt;BR /&gt;
Sophie.</description>
      <pubDate>Thu, 19 Jun 2008 11:08:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280949#M18844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-19T11:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280950#M18845</link>
      <description>Elcom,&lt;BR /&gt;
&lt;BR /&gt;
Have you added this macro prior to running you function?&lt;BR /&gt;
&lt;BR /&gt;
myFunction()&lt;BR /&gt;
{&lt;BR /&gt;
    MFC_RESOURCE_INIT;&lt;BR /&gt;
&lt;BR /&gt;
    do_it_now();&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards Gary.&lt;BR /&gt;
&lt;BR /&gt;
www.drcauto.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;ELCOM&gt; wrote in message news:5961074@discussion.autodesk.com...&lt;BR /&gt;
Hello Owen,&lt;BR /&gt;
&lt;BR /&gt;
Tanks for your reply.&lt;BR /&gt;
I've found a solution, and it's work fine!! But now, I've another problem &lt;BR /&gt;
when I try to load a DialogBoxe defined in my MFC dll...&lt;BR /&gt;
To answer, your question, yes I use the ObjectARX wizard to create my &lt;BR /&gt;
project skeleton and The CDisplay::Display() method is defined in my MFC DLL &lt;BR /&gt;
module.&lt;BR /&gt;
&lt;BR /&gt;
First, that is what I have done (if it could help someone else...) :&lt;BR /&gt;
&lt;BR /&gt;
In my ARX module  :&lt;BR /&gt;
------------------&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
CAcModuleResourceOverride temp;&lt;BR /&gt;
CDisplay a;&lt;BR /&gt;
a.Display(acedGetAcadResourceInstance(), acedGetAcadFrame() );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In my MFC DLL module :&lt;BR /&gt;
--------------------&lt;BR /&gt;
&lt;BR /&gt;
In the CDisplay.h file :&lt;BR /&gt;
&lt;BR /&gt;
static HINSTANCE hInstanceSafe;&lt;BR /&gt;
&lt;BR /&gt;
In the entry point of my MFC DLL module :&lt;BR /&gt;
&lt;BR /&gt;
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)&lt;BR /&gt;
{&lt;BR /&gt;
CDisplay::hInstanceSafe = hInstance;&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In the CDisplay.cpp file :&lt;BR /&gt;
&lt;BR /&gt;
HINSTANCE CDisplay::hInstanceSafe = NULL;&lt;BR /&gt;
void CDisplay::Display( HINSTANCE h, CWnd* pParent )&lt;BR /&gt;
{&lt;BR /&gt;
AfxSetResourceHandle( hInstanceSafe );&lt;BR /&gt;
&lt;BR /&gt;
CString cs;&lt;BR /&gt;
cs.LoadStringW(IDS_Bonjour);&lt;BR /&gt;
AfxMessageBox(cs);&lt;BR /&gt;
&lt;BR /&gt;
AfxSetResourceHandle( h );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The Step2, and my real goal, is to display a DialogBoxe, defined in my MFC &lt;BR /&gt;
DLL module.&lt;BR /&gt;
I've tried all solutions I've found on the net, but nothing work for me.&lt;BR /&gt;
&lt;BR /&gt;
Now, when I call DoModal(), I have an Assert in objcore.cpp :&lt;BR /&gt;
&lt;BR /&gt;
BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const&lt;BR /&gt;
{&lt;BR /&gt;
ENSURE(this != NULL);&lt;BR /&gt;
// it better be in valid memory, at least for CObject size&lt;BR /&gt;
ASSERT(AfxIsValidAddress(this, sizeof(CObject)));&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
That is what I have done :&lt;BR /&gt;
&lt;BR /&gt;
In my ARX module :&lt;BR /&gt;
------------------&lt;BR /&gt;
&lt;BR /&gt;
void CSendingCommandsApp::AdskSendingCommands_TEST1(void)&lt;BR /&gt;
{&lt;BR /&gt;
CAcModuleResourceOverride temp;&lt;BR /&gt;
&lt;BR /&gt;
CDisplay a;&lt;BR /&gt;
a.Display( acedGetAcadResourceInstance(), acedGetAcadFrame() );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
In my MFC DLL :&lt;BR /&gt;
--------------&lt;BR /&gt;
&lt;BR /&gt;
void CDisplay::Display( HINSTANCE h, CWnd* pParent )&lt;BR /&gt;
{&lt;BR /&gt;
AfxSetResourceHandle( hInstanceSafe );&lt;BR /&gt;
&lt;BR /&gt;
CDlgBidon* pDlg = new CDlgBidon( pParent );&lt;BR /&gt;
pDlg-&amp;gt;DoModal();&lt;BR /&gt;
pDlg-&amp;gt;DestroyWindow();&lt;BR /&gt;
delete pDlg;&lt;BR /&gt;
&lt;BR /&gt;
/*CString cs;&lt;BR /&gt;
cs.LoadStringW(IDS_Bonjour);&lt;BR /&gt;
AfxMessageBox(cs);*/&lt;BR /&gt;
&lt;BR /&gt;
AfxSetResourceHandle( h );&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
What's going wrong??&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help,&lt;BR /&gt;
&lt;BR /&gt;
Sophie D.&lt;/ELCOM&gt;</description>
      <pubDate>Thu, 19 Jun 2008 13:18:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280950#M18845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-19T13:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280951#M18846</link>
      <description>Hello Gary,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your reply, but could you be more clear please? I don't understand what you suggest me to do. What is this macro MFC_RESOURCE_INIT? I don't find it.&lt;BR /&gt;
&lt;BR /&gt;
Regards,</description>
      <pubDate>Fri, 20 Jun 2008 06:59:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280951#M18846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-20T06:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using resource defined in MFC DLL project from ARXProject</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280952#M18847</link>
      <description>Sophie,&lt;BR /&gt;
&lt;BR /&gt;
Sorry about that was one of ours!&lt;BR /&gt;
&lt;BR /&gt;
I think your problem is here.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)&lt;BR /&gt;
{&lt;BR /&gt;
CDisplay::hInstanceSafe = hInstance;&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
You don't appear to be initializing it!&lt;BR /&gt;
&lt;BR /&gt;
Try this!&lt;BR /&gt;
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)&lt;BR /&gt;
{&lt;BR /&gt;
    if (dwReason == DLL_PROCESS_ATTACH) {&lt;BR /&gt;
&lt;BR /&gt;
        _hdllInstance = hInstance;&lt;BR /&gt;
&lt;BR /&gt;
        // CDisplay initialization&lt;BR /&gt;
&lt;BR /&gt;
        CDisplay::SetDefaultResource(_hdllInstance);&lt;BR /&gt;
&lt;BR /&gt;
    }&lt;BR /&gt;
&lt;BR /&gt;
..................&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Regards Gary.&lt;BR /&gt;
www.drcauto.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;ELCOM&gt; wrote in message news:5962236@discussion.autodesk.com...&lt;BR /&gt;
Hello Gary,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your reply, but could you be more clear please? I don't &lt;BR /&gt;
understand what you suggest me to do. What is this macro MFC_RESOURCE_INIT? &lt;BR /&gt;
I don't find it.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;/ELCOM&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:47:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-resource-defined-in-mfc-dll-project-from-arxproject/m-p/2280952#M18847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-20T12:47:13Z</dc:date>
    </item>
  </channel>
</rss>

