-
Notifications
You must be signed in to change notification settings - Fork 0
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
Yushi Oka
committed
Dec 30, 2020
1 parent
faf4f26
commit b100b8b
Showing
46 changed files
with
6,523 additions
and
1 deletion.
There are no files selected for viewing
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,18 @@ | ||
#ifndef DEBUG_MENU_ID_H | ||
|
||
#define IDM_DEBUG_FILE_NEW 40001 | ||
#define IDM_DEBUG_FILE_SAVE_AS 40004 | ||
#define IDM_DEBUG_FILE_PAGE 40005 | ||
#define IDM_DEBUG_FILE_PRINT 40006 | ||
#define IDM_DEBUG_FILE_EXIT 40007 | ||
|
||
#define IDM_DEBUG_EDIT_COPY 40013 | ||
#define IDM_DEBUG_EDIT_FIND 40016 | ||
#define IDM_DEBUG_EDIT_FIND_NEXT 40017 | ||
#define IDM_DEBUG_EDIT_GOTO_LINE 40019 | ||
#define IDM_DEBUG_EDIT_SELECT_ALL 40020 | ||
|
||
#define IDM_DEBUG_FORMAT_FONT 40032 | ||
|
||
#define DEBUG_MENU_ID_H | ||
#endif /* DEBUG_MENU_ID_H */ |
Large diffs are not rendered by default.
Oops, something went wrong.
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,114 @@ | ||
/* 共通インクルードファイル */ | ||
#include "common.h" | ||
/* 個別インクルードファイル */ | ||
|
||
/* 外部関数定義 */ | ||
|
||
/* 外部変数定義 */ | ||
/* 内部関数定義 */ | ||
#include "DebugWndConfig.h" | ||
/* 内部変数定義 */ | ||
static BOOL bInitDebugConfig; | ||
static TCHAR szIniFileName[512]; | ||
|
||
typedef struct | ||
{ | ||
PTSTR pKeyName; /* キー名 */ | ||
PTSTR pInitValue; /* 初期値 */ | ||
} S_DEBUG_CONFIG_INFO; | ||
|
||
static S_DEBUG_CONFIG_INFO configInfoTbl[DEBUG_CONFIG_ID_MAX] = | ||
{ | ||
{ TEXT("iWindowPosX" ),TEXT("0x00000000") }, | ||
{ TEXT("iWindowPosY" ),TEXT("0x00000000") }, | ||
{ TEXT("iWindowPosDX"),TEXT("0x000001F4") }, /* 500 */ | ||
{ TEXT("iWindowPosDY"),TEXT("0x0000012C") }, /* 300 */ | ||
}; | ||
|
||
static const TCHAR szDebugProfileName[] = TEXT("Debug"); | ||
|
||
/******************************************************************************** | ||
* 内容 : 設定管理モジュールの初期化 | ||
* 引数 : なし | ||
* 戻り値: なし | ||
***************************************/ | ||
void | ||
DebugConfigInit( void ) | ||
{ | ||
DWORD length; | ||
|
||
bInitDebugConfig = TRUE; | ||
length = GetModuleFileName(NULL,szIniFileName,512); | ||
|
||
szIniFileName[length-4] = '_'; | ||
szIniFileName[length-3] = 'd'; | ||
szIniFileName[length-2] = 'e'; | ||
szIniFileName[length-1] = 'b'; | ||
szIniFileName[length-0] = 'u'; | ||
szIniFileName[length+1] = 'g'; | ||
szIniFileName[length+2] = '.'; | ||
szIniFileName[length+3] = 'i'; | ||
szIniFileName[length+4] = 'n'; | ||
szIniFileName[length+5] = 'i'; | ||
|
||
} | ||
|
||
/******************************************************************************** | ||
* 内容 : DWORD設定値を保存する | ||
* 引数 : DEBUG_CONFIG_ID id | ||
* 引数 : DWORD data | ||
* 戻り値: なし | ||
***************************************/ | ||
void | ||
DebugConfigSaveDword( DEBUG_CONFIG_ID id, DWORD data ) | ||
{ | ||
TCHAR szDword[11]; | ||
|
||
if( bInitDebugConfig ) | ||
{ | ||
if( id < DEBUG_CONFIG_ID_MAX ) | ||
{ | ||
wsprintf( szDword, "0x%08lX", data ); | ||
WritePrivateProfileString( szDebugProfileName, configInfoTbl[id].pKeyName, szDword, szIniFileName ); | ||
} | ||
else | ||
{ | ||
nop(); | ||
} | ||
} | ||
else | ||
{ | ||
nop(); | ||
} | ||
} | ||
|
||
/******************************************************************************** | ||
* 内容 : DWORD設定値を読み込む | ||
* 引数 : DEBUG_CONFIG_ID id | ||
* 戻り値: なし | ||
***************************************/ | ||
INT | ||
DebugConfigLoadDword( DEBUG_CONFIG_ID id ) | ||
{ | ||
TCHAR szDword[11]; | ||
DWORD rtn = (DWORD)0; | ||
|
||
if( bInitDebugConfig ) | ||
{ | ||
if( id < DEBUG_CONFIG_ID_MAX ) | ||
{ | ||
GetPrivateProfileString( szDebugProfileName, configInfoTbl[id].pKeyName, configInfoTbl[id].pInitValue, szDword, 11, szIniFileName ); | ||
rtn = strtol( szDword+2,NULL,16 ); | ||
} | ||
else | ||
{ | ||
nop(); | ||
} | ||
} | ||
else | ||
{ | ||
nop(); | ||
} | ||
|
||
return (DWORD)rtn; | ||
} |
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,36 @@ | ||
#ifndef DEBUG_CONFIG | ||
|
||
/* 管理する設定のID */ | ||
typedef enum | ||
{ | ||
DEBUG_CONFIG_ID_WINDOW_POS_X, | ||
DEBUG_CONFIG_ID_WINDOW_POS_Y, | ||
DEBUG_CONFIG_ID_WINDOW_POS_DX, | ||
DEBUG_CONFIG_ID_WINDOW_POS_DY, | ||
DEBUG_CONFIG_ID_MAX | ||
}DEBUG_CONFIG_ID; | ||
|
||
/******************************************************************************** | ||
* 内容 : 設定管理モジュールの初期化 | ||
* 引数 : なし | ||
* 戻り値: なし | ||
***************************************/ | ||
void DebugConfigInit( void ); | ||
|
||
/******************************************************************************** | ||
* 内容 : DWORD設定値を保存する | ||
* 引数 : DEBUG_CONFIG_ID id | ||
* 引数 : DWORD data | ||
* 戻り値: なし | ||
***************************************/ | ||
void DebugConfigSaveDword(DEBUG_CONFIG_ID id, DWORD data ); | ||
|
||
/******************************************************************************** | ||
* 内容 : DWORD設定値を読み込む | ||
* 引数 : DEBUG_CONFIG_ID id | ||
* 戻り値: なし | ||
***************************************/ | ||
INT DebugConfigLoadDword(DEBUG_CONFIG_ID id ); | ||
|
||
#define DEBUG_CONFIG | ||
#endif /* DEBUG_CONFIG */ |
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,53 @@ | ||
#ifndef DEBUGWND_DEF_H | ||
|
||
typedef enum | ||
{ | ||
DEBUGWND_ON_CREATE , /* WM_CREATE */ | ||
DEBUGWND_ON_PAINT , /* WM_PAINT */ | ||
DEBUGWND_ON_SIZE , /* WM_SIZE */ | ||
DEBUGWND_ON_MOVE , /* WM_MOVE */ | ||
DEBUGWND_ON_WINDOWPOSCHANGED, /* WM_WINDOWPOSCHANGED */ | ||
DEBUGWND_ON_CLOSE , /* WM_CLOSE */ | ||
DEBUGWND_ON_DESTROY , /* WM_DESTROY */ | ||
DEBUGWND_ON_COMMAND , /* WM_COMMAND */ | ||
DEBUGWND_ON_KEYUP , /* WM_KEYUP */ | ||
DEBUGWND_ON_KEYDOWN , /* WM_KEYDOWN */ | ||
DEBUGWND_ON_CHAR , /* WM_CHAR */ | ||
DEBUGWND_ON_HSCROLL , /* WM_HSCROLL */ | ||
DEBUGWND_ON_VSCROLL , /* WM_VSCROLL */ | ||
DEBUGWND_ON_MOUSEWHEEL , /* WM_MOUSEWHEEL */ | ||
DEBUGWND_ON_SETFOCUS , /* WM_SETFOCUS */ | ||
DEBUGWND_ON_KILLFOCUS , /* WM_KILLFOCUS */ | ||
DEBUGWND_ON_INITMENUPOPUP , /* WM_INITMENUPOPUP */ | ||
DEBUGWND_ON_FINDMSGSTRING , /* FINDMSGSTRING‚Ì“o˜^ƒƒbƒZ[ƒW */ | ||
DEBUGWND_ON_APP , /* WM_APP */ | ||
DEBUGWND_ON_DEFAULT , /* default */ | ||
DEBUGWND_MAX | ||
} DEBUGWND_INDEX; | ||
|
||
typedef struct | ||
{ | ||
HINSTANCE hInstance; | ||
PTSTR szAppName; | ||
BOOL execute; | ||
BOOL bAppExit; | ||
int xWindowPos; | ||
int yWindowPos; | ||
int xPos; | ||
int yPos; | ||
int cxWindow; | ||
int cyWindow; | ||
int cxClient; | ||
int cyClient; | ||
int cxChar; | ||
int cyChar; | ||
int cxCaps; | ||
HWND hWndEdit; | ||
HFONT hFontIo; | ||
HACCEL hAccel; | ||
UINT messageFindReplace; | ||
HWND hDlgModeless; | ||
} S_DEBUGWND_DATA; | ||
|
||
#define DEBUGWND_DEF_H | ||
#endif /* DEBUGWND_DEF_H */ |
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,76 @@ | ||
/* 共通インクルードファイル */ | ||
#include "common.h" | ||
/* 個別インクルードファイル */ | ||
|
||
typedef struct | ||
{ | ||
LOGFONT logfont; | ||
} S_FONT_DATA; | ||
|
||
/* 外部関数定義 */ | ||
|
||
/* 外部変数定義 */ | ||
|
||
/* 内部関数定義 */ | ||
#include "DebugWndFont.h" | ||
|
||
/* 内部変数定義 */ | ||
static S_FONT_DATA fontData; | ||
|
||
/******************************************************************************** | ||
* 内容 : フォント初期化 | ||
* 引数 : なし | ||
* 戻り値: なし | ||
***************************************/ | ||
void | ||
DebugFontInit( void ) | ||
{ | ||
GetObject( GetStockObject(SYSTEM_FIXED_FONT), sizeof(LOGFONT), (PTSTR)&(fontData.logfont) ); | ||
} | ||
|
||
/******************************************************************************** | ||
* 内容 : フォント選択 | ||
* 引数 : HWND hwnd | ||
* 戻り値: BOOL (FALSE:キャンセルされた) | ||
***************************************/ | ||
BOOL | ||
DebugFontChooseFont( HWND hwnd ) | ||
{ | ||
BOOL rtn = FALSE; | ||
CHOOSEFONT cf; | ||
|
||
cf.lStructSize = sizeof(CHOOSEFONT); | ||
cf.hwndOwner = hwnd; | ||
cf.hDC = NULL; | ||
cf.lpLogFont = &(fontData.logfont); | ||
cf.iPointSize = 0; | ||
cf.Flags = CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS | CF_FIXEDPITCHONLY/*| CF_EFFECTS */; | ||
cf.rgbColors = 0; | ||
cf.lCustData = 0; | ||
cf.lpfnHook = NULL; | ||
cf.lpTemplateName = NULL; | ||
cf.hInstance = NULL; | ||
cf.lpszStyle = NULL; | ||
cf.nFontType = 0; | ||
cf.nSizeMin = 0; | ||
cf.nSizeMax = 0; | ||
|
||
rtn = ChooseFont(&cf); | ||
|
||
return rtn; | ||
} | ||
|
||
/******************************************************************************** | ||
* 内容 : 論理フォント取得 | ||
* 引数 : なし | ||
* 戻り値: LOGFONT * | ||
***************************************/ | ||
LOGFONT * | ||
DebugFontGetLogFont( void ) | ||
{ | ||
LOGFONT *rtnPtr = NULL; | ||
|
||
rtnPtr = &(fontData.logfont); | ||
|
||
return rtnPtr; | ||
} |
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,25 @@ | ||
#ifndef DEBUG_FONT_H | ||
|
||
/******************************************************************************** | ||
* 内容 : フォント初期化 | ||
* 引数 : なし | ||
* 戻り値: なし | ||
***************************************/ | ||
void DebugFontInit( void ); | ||
|
||
/******************************************************************************** | ||
* 内容 : フォント選択 | ||
* 引数 : HWND hwnd | ||
* 戻り値: BOOL (TRUE:OKが押された、FALSE:キャンセルされた) | ||
***************************************/ | ||
BOOL DebugFontChooseFont( HWND hwnd ); | ||
|
||
/******************************************************************************** | ||
* 内容 : 論理フォント取得 | ||
* 引数 : なし | ||
* 戻り値: LOGFONT * | ||
***************************************/ | ||
LOGFONT *DebugFontGetLogFont( void ); | ||
|
||
#define DEBUG_FONT_H | ||
#endif /* DEBUG_FONT_H */ |
Oops, something went wrong.