CXTPResizeDialog missing constructors |
Post Reply |
Author | |
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Posted: 30 March 2020 at 8:38pm |
I have found that CXTPDialogBase is attempting to reference non-existent code in CXTPResizeDialog. Case in point. In CodeJock 19.1.0, you'll see the following in CXTPDialogBase: # if (_MSC_VER > 1200) //<combine CXTPDialogBase::CXTPDialogBase> CXTPDialogBase(UINT nIDTemplate, UINT nHtmlResID = 0, CWnd* pParentWnd = NULL) : TBase(nIDTemplate, nHtmlResID, pParentWnd) { m_pCommandBars = 0; } //<combine CXTPDialogBase::CXTPDialogBase> CXTPDialogBase(LPCTSTR lpszTemplateName, LPCTSTR szHtmlResID, CWnd* pParentWnd = NULL) : TBase(lpszTemplateName, szHtmlResID, pParentWnd) { m_pCommandBars = 0; } # endif If you have a declaration like this: #define CDialogSampleDlgBase CXTPDialogBase<CXTPResizeDialog> TBase is actually CXTPResizeDialog. CXTPResizeDialog doesn't define the constructors being called here: You can reproduce this by modifying DialogSample. #define CDialogSampleDlgBase CXTPDialogBase<CXTPResizeDialog> class CDialogSampleDlg : public CDialogSampleDlgBase { // Construction public: CDialogSampleDlg(LPCTSTR lpszTemplateName, LPCTSTR szHtmlResID, CWnd* pParentWnd = NULL) : CDialogSampleDlgBase(lpszTemplateName, szHtmlResID, pParentWnd) { } You'll get a compiler error due to CXTPResizeDialog not containing constructors that are being called from CXTPDialogBase |
|
L. Violette
Monolith www.lith.com Xtreme Toolkit Pro v22.1.0 |
|
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
|
For me, the workaround is to add the constructors to CXTPResizeDialog: template<class TBase> class CXTPDialogBase : public TBase { public: ... # if (_MSC_VER > 1200) CXTPResizeDialog(UINT nIDTemplate, UINT nHtmlResID = 0, CWnd* pParentWnd = NULL){} CXTPResizeDialog(LPCTSTR lpszTemplateName, LPCTSTR szHtmlResID, CWnd* pParentWnd = NULL){} # endif ... }; Please advise...
|
|
L. Violette
Monolith www.lith.com Xtreme Toolkit Pro v22.1.0 |
|
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
|
This also results in declarations like this to fail to compile: typedef CXTPDialogBase<CDialog> CDialogBase; class CNonResizeableDlg : public CDialogBase { ... } 4>d:\proj\legacy\code\external\codejock\source\commandbars\xtpdialogbase.h(78): error C2661: 'CDialog::CDialog': no overloaded function takes 3 arguments So are we not supposed to use CXTPDialogBase like this anymore? The addition of those constructors in CXTPDialogBase is causing lots of problems like this, making me think we're supposed to do things differently now. |
|
L. Violette
Monolith www.lith.com Xtreme Toolkit Pro v22.1.0 |
|
Fredrik
Senior Member Joined: 22 June 2005 Status: Offline Points: 235 |
Post Options
Thanks(1)
|
I filed this as a bug and got an answer about a week ago it has been fixed and will be available in the next release and to use my workaround (similar to yours) until then.
|
|
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |