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.
1
BOOL CMFCTestApp::InitInstance()
2
{
3
INITCOMMONCONTROLSEX InitCtrls;
4
InitCtrls.dwSize = sizeof(InitCtrls);
5
InitCtrls.dwICC = ICC_WIN95_CLASSES;
6
InitCommonControlsEx(&InitCtrls);
7
CWinAppEx::InitInstance();
8
if (!AfxOleInit())
9
{
10
AfxMessageBox(IDP_OLE_INIT_FAILED);
11
return FALSE;
12
}
13
// Initialize VirtualUI
14
VirtualUI vui;
15
vui.Start();
16
17
...
18
}
Copied!
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:

Last modified 1yr ago
Export as PDF
Copy link