Help.. adui.h error

Help.. adui.h error

Anonymous
Not applicable
1,392 Views
8 Replies
Message 1 of 9

Help.. adui.h error

Anonymous
Not applicable

i'll try to make UI in autocad ....and i use adui.h and acui.h ....

but it gives me error like....

 

c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(45): error C2061: syntax error: identifier 'CString'
1>c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(48): error C2065: 'CWnd': undeclared identifier
1>c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(48): error C2065: 'dlg': undeclared identifier
1>c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(48): error C2065: 'CFont': undeclared identifier
1>c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(48): error C2065: 'font': undeclared identifier
1>c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(48): error C2182: 'AdUiSubstituteShellFont': illegal use of type 'void'
1>c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(56): error C2143: syntax error: missing ';' before '*'
1>c:\autodesk\autodesk_objectarx_2018_win_64_and_32_bit\inc\adui.h(56): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\afxv_w32.h(16): fatal error C1189: #error: WINDOWS.H already included. MFC apps must not #include <windows.h>

 

pls help...

0 Likes
Accepted solutions (1)
1,393 Views
8 Replies
Replies (8)
Message 2 of 9

Alexander.Rivilis
Mentor
Mentor

@Anonymous

Your project have to be support MFC. So you have to include some afxXXX.h files. See \samples\editor\mfcsamps\acuisample_dg\StdAfx.h

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 9

zrobert
Advocate
Advocate

Hi;

Have you compiled a sample project, or did you create your own project?

If you have created a new project with the Arx wizard, you must turn on MFC support.

 

 

 

0 Likes
Message 4 of 9

Anonymous
Not applicable

i compiled the sample and it works fine ...

but in my my project when i use adui.h and acui.h header files i got errors...

0 Likes
Message 5 of 9

Alexander.Rivilis
Mentor
Mentor

@Anonymous

You have to create new project with MFC support in order to use ObjectARX MFC Extension (e.g. adui.h/acui.h and so on).

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 6 of 9

Anonymous
Not applicable

i saw the file... i that only #include "stdafx.h" is written...

i add the resource (dialogbox) in my project via visual studio..

but when i add Header files adui.h and acui.h i got errors...

and also i add the library which is say in the objectarx refrence guide...for using acui.h and adui.h

0 Likes
Message 7 of 9

Alexander.Rivilis
Mentor
Mentor
Accepted solution

@Anonymous wrote:

i saw the file... i that only #include "stdafx.h" is written...

i add the resource (dialogbox) in my project via visual studio..

but when i add Header files adui.h and acui.h i got errors...

and also i add the library which is say in the objectarx refrence guide...for using acui.h and adui.h


My recommendation was see stdafx.h (not stdafx.cpp)

This code is required for MFC support:

#if defined(_DEBUG) && !defined(AC_FULL_DEBUG)
#define WAS_DEBUG
#undef _DEBUG
#endif


#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#ifndef WINVER
#define WINVER 0x501
#endif

#define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions

#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h>         // MFC OLE classes
#include <afxodlgs.h>       // MFC OLE dialog classes
#include <afxdisp.h>        // MFC OLE automation classes
#endif // _AFX_NO_OLE_SUPPORT


#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h>          // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT

#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h>         // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT

#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>         // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT


#ifdef WAS_DEBUG
#define _DEBUG
#undef WAS_DEBUG
#endif

 

 

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 8 of 9

Anonymous
Not applicable

i add this code and it works fine...

and i try to do same like sample given in objectarx ...

by making dialog in visual studio..make class of it ....and when i call it in my project ...aotucad get crash...

gives assertion failed in afxwin1.inl line 24

pls help

0 Likes
Message 9 of 9

Alexander.Rivilis
Mentor
Mentor

@Anonymous

Without your full code it is impossible to understand what wrong.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes