Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ATL exe + aftext.h - error

Status
Not open for further replies.

kopiev

Programmer
Dec 8, 2006
2
RU
Hello everyone from novice,
Attempts to create executable with functionality of COM server.
The problem: ATL project (simple), executable with MFC shared dll option. It works fine until i've tried to attach file "afxext.h" (CToolBar, CModelessDialog). It gives the error: compiler demands to use ATL dll with shared MFC attached. It works in this case in fact. But this means that i will have to create simple executable starter for new dll with complicated form to use it independently from container. As i suppose this is not the best solution in this case.
Remark: if to create executable as MFC project with specifications of support MFC and needed coclass it refuses to attach it by "CoCreateInstance" to container or gives an error about redeclaration of 'extern "C" WINAPI _tWinMain' in MFC.
If you have any links with code clauses useful in this case or have any other ideas, i will really appreciate it.

Thank you in advance
 
I want to add one thing else.There is some inaccuracy in the post: class CModelessDialog is from sample project and is derived from CDialog. So that's not the point. Actually it is CToolBar and CStatusBar.
dll works fine and shows all necessary dialog items (StatusBar, ToolBar and Menu bar)

kopiev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top