Skip to content

Commit

Permalink
(unused) code to initialize the (one dialog's worth of) GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas O'Connor committed Jan 9, 2016
1 parent 21d6a4c commit 0cde893
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions Tilandis/Tilandis.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#include <tchar.h>
#include <Windows.h>
#include "rapidjson\document.h"
#include "resource.h"
// Home namespace
namespace Tilandis {
// TODO: tristates
Expand Down
3 changes: 3 additions & 0 deletions Tilandis/Tilandis.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
Expand Down Expand Up @@ -113,12 +114,14 @@
<ItemGroup>
<ClCompile Include="cmdline.cpp" />
<ClCompile Include="exceptions.cpp" />
<ClCompile Include="gui.cpp" />
<ClCompile Include="linkmgmt.cpp" />
<ClCompile Include="Tilandis.cpp" />
<ClCompile Include="Utility.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="exceptions.h" />
<ClInclude Include="gui.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="Tilandis.h" />
<ClInclude Include="Utility.h" />
Expand Down
6 changes: 6 additions & 0 deletions Tilandis/Tilandis.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<ClCompile Include="Utility.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="gui.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Tilandis.h">
Expand All @@ -44,6 +47,9 @@
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="gui.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Tilandis.rc">
Expand Down
9 changes: 9 additions & 0 deletions Tilandis/gui.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "gui.h"

bool GUI::InitMFC() { //stub
GUI::RegisterProtocol->Create(IDD_REGISTER_PROTOCOL);
}

bool GUI::ShowDialog(CDialog * tgt) {
tgt->ShowWindow(SW_SHOWDEFAULT); // TODO: error checking
}
23 changes: 23 additions & 0 deletions Tilandis/gui.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#pragma once
#ifndef __GUI_H
#define __GUI_H

#include <afxwin.h>
#include "Tilandis.h"

namespace GUI {
class CTilandisWinApp : public CWinApp {
public:
BOOL InitInstance();
int Run();
};

CTilandisWinApp * TilandisWinApp = new CTilandisWinApp();

CDialog * RegisterProtocol = new CDialog();

bool InitMFC();
bool ShowDialog(CDialog *);
}

#endif

0 comments on commit 0cde893

Please sign in to comment.