Compiling and Testing a C++ Application

Follow these steps to integrate a C++ application with Thinfinity VirtualUI:

1. Open Visual Studio.

2. Open the application's project.

3. Add the path to the VirtualUI library in the 'Include Directories' field, which can be found in the main menu under Project - Properties - Configuration Properties - VC++ Directories).

4. Add Thinfinity.VirtualUI.cpp to the Source Files.

5. Add Thinfinity.VirtualUI.h to the Header Files.

6. Include Thinfinity.VirtualUI.h in the application`s cpp:

#include "Thinfinity.VirtualUI.h"

7. Create a VirtualUI instance of the program and start it.

BOOL CMFCTestApp::InitInstance()
{
 INITCOMMONCONTROLSEX InitCtrls;
 InitCtrls.dwSize = sizeof(InitCtrls);
 InitCtrls.dwICC = ICC_WIN95_CLASSES;
 InitCommonControlsEx(&InitCtrls);
 CWinAppEx::InitInstance();
 if (!AfxOleInit())
 {
 AfxMessageBox(IDP_OLE_INIT_FAILED);
 return FALSE;
 }
 // Initialize VirtualUI
 VirtualUI vui;
 vui.Start();

 ...
}

8. Compile the program and run it in debug mode.

You will see this message:

If you press the 'Start Web Browser' button, a web browser will open pointing to the application. The application will also open in desktop mode.

9. Alternatively, choose to not show the message and observe on the Windows Tray Bar that the Thinfinity VirtualUI Development Server icon will appear.

10. Right-click on the icon, and after that click on the 'Open Web Browser' menu.

A Web browser window will open and your application will be running inside.

Note:

When you run your application under an IDE, it automatically starts in web mode. To access the application, open your web browser and point to http://127.0.0.1:6080

11. Click on the 'Server Manager' menu to access the Development Server Manager.

Read more:

o Compiling and Testing a WinForms Application

o Compiling and Testing a Delphi Application

o Registering the Application in Thinfinity VirtualUI Server

o Accessing the App from the Web

o Application Execution Behavior

Last updated