Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4023480
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:36:13+00:00 2026-05-20T10:36:13+00:00

I copied an existing header for a dlg box class (created with the dlg

  • 0

I copied an existing header for a dlg box class (created with the dlg class wizard/mfc wizard). All seemed to go fine until I added the cpp file to the project. Now i get odd link errors for some mfc magic methods:

error LNK2001: unresolved external
symbol “public: virtual struct
CRuntimeClass * __thiscall
DlgGapWindow::GetRuntimeClass(void)const
”
(?GetRuntimeClass@DlgGapWindow@@UBEPAUCRuntimeClass@@XZ)

error LNK2001: unresolved external
symbol “protected: virtual struct
AFX_MSGMAP const * __thiscall
DlgGapWindow::GetMessageMap(void)const
”
(?GetMessageMap@DlgGapWindow@@MBEPBUAFX_MSGMAP@@XZ)

Why would this be?

Here is the relevant code in the header

class DlgGapWindow : public CDialog
{
    DECLARE_DYNAMIC(DlgGapWindow)

public:

    DlgGapWindow(CWnd* pParent = NULL);

    virtual ~DlgGapWindow();
    virtual BOOL PreTranslateMessage(MSG* pMsg);


protected:  
    virtual BOOL OnInitDialog();
    enum { IDD = IDD_DIALOG_GAP_VIEW };// Dialog Data

    GapViewer m_chart;  

protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

    afx_msg void OnSize(UINT nType, int cx, int cy); 
    afx_msg void OnSizing(UINT fwSide, LPRECT pRect) ;
    afx_msg void OnTimer(ONTIMER_TYPE nIDEvent);
    afx_msg void OnDestroy();
    afx_msg void OnClose();
    afx_msg void OnActivate(UINT,CWnd *,BOOL);
    afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
    afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);

    DECLARE_MESSAGE_MAP()

};

I don’t see anything from the class I modeled it after that seems to be missing. I have not found anything useful with google or other searches to indicate why these magic mfc things are missing. My other classes don’t explicitly define them and they don’t have errors.

The RC file does have a corresponding dlg definition.

EDIT:

Thanks for the DECLARE_DYNAMIC help – now I do not have the GetRuntimClass() error – just the GetMessagemap() error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:36:13+00:00Added an answer on May 20, 2026 at 10:36 am

    You used DECLARE_DYNAMIC but forgot IMPLEMENT_DYNAMIC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Owners class defined that is used just fine in existing classes.
I created a brand new blank Visual Studio 2010 solution, and added an existing
I copied this class from a similar class I have in this app that
I copied a solution to another directory and changed all the Namespaces, removed TFS
Following the instructions at Add header (copyright) information to existing source files , I
i copied an existing svn folder (a) to a new folder b and want
I have an existing WebForms project to which I'm adding MVC pages. I created
I've created a multisite wordpress environment and made sites under it... I copied over
I want to prepend IP header on an existing IP packet while inside NF_HOOK_LOCAL_OUT.
I just copied an existing project to a brand new machine to start developing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.