Create a dialog box in a COM dll without CWinApp  
Author Message
bioan





PostPosted: Visual C++ General, Create a dialog box in a COM dll without CWinApp Top

Hello!

I try to build a COM dll addin which is designed to work together with an external application.. an exe. The dll is not using CWinApp. In the same time, I can’t add DIRECTLY a resoursce - a dialog window in this dll. From the addin point of view I just can obtain almost everything i need from the exe: the application, view, or document objects of executable. It is still possible to insert a dialog box in this addin, which need to communicate with the exe, and put some buttons, and other stuff in it For exemple i need a simple dialog box created inside the dll which has one button, and allow me to selected some screen entities from exe working area. I repeat, is now way to work with CWinApp inside dll.

Kind regards

Ioan



Visual C++9  
 
 
Peter Ritchie





PostPosted: Visual C++ General, Create a dialog box in a COM dll without CWinApp Top

Wherever the DLL needs to display a dialog it will need to be given a window handle in order to use as the parent for the dialog--essential if the dialog is modal.

Do you need to display more than a message box would provide



 
 
Brian Kramer





PostPosted: Visual C++ General, Create a dialog box in a COM dll without CWinApp Top

I would not advise passing CWinApp instances across a DLL or COM boundary. If all you want to do is create a dialog box, you can create one using the Win32 API DialogBox (i.e. don't need MFC). You can find plenty of samples for DialogBox.
 
 
bioan





PostPosted: Visual C++ General, Create a dialog box in a COM dll without CWinApp Top

It will be essential that this dialog box to be modelles, because this dialog have to be present permanent in the exe main window (framework). I want to be able to work with exe functions (essentially a CAD application) to draw line , etc but in the same time to push some dialog buttons or whatever from the dll side to interact to the drawing lines, then go back to the main exe frame, but still have dialog box present on screen. I choose to close exe, the dll dialog box have to close too.. The same when I start exe.. start dll box too.

I want to put some other controls in this dialog, even property sheets, tab controls, etc.


Ioan