Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ded94f
commit 1c276ce
Showing
13 changed files
with
126 additions
and
17 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// 二重インクルード防止 | ||
#pragma once // #pragma onceで二重インクルード防止. | ||
|
||
// ヘッダのインクルード | ||
// 独自のヘッダ | ||
#include "BasicApplication.h" // ベーシックアプリケーションクラス | ||
#include "BasicWindow.h" // ベーシックウィンドウクラス | ||
|
||
// コンストラクタCBasicApplication() | ||
CBasicApplication::CBasicApplication() : CApplication() { | ||
|
||
} | ||
|
||
// アプリケーション初期化関数InitInstance | ||
BOOL CBasicApplication::InitInstance(HINSTANCE hInstance, LPTSTR lpCmdLine, int nShowCmd){ | ||
|
||
// 初期化 | ||
CApplication::InitInstance(hInstance, lpCmdLine, nShowCmd); // CApplication::InitInstanceを呼ぶ. | ||
|
||
// ベーシックウィンドウクラスの登録 | ||
CBasicWindow::RegisterClass(hInstance); // CBasicWindow::RegisterClassでウィンドウクラス"BasicWindow"を登録. | ||
|
||
// ベーシックウィンドウオブジェクトの生成 | ||
m_pMainWindow = new CBasicWindow(); // CBasicWindowオブジェクトを作成し, アドレスをm_pMainWindowに格納. | ||
|
||
// ウィンドウ作成 | ||
if (!m_pMainWindow->Create(_T("VizCommand"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance)) { // m_pMainWindow->Createでの作成が失敗なら. | ||
return FALSE; // FALSEを返す. | ||
} | ||
|
||
// ウィンドウ表示 | ||
m_pMainWindow->ShowWindow(SW_SHOW); // m_pMainWindow->ShowWindowで表示. | ||
|
||
// 成功なのでTRUEを返す. | ||
return TRUE; // TRUEを返す. | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 二重インクルード防止 | ||
#pragma once // #pragma onceで二重インクルード防止. | ||
|
||
// 独自のヘッダ | ||
#include "Application.h" // アプリケーションクラス | ||
|
||
// ベーシックアプリケーションクラスCBasicApplication | ||
class CBasicApplication : public CApplication { | ||
|
||
// publicメンバ | ||
public: | ||
|
||
// publicメンバ関数 | ||
// コンストラクタ・デストラクタ | ||
CBasicApplication(); // コンストラクタCBasicApplication() | ||
|
||
// メンバ関数 | ||
virtual BOOL InitInstance(HINSTANCE hInstance, LPTSTR lpCmdLine, int nShowCmd); // アプリケーション初期化関数InitInstance | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// 二重インクルード防止 | ||
#pragma once // #pragma onceで二重インクルード防止. | ||
|
||
// ヘッダのインクルード | ||
// 独自のヘッダ | ||
#include "BasicWindow.h" // ベーシックウィンドウクラス | ||
|
||
// ウィンドウクラス登録関数RegisterClass | ||
BOOL CBasicWindow::RegisterClass(HINSTANCE hInstance){ | ||
|
||
// ウィンドウクラスの登録 | ||
return CWindow::RegisterClass(hInstance, _T("BasicWindow")); // CWindow::RegisterClassでウィンドウクラス"BasicWindow"を登録. | ||
|
||
} | ||
|
||
// コンストラクタCBasicWindow() | ||
CBasicWindow::CBasicWindow() : CWindow(){ | ||
|
||
} | ||
|
||
// ウィンドウ作成関数Create(lpctszClassName省略) | ||
BOOL CBasicWindow::Create(LPCTSTR lpctszWindowName, DWORD dwStyle, int x, int y, int iWidth, int iHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance){ | ||
|
||
// ここに来る場合はウィンドウクラス"BasicWindow"のウィンドウとして作成. | ||
return CWindow::Create(_T("BasicWindow"), lpctszWindowName, dwStyle, x, y, iWidth, iHeight, hWndParent, hMenu, hInstance); // ウィンドウクラスを"BasicWindow"にしてCreateのフルバージョンを呼ぶ. | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// 二重インクルード防止 | ||
#pragma once // #pragma onceで二重インクルード防止. | ||
|
||
// 独自のヘッダ | ||
#include "Window.h" // ウィンドウクラス | ||
|
||
// ベーシックウィンドウクラスCBasicWindow | ||
class CBasicWindow : public CWindow { | ||
|
||
// publicメンバ | ||
public: | ||
|
||
// publicメンバ関数 | ||
// staticメンバ関数 | ||
static BOOL RegisterClass(HINSTANCE hInstance); // ウィンドウクラス登録関数RegisterClass | ||
|
||
// コンストラクタ・デストラクタ | ||
CBasicWindow(); // コンストラクタCBasicWindow() | ||
|
||
// メンバ関数 | ||
virtual BOOL Create(LPCTSTR lpctszWindowName, DWORD dwStyle, int x, int y, int iWidth, int iHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance); // ウィンドウ作成関数Create(lpctszClassName省略) | ||
|
||
}; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters