in Embedded Wizard Studio by
Hi All,

I have a windows Application which renders UI and the image rendering will happen according to some user interaction. The images are stored in a buffer as bitmaps and the rendering will be taken care by our application. Now we wish to use Embedded wizard for the UI design.  

We are trying to integrate the newly created EW GUI application to our existing windows application. If we want to use it in our existing windows application, we need embedded wizard to render screen buffer and our application will take care of showing it in our MFC dialog box app.

My question is, Is it possible to create EW application as a .dll or static library? (I have created a solution in Visual studio and generated an .exe by using Embedded wizard generated codes and packages and it is running fine.)

Is it possible to access the screen buffer of EW?  If yes, how?

Thanks in advance.

1 Answer

0 votes

Hello Anand S,

My question is, Is it possible to create EW application as a .dll or static library?

generally I don't see any obstacle to do this. However we have no examples demonstrating the approach. We have never tried it. From technical point of view following should be taken in account:

1. Embedded Wizard created GUI application depends on its own main loop. It can't be integrated in the MFC message loop implemented in the function WinMain() in module main.c . Thus, I would drive the Embedded Wizard own EwMain() function in context of a separate thread.

2. The original Embedded Wizard implementation for Win32 creates an overlapped window (with style WS_OVERLAPPEDWINDOW). If you want the Embedded Wizard window to be embedded within a window belonging to your application, you will need to modify of how the Embedded Wizard window is created. See the function EwOpenViewer() in the module ewapp.c belonging to Win32 Platform Package.

3. Within this function: one necessary modification will be to replace WS_OVERLAPPEDWINDOW by WS_CHILD.

4. Also, you should pass a valid value in hWndParent parameter in the invocation of CreateWindowExA(). Actually the parameter is NULL. It should identify the HWND of the superior window where you want to embed the Embedded Wizard's own window.

Please note, if the Embedded Wizard GUI application is executed in context of a separate thread and you want to exchange data between the GUI application and another thread, you will need to implement interprocess communication between the both threads. Invoking Embedded Wizard functions in context of a thread other than the used to create and drive the application will lead to errors. See also: Take care in multi-threading environments.

I hope it helps you further.

Best regards

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint