The Origin Dialog Project Template (odialog.awx) is only compatible with Visual Studio 6. This article will walk you through the steps necessary to make a resource-only DLL using Visual Studio 2008 or 2010. It will then show you how to use your DLL in Origin C.
Here is an example of how to build a resource-only DLL that is accessible in Origin C. After following these steps you will have a Visual Studio solution for building a 32-bit DLL. The next section will then show you how to add 64-bit support to your solution.
The above steps will create a 32-bit resource-only DLL. The following steps will show you how to create a 64-bit resource-only DLL by adding an x64 (64-bit) configuration to your Visual Studio project.
Now you can switch between making a 32-bit (Win32) and a 64-bit (x64) DLL using the "Solutions Platform" setting in the toolbar.
The following steps show you how to access the DLL created above, using Origin C.
// the file name of resource DLL
#define STR_DLG_RESOURCE_DLL "Welcome_64" // 64 bit DLL
#define STR_DLG_RESOURCE_DLL "Welcome" // 32 bit DLL
class MyDialog : public Dialog
MyDialog() : Dialog(IDD_MY_DIALOG, STR_DLG_RESOURCE_DLL)
int DoModal(HWND hParent = NULL)
int nRet = Dialog::DoModal(hParent);
this->Text = "Welcome";
m_editCtrl = GetItem(IDC_EDIT1);
m_editCtrl.Text = "Enter a message here.";
MessageBox(GetSafeHwnd(), m_editCtrl.Text, this->Text);
myDlg.DoModal( GetWindow() );