ETradeClient.h
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// ETradeClient.h : main header file for the ETradeClient application
//
#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
#include <string>
#include "include/internal/cef_ptr.h"
#include "include/internal/cef_string.h"
// CETradeClientApp:
// See ETradeClient.cpp for the implementation of this class
//
class BrowserApp; // Forward declaration.
class CETradeClientApp : public CWinApp
{
// Instance manager to prevent multiple running instances.
class InstanceManager
{
public:
InstanceManager();
~InstanceManager();
bool Register(const std::wstring& app_id);
void Unregister();
private:
HANDLE m_mutex_handle;
};
public:
CETradeClientApp();
// Overrides
virtual BOOL InitInstance();
virtual int ExitInstance();
//virtual BOOL PumpMessage();
afx_msg void OnAppAbout();
DECLARE_MESSAGE_MAP()
private:
bool InitializeCef();
private:
CefRefPtr<BrowserApp> m_browser_app;
bool m_cef_initialized;
InstanceManager m_instance_mgr;
};
extern CETradeClientApp theApp;