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 8228389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:26:25+00:00 2026-06-07T16:26:25+00:00

I am trying to get a dialog box [import] to launch from another dialog

  • 0

I am trying to get a dialog box [import] to launch from another dialog box [baseline].
I am including the required “.h” files however I am simply not able to create an instance of the import class. The error I get is this:

Error   1   error C2146: syntax error : missing ';' before identifier 'iDlg'    h:\shaunak\projects\sar_ccd\sar_ccd\baseline.h  202 1   Sar_CCD

The line of code that causes this [baseline.h]:

#include "Markup.h" 
#include<stdio.h>
#include<math.h>
#include "baseline_func.h"
#include "resource.h"
#include "Functions.h"
#include <stdlib.h>
#include "Sar_CCDDoc.h"
#include "Sar_CCDView.h"
#include <vector>
#include "MemAlloc.h"
#include "ReadFiles.h"
#include<vector>
#include<map>
#include "afxwin.h"
#include "import.h"
#include "Geocode.h"




**<SNIP: Taking out the irrelevant lines>**

     afx_msg void OnDestroy();
     virtual void PostNcDestroy();
     afx_msg void OnBnClickedNxtBase();
     CButton nextBaseline;


    import iDlg;               //doesnt work!
    CGeocoding cx;             //works!!!
};

However, if I create and instance of another class [Geocoding] using the same sysntax like so, it works fine:

#include "Geocoding.h"
CGeocoding cx;

Please help me figure out why.

Full code:

baseline.h: http://freetexthost.com/on06wref6c
import.h: http://freetexthost.com/x4e4dkwrve

  • 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-06-07T16:26:27+00:00Added an answer on June 7, 2026 at 4:26 pm

    In Visual Studio there is a keyword import or #import rather used to import a COM DLL and is used for other things as well. I guess you are experiencing a name collision there.

    In order to get around it place your class import in a namespace

    import.h
    
    namespace myimport
    {
      class import : public CDialog { 
      ...
      };
    };
    
    import.cpp
    
    namespace myimport
    {
      ...
    };
    

    then when you use it

    myimport::import iDlg;
    

    that should solve the issue, although renaming it to something else than “import” would be the better way to go.

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

Sidebar

Related Questions

I am trying to get the value of a EditText in a dialog box.
I've been trying for a very long time to get this dialog box to
I'm trying to get a rich text editor in a jquery dialog box. I'm
I am trying to get the jQuery dialog box to popup up after pressing
I'm trying to implement to open a custom dialog box having related info from
I've been trying to figure out how to get a jquery dialog box to
So, I'm busy making a model viewer, I'm trying to get my dialog properly
I am using the library 1.1. I am trying to get a simple dialog
I am trying to get a modal confirmation dialog working when a user submits
I am trying to get my Blackberry application to display a custom modal dialog,

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.