Solution46
AppTest.cpp
[詳解]
1 //=============================================================================
2 /// @file
3 /// テストアプリケーション実装ファイル
4 ///
5 /// テストアプリケーション実装ファイルです。
6 ///
7 /// $Id: AppTest.cpp 245 2019-03-20 15:03:41Z admin $
8 /// $Date: 2019-03-21 00:03:41 +0900 (2019/03/21 (木)) $
9 /// $Author: admin $
10 ///
11 /// @attention なし
12 
13 #pragma managed( push, off )
14 
15 //=============================================================================
16 // インクルードファイル
17 #include <AppTest.h>
18 #include <CConsole.h>
19 #include <CJsonConfigAuto.h>
20 #include <LibCommon.h>
21 #include <LibLogOut.h>
22 #include <LibNewDel.h>
23 #include <LibJson.h>
24 #include <LibWindow.h>
25 #include <LibUtility.h>
26 
27 //=============================================================================
28 // インクルード実装ファイル
29 #include <NewDel.hpp>
30 
31 //=============================================================================
32 // グローバル関数
33 //-----------------------------------------------------------------------------
34 #ifdef _UNICODE
35 
36 //-----------------------------------------------------------------------------
37 /// コンソールプロセスメイン関数
38 ///
39 /// コンソールプロセスメイン関数です。
40 ///
41 /// @param[in] argc コマンドライン引数配列サイズ
42 /// @param[in] argv コマンドライン引数配列ポインタ
43 /// @return 終了コード
44 /// @attention なし
45 ///
46 int wmain( int argc, wchar_t* argv[] ) {
47  // 処理ブロック
48  int result = -1;
49  do {
50  // メイン関数を実行する
51  result = AppTest::CAppTest::Main();
52  } while ( false );
53 
54  // 実行結果を返す
55  return result;
56 }
57 
58 //-----------------------------------------------------------------------------
59 /// ウィンドウプロセスメイン関数
60 ///
61 /// ウィンドウプロセスメイン関数です。
62 ///
63 /// @param[in] hInstance 現在のインスタンスハンドル
64 /// @param[in] hPrevInstance 以前のインスタンスハンドル
65 /// @param[in] lpCmdLine コマンドライン文字列
66 /// @param[in] nCmdShow 表示状態
67 /// @return 終了コード
68 /// @attention なし
69 ///
70 int APIENTRY wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) {
71  // 処理ブロック
72  int result = -1;
73  do {
74  // メイン関数を実行する
75  result = AppTest::CAppTest::Main();
76  } while ( false );
77 
78  // 実行結果を返す
79  return result;
80 }
81 
82 #else
83 
84 //-----------------------------------------------------------------------------
85 /// コンソールプロセスメイン関数
86 ///
87 /// コンソールプロセスメイン関数です。
88 ///
89 /// @param[in] argc コマンドライン引数配列サイズ
90 /// @param[in] argv コマンドライン引数配列ポインタ
91 /// @return 終了コード
92 /// @attention なし
93 ///
94 int main( int argc, wchar_t* argv[] ) {
95  // 処理ブロック
96  int result = -1;
97  do {
98  // メイン関数を実行する
99  result = AppTest::CAppTest::Main();
100  } while ( false );
101 
102  // 実行結果を返す
103  return result;
104 }
105 
106 //-----------------------------------------------------------------------------
107 /// ウィンドウプロセスメイン関数
108 ///
109 /// ウィンドウプロセスメイン関数です。
110 ///
111 /// @param[in] hInstance 現在のインスタンスハンドル
112 /// @param[in] hPrevInstance 以前のインスタンスハンドル
113 /// @param[in] lpCmdLine コマンドライン文字列
114 /// @param[in] nCmdShow 表示状態
115 /// @return 終了コード
116 /// @attention なし
117 ///
118 int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) {
119  // 処理ブロック
120  int result = -1;
121  do {
122  // メイン関数を実行する
123  result = AppTest::CAppTest::Main();
124  } while ( false );
125 
126  // 実行結果を返す
127  return result;
128 }
129 
130 #endif
131 
132 //=============================================================================
133 // テストアプリケーション名前空間
134 namespace AppTest {
135  //=========================================================================
136  // テストアプリケーションクラス
137  //=========================================================================
138  // 構築子と解体子
139  //-------------------------------------------------------------------------
140  // コンストラクタ
142  // 基底クラスコンストラクタ
143  : CWndMain()
144  // メンバ変数初期化
145  , m_cConfig()
146  , m_cMainMenu()
147  , m_cPrevTime()
148  , m_sStartTime()
149  , m_sEndTime()
150  {
151  // コンストラクタ実行通知
153 
154  // 構成ファイルをロードする
155  m_cConfig.Load( GetConfigFilePath() );
156 
157  // 終了日時を取得する
158  if ( m_cConfig.Get( m_cPrevTime, KEY_END_TIME ) ) {
159  OutputDebugFormat( L"■前回終了日時:%s\n", m_cPrevTime.GetBuffer() );
160  }
161 
162  // 開始日時を取得する
163  ::GetLocalTime( &m_sStartTime );
164  OutputDebugFormat( L"■開始日時:%s\n", GetDateTimeString( m_sStartTime ) );
165  }
166 
167  //-------------------------------------------------------------------------
168  // デストラクタ
169  CAppTest::~CAppTest() noexcept {
170  // デストラクタ実行通知
172 
173  // 処理ブロック
174  do {
175  // 終了日時を取得する
176  ::GetLocalTime( &m_sEndTime );
177  OutputDebugFormat( L"■終了日時:%s\n", GetDateTimeString( m_sEndTime ) );
178 
179  // 構成情報キー設定値を削除する
183 
184  // 前回の終了日時を調べる
185  if ( nullptr != m_cPrevTime.GetBuffer() ) {
186  // 前回の終了日時を保存する
188  // 失敗!
189  break;
190  }
191  }
192 
193  // 開始日時を保存する
195  // 失敗!
196  break;
197  }
198  // 終了日時を保存する
200  // 失敗!
201  break;
202  }
203  // 構成ファイルをセーブする
204  else if ( !m_cConfig.Save( GetConfigFilePath() ) ) {
205  // 失敗!
206  break;
207  }
208  } while ( false );
209  }
210 
211  //=========================================================================
212  // 公開関数
213  //-------------------------------------------------------------------------
214  // WM_CLOSEメッセージ関数
215  LRESULT CAppTest::WmClose() noexcept {
216  // 処理ブロック
217  LRESULT result = 0;
218  do {
219  // メニュー実行状態を調べる
220  if ( m_cMainMenu.IsExecMenu() ) {
221  // メニューを中止する
223  }
224 
225  // ウィンドウ構成情報を保存する
226  if ( !SaveConfigWindow( m_cConfig ) ) {
227  // 失敗!
228  ConsoleLine( L"ウィンドウ構成情報を保存できませんでした。" );
229  ConsoleNewLine();
230  }
231 
232  // 基底クラスの関数を実行する
233  result = CWndMain::WmClose();
234  } while ( false );
235 
236  // 実行結果を返す
237  return result;
238  }
239 
240  //-------------------------------------------------------------------------
241  // アイドル処理コールバック関数
242  bool CAppTest::IdleCallBackProc() noexcept {
243  // 処理ブロック
244  bool result = false;
245  do {
246  // メニューを実行する
247  if ( !m_cMainMenu.ExecMenu() ) {
248  // メインウィンドウをクローズする
249  ::SendMessageW( m_hWnd, WM_CLOSE, 0, 0 );
250 
251  // 終了!
252  break;
253  }
254 
255  // 継続!
256  result = true;
257  } while ( false );
258 
259  // 実行結果を返す
260  return result;
261  }
262 
263  //-------------------------------------------------------------------------
264  // アプリケーション初期化関数
265  bool CAppTest::InitApp() noexcept {
266  // 処理ブロック
267  bool result = false;
268  do {
269  // コンソール構成情報を復元する
270  if ( !ResumeConfigConsole( m_cConfig, EWindowPosition::Left ) ) {
271  // 失敗!
272  break;
273  }
274  // メインウィンドウ構成情報を復元する
275  else if ( !ResumeConfigWindow( m_cConfig, EWindowPosition::Right ) ) {
276  // 失敗!
277  break;
278  }
279 
280  // 成功!
281  result = true;
282  } while ( false );
283 
284  // 実行結果を返す
285  return result;
286  }
287 
288  //-------------------------------------------------------------------------
289  // アプリケーション実行関数
290  bool CAppTest::ExecApp() noexcept {
291  // 処理ブロック
292  bool result = false;
293  do {
294  // メインメニューを開始する
295  if ( !m_cMainMenu.StartMenu() ) {
296  // 失敗!
297  ConsoleLine( L"テストアプリケーションメニューを開始できませんでした。" );
298  ConsoleNewLine();
299  break;
300  }
301  // ウィンドウアプリケーションを実行する
302  else if ( !Run() ) {
303  // メニューを中止する
305 
306  // 失敗!
307  ConsoleLine( L"ウィンドウアプリケーションを実行できませんでした。" );
308  ConsoleNewLine();
309  break;
310  }
311 
312  // 成功!
313  result = true;
314  } while ( false );
315 
316  // 実行結果を返す
317  return result;
318  }
319 
320  //-------------------------------------------------------------------------
321  // アプリケーション終了関数
322  bool CAppTest::FinishApp( bool bResult ) noexcept {
323  // 処理ブロック
324  bool result = false;
325  do {
326  // コンソール構成情報を保存する
327  if ( !SaveConfigConsole( m_cConfig ) ) {
328  // 失敗!
329  break;
330  }
331 
332  // 成功!
333  result = true;
334  } while ( false );
335 
336  // 実行結果を返す
337  return result;
338  }
339 
340  //-------------------------------------------------------------------------
341  // コンソール構成情報復元関数
342  bool CAppTest::ResumeConfigConsole( CJsonConfig& rcConfig, EWindowPosition ePos ) noexcept {
343  // コンソールセクション処理ブロック
344  bool result = false;
345  do {
346  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_CONSOLE );
347 
348  // コンソールウィンドウハンドルを調べる
349  HWND hWnd = ConsoleWindowHandle();
350  if ( nullptr == hWnd ) {
351  // コンソールウィンドウを作成する
352  ::AllocConsole();
353 
354  // コンソールウィンドウハンドルを取得する
355  hWnd = ConsoleWindowHandle();
356  }
357 
358  // コンソールバッファサイズを設定する
359  ConsoleBufferSize( 1024, 1024 );
360 
361  // コンソールウィンドウ表示位置を復元する
362  if ( rcConfig.ResumeWindowPosition( hWnd ) ) {
363  ConsoleLine( L"コンソールウィンドウ表示領域を復元しました。" );
364  ConsoleNewLine();
365  }
366  // コンソールウィンドウを初期配置位置に表示する
367  else if ( SetWindowPosition( hWnd, ePos ) ) {
368  ConsoleLine( L"コンソールウィンドウを初期配置位置に表示しました。" );
369  ConsoleNewLine();
370  }
371  else {
372  // 失敗!
373  ConsoleLine( L"コンソールウィンドウを初期配置位置に表示できませんでした。" );
374  ConsoleNewLine();
375  break;
376  }
377 
378  // 成功!
379  result = true;
380  } while ( false );
381 
382  // 終了日時を取得する
383  CString cValue;
384  if ( rcConfig.Get( cValue, KEY_END_TIME ) ) {
385  ConsoleLine( L"前回終了日時:%s", cValue.GetBuffer() );
386  ConsoleNewLine();
387  }
388 
389  // 実行結果を返す
390  return result;
391  }
392 
393  //-------------------------------------------------------------------------
394  // コンソール構成情報保存関数
395  bool CAppTest::SaveConfigConsole( CJsonConfig& rcConfig ) noexcept {
396  // コンソールセクション処理ブロック
397  bool result = false;
398  do {
399  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_CONSOLE, true );
400 
401  // コンソールウィンドウハンドルを取得する
402  HWND hWnd = ConsoleWindowHandle();
403 
404  // コンソールウィンドウ表示位置を保存する
405  if ( !rcConfig.SaveWindowPosition( hWnd ) ) {
406  // 失敗!
407  ConsoleLine( L"コンソールウィンドウ表示位置を保存できませんでした。" );
408  ConsoleNewLine();
409  break;
410  }
411  ConsoleLine( L"コンソールウィンドウ表示位置を保存しました。" );
412  ConsoleNewLine();
413 
414  // コンソールウィンドウ表示状態を保存する
415  if ( !rcConfig.SaveShowWindow( hWnd ) ) {
416  // 失敗!
417  ConsoleLine( L"コンソールウィンドウ表示状態を保存できませんでした。" );
418  ConsoleNewLine();
419  break;
420  }
421  ConsoleLine( L"コンソールウィンドウ表示状態を保存しました。" );
422  ConsoleNewLine();
423 
424  // 成功!
425  result = true;
426  } while ( false );
427 
428  // 実行結果を返す
429  return result;
430  }
431 
432  //-------------------------------------------------------------------------
433  // ウィンドウ構成情報復元関数
434  bool CAppTest::ResumeConfigWindow( CJsonConfig& rcConfig, EWindowPosition ePos ) noexcept {
435  // ウィンドウセクション処理ブロック
436  bool result = false;
437  do {
438  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_WINDOW );
439 
440  // 静的変数セクション処理ブロック
441  {
442  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_STATIC );
443 
444  // メインウィンドウセクション処理ブロック
445  {
446  CJsonConfigAuto cConfigAuto( rcConfig, GetSectionName() );
447 
448  // 静的構成情報を復元する
449  if ( ResumeConfigStatic( rcConfig ) ) {
450  ConsoleLine( L"静的構成情報を復元しました。" );
451  ConsoleNewLine();
452  }
453  }
454  }
455 
456  // メインウィンドウセクション処理ブロック
457  {
458  CJsonConfigAuto cConfigAuto( rcConfig, GetSectionName() );
459 
460  // ウィンドウ構成情報を初期化する
461  if ( !InitConfig( rcConfig ) ) {
462  // 失敗!
463  ConsoleLine( L"ウィンドウ構成情報を初期化できませんでした。" );
464  ConsoleNewLine();
465  break;
466  }
467  // ウィンドウを作成する
468  else if ( !Create() ) {
469  // 失敗!
470  ConsoleLine( L"ウィンドウを作成できませんでした。" );
471  ConsoleNewLine();
472  break;
473  }
474  // ウィンドウ構成情報を復元する
475  else if ( ResumeConfig( rcConfig ) ) {
476  ConsoleLine( L"ウィンドウ構成情報を復元しました。" );
477  ConsoleNewLine();
478  }
479  // ウィンドウを初期配置位置に表示する
480  else if ( !SetWindowPosition( m_hWnd, ePos ) ) {
481  // 失敗!
482  ConsoleLine( L"ウィンドウを初期配置位置に表示できませんでした。" );
483  ConsoleNewLine();
484  break;
485  }
486  else {
487  ConsoleLine( L"ウィンドウを初期配置位置に表示しました。" );
488  ConsoleNewLine();
489  }
490  }
491 
492  // 成功!
493  result = true;
494  } while ( false );
495 
496  // 実行結果を返す
497  return result;
498  }
499 
500  //-------------------------------------------------------------------------
501  // ウィンドウ構成情報保存関数
502  bool CAppTest::SaveConfigWindow( CJsonConfig& rcConfig ) noexcept {
503  // ウィンドウセクション処理ブロック
504  bool result = false;
505  do {
506  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_WINDOW, true );
507 
508  // 静的変数セクション処理ブロック
509  {
510  CJsonConfigAuto cConfigAuto( rcConfig, SECTION_STATIC, true );
511 
512  // メインウィンドウセクション処理ブロック
513  {
514  CJsonConfigAuto cConfigAuto( rcConfig, GetSectionName(), true );
515 
516  // 静的構成情報を保存する
517  if ( !SaveConfigStatic( rcConfig ) ) {
518  // 失敗!
519  ConsoleLine( L"静的構成情報を保存できませんでした。" );
520  ConsoleNewLine();
521  break;
522  }
523  ConsoleLine( L"静的構成情報を保存しました。" );
524  ConsoleNewLine();
525  }
526  }
527 
528  // メインウィンドウセクション処理ブロック
529  {
530  CJsonConfigAuto cConfigAuto( rcConfig, GetSectionName(), true );
531 
532  // ウィンドウ構成情報を保存する
533  if ( !SaveConfig( rcConfig ) ) {
534  // 失敗!
535  ConsoleLine( L"ウィンドウ構成情報を保存できませんでした。" );
536  ConsoleNewLine();
537  break;
538  }
539  ConsoleLine( L"ウィンドウ構成情報を保存しました。" );
540  ConsoleNewLine();
541  }
542 
543  // 成功!
544  result = true;
545  } while ( false );
546 
547  // 実行結果を返す
548  return result;
549  }
550 
551  //=========================================================================
552  // 静的公開関数
553  //-------------------------------------------------------------------------
554  // メイン関数
555  int CAppTest::Main() noexcept {
556  LogOutHeader();
557 
558  // プロジェクト情報を表示する
559  OutputDebugFormat( L"■共通ライブラリ\n" );
560  OutputDebugFormat( L" プロジェクト種別:%s\n", CLibCommon::GetProjectType() );
561  OutputDebugFormat( L" モジュールパス :%s\n", GetModuleName( CLibCommon::GetInstanceHandle() ) );
562 
563  OutputDebugFormat( L"■ログ出力ライブラリ\n" );
564  OutputDebugFormat( L" プロジェクト種別:%s\n", CLibLogOut::GetProjectType() );
565  OutputDebugFormat( L" モジュールパス :%s\n", GetModuleName( CLibLogOut::GetInstanceHandle() ) );
566 
567  OutputDebugFormat( L"■生成消滅演算子ライブラリ\n" );
568  OutputDebugFormat( L" プロジェクト種別:%s\n", CLibNewDel::GetProjectType() );
569  OutputDebugFormat( L" モジュールパス :%s\n", GetModuleName( CLibNewDel::GetInstanceHandle() ) );
570 
571  OutputDebugFormat( L"■JSONライブラリ\n" );
572  OutputDebugFormat( L" プロジェクト種別:%s\n", CLibJson::GetProjectType() );
573  OutputDebugFormat( L" モジュールパス :%s\n", GetModuleName( CLibJson::GetInstanceHandle() ) );
574 
575  OutputDebugFormat( L"■ウィンドウライブラリ\n" );
576  OutputDebugFormat( L" プロジェクト種別:%s\n", CLibWindow::GetProjectType() );
577  OutputDebugFormat( L" モジュールパス :%s\n", GetModuleName( CLibWindow::GetInstanceHandle() ) );
578 
579  // 処理ブロック
580  int result = -1;
581  do {
582  // 処理ブロック
583  bool bResult = false;
584  do {
585  // アプリケーションを初期化する
586  if ( !s_cInstance.InitApp() ) {
587  // 失敗!
588  break;
589  }
590  // アプリケーションを実行する
591  else if ( !s_cInstance.ExecApp() ) {
592  // 失敗!
593  break;
594  }
595 
596  // 成功!
597  bResult = true;
598  result = 0;
599  } while ( false );
600 
601  // アプリケーションを終了する
602  if ( !s_cInstance.FinishApp( bResult ) ) {
603  // 失敗!
604  break;
605  }
606  } while ( false );
607 
608  // 実行結果を返す
609  LogOutFooter();
610  return result;
611  }
612 
613  //-------------------------------------------------------------------------
614  // 日時文字列取得関数
615  wchar_t const* CAppTest::GetDateTimeString( SYSTEMTIME const& rsDateTime, CString& rcString ) noexcept {
616  // 処理ブロック
617  wchar_t const* result = nullptr;
618  do {
619  // 日時文字列を作成する
620  rcString.Format( L"%u年%2u月%2u日 %u時%02u分%02u秒",
621  rsDateTime.wYear,
622  rsDateTime.wMonth,
623  rsDateTime.wDay,
624  rsDateTime.wHour,
625  rsDateTime.wMinute,
626  rsDateTime.wSecond );
627 
628  // 成功!
629  result = rcString;
630  } while ( false );
631 
632  // 実行結果を返す
633  return result;
634  }
635 
636  //=========================================================================
637  // 静的公開文字列定数
638  wchar_t const* const CAppTest::SECTION_CONSOLE = L"コンソールセクション";
639  wchar_t const* const CAppTest::KEY_PREV_END_TIME = L"前回終了日時";
640  wchar_t const* const CAppTest::KEY_START_TIME = L"開始日時";
641  wchar_t const* const CAppTest::KEY_END_TIME = L"終了日時";
642  wchar_t const* const CAppTest::SECTION_WINDOW = L"ウィンドウセクション";
643  wchar_t const* const CAppTest::SECTION_STATIC = L"静的変数";
644 
645  //=========================================================================
646  // 静的限定公開変数
648 }
649 
650 #pragma managed( pop )
テストアプリケーション名前空間
Definition: AppTest.h:25
#define NotifyConstructor()
コンストラクタ実行通知マクロ
Definition: LibUtility.h:24
#define LogOutHeader()
関数ヘッダマクロ
Definition: LibLogOut.h:47
static wchar_t const * GetProjectType() noexcept
プロジェクト種別取得関数
Definition: LibLogOut.cpp:755
virtual bool ExecApp() noexcept
アプリケーション実行関数
Definition: AppTest.cpp:290
static bool SaveConfigStatic(CJsonConfig &rcConfig) noexcept
静的構成情報保存関数
Definition: CWndMain.cpp:2487
virtual bool ResumeConfigWindow(CJsonConfig &rcConfig, EWindowPosition ePos) noexcept
ウィンドウ構成情報復元関数
Definition: AppTest.cpp:434
ウィンドウ子ライブラリヘッダファイル
virtual bool SaveConfigConsole(CJsonConfig &rcConfig) noexcept
コンソール構成情報保存関数
Definition: AppTest.cpp:395
virtual bool Create(HWND hParent=nullptr, HMENU hMenu=nullptr) noexcept override
ウィンドウ作成関数
Definition: CWndMain.cpp:121
static wchar_t const * GetProjectType() noexcept
プロジェクト種別取得関数
Definition: LibWindow.cpp:33
static int Main() noexcept
メイン関数
Definition: AppTest.cpp:555
#define NotifyDestructor()
デストラクタ実行通知マクロ
Definition: LibUtility.h:25
#define LogOutFooter()
関数フッタマクロ
Definition: LibLogOut.h:50
static wchar_t const *const SECTION_STATIC
静的変数セクション文字列
Definition: AppTest.h:261
static HINSTANCE GetInstanceHandle() noexcept
インスタンスハンドル取得関数
Definition: LibLogOut.cpp:762
virtual bool StartMenu() noexcept
メニュー開始関数
static HINSTANCE GetInstanceHandle() noexcept
インスタンスハンドル取得関数
Definition: LibNewDel.cpp:323
virtual bool IsExecMenu() noexcept
実行状態取得関数
Definition: CConsoleMenu.h:100
SYSTEMTIME m_sEndTime
終了日時
Definition: AppTest.h:251
static wchar_t const * GetDateTimeString(SYSTEMTIME const &rsDateTime, CString &rcString=CString()()) noexcept
日時文字列取得関数
Definition: AppTest.cpp:615
EWindowPosition
ウィンドウ表示位置種別列挙体
Definition: LibUtility.h:39
virtual ~CAppTest() noexcept
デストラクタ
Definition: AppTest.cpp:169
static wchar_t const *const SECTION_WINDOW
ウィンドウセクション文字列
Definition: AppTest.h:260
int main(int argc, wchar_t *argv[])
コンソールプロセスメイン関数
Definition: AppTest.cpp:94
virtual bool Delete(wchar_t const *pszKey, int nIndex=-1) noexcept
キー設定値削除関数
テストアプリケーションクラス
Definition: AppTest.h:33
virtual bool InitApp() noexcept
アプリケーション初期化関数
Definition: AppTest.cpp:265
#define ConsoleNewLine()
改行出力マクロ
Definition: CConsole.h:29
static CAppTest s_cInstance
静的インスタンス
Definition: AppTest.h:266
JSONライブラリヘッダファイル
static wchar_t const *const SECTION_CONSOLE
コンソールセクション文字列
Definition: AppTest.h:256
static wchar_t const *const KEY_END_TIME
終了日時キー文字列
Definition: AppTest.h:259
HWND m_hWnd
ウィンドウハンドル
Definition: CWndBase.h:1539
JSON構成情報クラス
Definition: CJsonConfig.h:31
virtual bool Save(wchar_t const *pszPath) noexcept
構成ファイルセーブ関数
Definition: CJsonConfig.cpp:73
static wchar_t const * GetProjectType() noexcept
プロジェクト種別取得関数
Definition: LibNewDel.cpp:316
static HINSTANCE GetInstanceHandle() noexcept
インスタンスハンドル取得関数
Definition: LibWindow.cpp:40
virtual bool Set(int nValue, wchar_t const *pszKey=nullptr, int nIndex=-1) noexcept
整数型設定値設定関数
static wchar_t const *const KEY_PREV_END_TIME
前回終了日時キー文字列
Definition: AppTest.h:257
CJsonConfig m_cConfig
JSON構成情報
Definition: AppTest.h:247
static wchar_t const *const KEY_START_TIME
開始日時キー文字列
Definition: AppTest.h:258
コンソール入出力クラスヘッダコンソール
virtual LRESULT WmClose() noexcept override
各種メッセージ処理関数
Definition: AppTest.cpp:215
virtual LRESULT WmClose() noexcept
Definition: CWndBase.h:578
static HINSTANCE GetInstanceHandle() noexcept
インスタンスハンドル取得関数
Definition: LibJson.cpp:40
CAppTest() noexcept
コンストラクタ
Definition: AppTest.cpp:141
static wchar_t const * GetProjectType() noexcept
プロジェクト種別取得関数
Definition: LibJson.cpp:33
virtual wchar_t const * GetSectionName() const noexcept override
セクション名取得関数
Definition: AppTest.h:71
virtual bool ResumeConfig(CJsonConfig &rcConfig) noexcept override
ウィンドウ構成情報復元関数
Definition: CWndMain.cpp:685
LIB_COMMON_API wchar_t const * GetModuleName(HINSTANCE hInstance, wchar_t *pszBuffer=nullptr, size_t uSize=0) noexcept
モジュール名取得関数
Definition: LibUtility.cpp:366
JSON構成情報自動セクションブロッククラス
virtual void StopMenu() noexcept
メニュー中止要求関数
virtual bool ResumeConfigConsole(CJsonConfig &rcConfig, EWindowPosition ePos) noexcept
コンソール構成情報復元関数
Definition: AppTest.cpp:342
virtual bool SaveConfigWindow(CJsonConfig &rcConfig) noexcept
ウィンドウ構成情報保存関数
Definition: AppTest.cpp:502
static HINSTANCE GetInstanceHandle() noexcept
インスタンスハンドル取得関数
Definition: LibCommon.cpp:42
virtual bool InitConfig(CJsonConfig &rcConfig) noexcept override
ウィンドウ構成情報初期化関数
Definition: CWndMain.cpp:649
文字列クラス
Definition: CString.h:31
virtual bool Run() noexcept
ウィンドウアプリケーション実行関数
Definition: CWndMain.cpp:2251
LIB_COMMON_API void OutputDebugFormat(wchar_t const *pszFormat,...) noexcept
デバッグ出力関数
Definition: LibUtility.cpp:165
#define ConsoleLine(...)
ヘッダインデントなし書式設定文字列行出力マクロ
Definition: CConsole.h:34
メインウィンドウクラス
Definition: CWndMain.h:33
#define ConsoleWindowHandle()
ウィンドウハンドル取得マクロ
Definition: CConsole.h:44
virtual bool ExecMenu() noexcept
メニュー実行関数
virtual bool IdleCallBackProc() noexcept override
アイドル処理コールバック関数
Definition: AppTest.cpp:242
static bool ResumeConfigStatic(CJsonConfig &rcConfig) noexcept
静的構成情報復元関数
Definition: CWndMain.cpp:2464
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
ウィンドウプロセスメイン関数
Definition: AppTest.cpp:118
SYSTEMTIME m_sStartTime
開始日時
Definition: AppTest.h:250
生成消滅演算子ライブラリヘッダファイル
共通ライブラリヘッダファイル
CAppTestMenu m_cMainMenu
テストアプリケーションメインメニュー
Definition: AppTest.h:248
生成消滅演算子オーバーライド関数実装ヘッダファイル
テストアプリケーションヘッダファイル
virtual bool FinishApp(bool bResult) noexcept
アプリケーション終了関数
Definition: AppTest.cpp:322
static wchar_t const * GetProjectType() noexcept
プロジェクト種別取得関数
Definition: LibCommon.cpp:35
LIB_COMMON_API bool SetWindowPosition(HWND hWnd, EWindowPosition ePos) noexcept
ウィンドウ表示位置設定関数
Definition: LibUtility.cpp:452
ユーティリティライブラリヘッダファイル
#define ConsoleBufferSize(...)
出力バッファサイズ設定マクロ
Definition: CConsole.h:47
virtual wchar_t const * GetBuffer() const noexcept
文字列バッファ取得関数
Definition: CString.h:159
JSON構成情報自動セクションブロッククラスヘッダファイル
static wchar_t const * GetConfigFilePath() noexcept
構成ファイルパス取得関数
Definition: AppTest.h:216
CString m_cPrevTime
前回終了日時文字列
Definition: AppTest.h:249
virtual bool SaveConfig(CJsonConfig &rcConfig) noexcept override
ウィンドウ構成情報保存関数
Definition: CWndMain.cpp:736
ログ出力ライブラリヘッダファイル