Visual Studio Class Wizard - failed to retrieve controls of dialog

219 views Asked by At

If I try in Visual Studio 2019 run class wizard for some dialog, the error "Failed retrieve controls of dialog 'IDD.....' is shown. But after it is class wizard opened and work properly. But I am interesting, why it throw this error.

Failed retrieve...

Dialog is inherited from my own class, not from CDialogEx. But My own class is inherited from CDialogEx.

My dialog class code:

#pragma once
#include "resource.h"
#include "CMjAcDialog.h"

// CMjcDlgVyberTrasu dialog

class CMjcDlgVyberTrasu : public CMjAcDialog
{
    DECLARE_DYNAMIC(CMjcDlgVyberTrasu)

public:
    CMjcDlgVyberTrasu(CWnd* pParent = nullptr);   // standard constructor
    virtual ~CMjcDlgVyberTrasu();

// Dialog Data
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_VYBER_TRASU };
#endif

protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    vector<CMajTrasa *> *m_pVecOfTrasy;
    CListCtrl m_cList;

    DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnBnClickedBtUkaz();
    virtual BOOL OnInitDialog();
};

And part of my my Dialog Class CMjAcDialog code:

class CMjAcDialog : public CDialogEx

{
    DECLARE_DYNAMIC(CMjAcDialog)

protected:
    UINT m_IDD;
    CMajCtrlMap m_majCtrlMap;
    CFont m_Font_mid, m_Font_big;
    CString m_csDlgTitle;
    HICON m_hIcon;

private:
    int m_idMainIcon;
    float m_dCurDpiScale;

// konstruktor
public:
    CMjAcDialog(UINT idd, CWnd* pParent = NULL, CString acsWinCaption = L"", int idMainIcon = 0);
    ~CMjAcDialog();

protected:
    virtual BOOL OnInitDialog();
.....
....
1

There are 1 answers

0
Peter Beecken On

Worked in my case after deleting the .aps