first UI COM-115
authorVolker Birk <vb@pep.foundation>
Thu, 02 Jul 2020 07:46:18 +0200
branchCOM-115
changeset 425161a68f99058
parent 424 b4e1d7f0c1b3
child 426 02815463ba92
first UI
pEpCOMServerAdapter.cpp
pEpCOMServerAdapter.rc
pEpCOMServerAdapter.vcxproj
pEpCOMServerAdapter.vcxproj.filters
resource.h
stdafx.h
     1.1 --- a/pEpCOMServerAdapter.cpp	Wed Jul 01 19:36:44 2020 +0200
     1.2 +++ b/pEpCOMServerAdapter.cpp	Thu Jul 02 07:46:18 2020 +0200
     1.3 @@ -8,6 +8,7 @@
     1.4  #include "GateKeeper.h"
     1.5  #include "pEpCOMServerAdapter.h"
     1.6  #include "LocalJSONAdapter.h"
     1.7 +#include "CMainWindow.h"
     1.8  
     1.9  using namespace ATL;
    1.10  using namespace std;
    1.11 @@ -21,6 +22,7 @@
    1.12  CpEpCOMServerAdapterModule _AtlModule;
    1.13  LocalJSONAdapter* ljs = nullptr;
    1.14  pEp::PassphraseCache cache;
    1.15 +CMainWindow mainWindow;
    1.16  
    1.17  extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, 
    1.18                                  LPTSTR lpCmdLine, int nShowCmd)
    1.19 @@ -35,11 +37,15 @@
    1.20          ljs = &LocalJSONAdapter::createInstance();
    1.21          ljs->startup(pEp::CallbackDispatcher::messageToSend);
    1.22          pEp::callback_dispatcher.add(JsonAdapter::messageToSend, JsonAdapter::notifyHandshake);
    1.23 +        auto mw = mainWindow.Create(HWND_MESSAGE);
    1.24 +        assert(mw);
    1.25      }
    1.26  
    1.27      auto rv = _AtlModule.WinMain(nShowCmd);
    1.28  
    1.29      if (ljs) {
    1.30 +        BOOL r = true;
    1.31 +        mainWindow.OnDestroy(0, 0, 0, r);
    1.32          pEp::callback_dispatcher.remove(JsonAdapter::messageToSend);
    1.33          ljs->shutdown_now();
    1.34      }
     2.1 Binary file pEpCOMServerAdapter.rc has changed
     3.1 --- a/pEpCOMServerAdapter.vcxproj	Wed Jul 01 19:36:44 2020 +0200
     3.2 +++ b/pEpCOMServerAdapter.vcxproj	Thu Jul 02 07:46:18 2020 +0200
     3.3 @@ -135,6 +135,7 @@
     3.4      </Link>
     3.5    </ItemDefinitionGroup>
     3.6    <ItemGroup>
     3.7 +    <ClCompile Include="CMainWindow.cpp" />
     3.8      <ClCompile Include="CpEpEngine.cpp" />
     3.9      <ClCompile Include="GateKeeper.cpp" />
    3.10      <ClCompile Include="LocalJSONAdapter.cpp" />
    3.11 @@ -164,6 +165,7 @@
    3.12    </ItemGroup>
    3.13    <ItemGroup>
    3.14      <ClInclude Include="..\pEpJSONServerAdapter\server\adapter-library.hh" />
    3.15 +    <ClInclude Include="CMainWindow.h" />
    3.16      <ClInclude Include="CpEpEngine.h" />
    3.17      <ClInclude Include="GateKeeper.h" />
    3.18      <ClInclude Include="LocalJSONAdapter.h" />
    3.19 @@ -206,6 +208,9 @@
    3.20      <Library Include="..\Debug\libpEpWebserver.lib" />
    3.21      <Library Include="..\Debug\pEpJSONServerAdapterLibrary.lib" />
    3.22    </ItemGroup>
    3.23 +  <ItemGroup>
    3.24 +    <Image Include="logo.ico" />
    3.25 +  </ItemGroup>
    3.26    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    3.27    <ImportGroup Label="ExtensionTargets">
    3.28      <Import Project="..\packages\boost.1.72.0.0\build\boost.targets" Condition="Exists('..\packages\boost.1.72.0.0\build\boost.targets')" />
     4.1 --- a/pEpCOMServerAdapter.vcxproj.filters	Wed Jul 01 19:36:44 2020 +0200
     4.2 +++ b/pEpCOMServerAdapter.vcxproj.filters	Thu Jul 02 07:46:18 2020 +0200
     4.3 @@ -46,6 +46,9 @@
     4.4      <ClCompile Include="LocalJSONAdapter.cpp">
     4.5        <Filter>Source Files</Filter>
     4.6      </ClCompile>
     4.7 +    <ClCompile Include="CMainWindow.cpp">
     4.8 +      <Filter>Source Files</Filter>
     4.9 +    </ClCompile>
    4.10    </ItemGroup>
    4.11    <ItemGroup>
    4.12      <ClInclude Include="stdafx.h">
    4.13 @@ -84,6 +87,9 @@
    4.14      <ClInclude Include="..\pEpJSONServerAdapter\server\adapter-library.hh">
    4.15        <Filter>Header Files</Filter>
    4.16      </ClInclude>
    4.17 +    <ClInclude Include="CMainWindow.h">
    4.18 +      <Filter>Header Files</Filter>
    4.19 +    </ClInclude>
    4.20    </ItemGroup>
    4.21    <ItemGroup>
    4.22      <ResourceCompile Include="pEpCOMServerAdapter.rc">
    4.23 @@ -117,4 +123,9 @@
    4.24      <Library Include="..\Debug\libpEpWebserver.lib" />
    4.25      <Library Include="..\Debug\libpEpAdapter.lib" />
    4.26    </ItemGroup>
    4.27 +  <ItemGroup>
    4.28 +    <Image Include="logo.ico">
    4.29 +      <Filter>Resource Files</Filter>
    4.30 +    </Image>
    4.31 +  </ItemGroup>
    4.32  </Project>
    4.33 \ No newline at end of file
     5.1 Binary file resource.h has changed
     6.1 --- a/stdafx.h	Wed Jul 01 19:36:44 2020 +0200
     6.2 +++ b/stdafx.h	Thu Jul 02 07:46:18 2020 +0200
     6.3 @@ -25,6 +25,7 @@
     6.4  #include <atlcom.h>
     6.5  #include <atlctl.h>
     6.6  #include <atlsafe.h>
     6.7 +#include <atlwin.h>
     6.8  
     6.9  #include <comutil.h>
    6.10  #include <comdef.h>