Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPResizeDialog missing constructors
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPResizeDialog missing constructors

 Post Reply Post Reply
Author
Message
lviolette View Drop Down
Groupie
Groupie
Avatar

Joined: 17 March 2007
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote lviolette Quote  Post ReplyReply Direct Link To This Post Topic: CXTPResizeDialog missing constructors
    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
Back to Top
lviolette View Drop Down
Groupie
Groupie
Avatar

Joined: 17 March 2007
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote lviolette Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2020 at 8:43pm
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
Back to Top
lviolette View Drop Down
Groupie
Groupie
Avatar

Joined: 17 March 2007
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote lviolette Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2020 at 9:29pm
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
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (1) Thanks(1)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2020 at 1:45am
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.