From 18 Jan, 2021 0:00 UTC: All services will be temporary unavailable for maintenance
  • R/O
  • HTTP
  • SSH
  • HTTPS

GVONavish: Commit

大航海時代Onlineのプレイを少しだけ助けてくれるツール。


Commit MetaInfo

Revision6c0f4cd510eb8fb40c94ebc678fc0c6597b85b0a (tree)
Time2014-03-10 10:33:40
AuthorMandhelingFreak <mandheling30-freak@yaho...>
CommiterMandhelingFreak

Log Message

バージョン番号変更(1.2->1.3)
バージョン情報ダイアログの表示をリソースダイアログ表示に変更。

Change Summary

Incremental Difference

--- a/GVONavish/GVONavish/GVONavish.cpp
+++ b/GVONavish/GVONavish/GVONavish.cpp
@@ -43,6 +43,7 @@ HDC g_hdcMain;
4343 static ATOM MyRegisterClass( HINSTANCE hInstance );
4444 static BOOL InitInstance( HINSTANCE, int );
4545 LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM );
46+BOOL CALLBACK aboutDlgProc( HWND, UINT, WPARAM, LPARAM );
4647 static LRESULT s_mainLoop();
4748
4849
@@ -60,7 +61,6 @@ static void s_onPaint( HWND );
6061
6162
6263 // アプリ処理
63-static std::wstring s_makeVersionString();
6464 static std::wstring s_getMapFileName();
6565 static void s_updateFrame(HWND);
6666 static void s_updateWindowTitle( HWND, POINT, double );
@@ -72,16 +72,14 @@ static void s_closeShipRoute();
7272
7373 // ローカル変数
7474 static LPCWSTR const k_appName = L"GVONavish"; // アプリケーション名
75-static LPCWSTR const k_version = L"ver 1.2"; // バージョン番号
76-static LPCWSTR const k_copyright = L"copyright(c) @MandhelingFreak"; // 著作権表示(いちおー)
75+static LPCWSTR const k_version = L"ver 1.3"; // バージョン番号
76+static LPCWSTR const k_copyright = L"copyright(c) 2014 @MandhelingFreak"; // 著作権表示(いちおー)
7777
7878 static LPCWSTR const k_windowClassName = L"GVONavish"; // メイン ウィンドウ クラス名
7979 static const LPCWSTR k_configFileName = L"GVONavish.ini"; // 設定ファイル名
8080 static LPCWSTR const k_appMutexName = L"Global\\{7554E265-3247-4FCA-BC60-5AA814658351}";
8181 static HANDLE s_appMutex;
8282
83-static const std::wstring k_aboutText = s_makeVersionString(); // バージョン情報テキスト
84-
8583 static Gdiplus::GdiplusStartupInput s_gdisi;
8684 static ULONG_PTR s_gdiToken;
8785
@@ -312,10 +310,7 @@ LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
312310 // 選択されたメニューの解析:
313311 switch ( wmId ) {
314312 case IDM_ABOUT:
315- ::MessageBox( hwnd,
316- k_aboutText.c_str(),
317- k_appName,
318- MB_OK | MB_ICONINFORMATION );
313+ ::DialogBox( g_hinst, MAKEINTRESOURCE( IDD_ABOUTBOX ), hwnd, aboutDlgProc );
319314 break;
320315 case IDM_EXIT:
321316 DestroyWindow( hwnd );
@@ -390,7 +385,6 @@ LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
390385 s_gvoGameProcess.setPollingInterval( s_pollingInterval );
391386 break;
392387 #endif
393-
394388 default:
395389 return DefWindowProc( hwnd, message, wp, lp );
396390 }
@@ -602,15 +596,6 @@ static void s_onPaint( HWND hwnd )
602596 }
603597
604598
605-static std::wstring s_makeVersionString()
606-{
607- std::wstring s;
608- s += std::wstring(k_appName) + L" " + k_version + L"\n";
609- s += k_copyright;
610- return s;
611-}
612-
613-
614599 // マップ画像を選択させる
615600 static std::wstring s_getMapFileName()
616601 {
@@ -752,3 +737,32 @@ static void s_closeShipRoute()
752737 {
753738 s_shipRouteList->closeRoute();
754739 }
740+
741+
742+BOOL CALLBACK aboutDlgProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
743+{
744+ switch ( msg ) {
745+ case WM_INITDIALOG:
746+ {
747+ std::wstring versionString = std::wstring(k_appName) + L" " + k_version;
748+ std::wstring copyRightString = std::wstring( k_copyright );
749+
750+ ::SetDlgItemText( hwnd, IDC_VERSION_LABEL, versionString.c_str() );
751+ ::SetDlgItemText( hwnd, IDC_COPYRIGHT_LABEL, copyRightString.c_str() );
752+ }
753+ break;
754+ case WM_COMMAND:
755+ switch ( LOWORD( wp ) ) {
756+ case IDOK:
757+ case IDCANCEL:
758+ ::EndDialog( hwnd, 0 );
759+ break;
760+ default:
761+ return FALSE;
762+ }
763+ break;
764+ default:
765+ return FALSE;
766+ }
767+ return TRUE;
768+}
--- a/GVONavish/GVONavish/GVONavish.rc
+++ b/GVONavish/GVONavish/GVONavish.rc
@@ -74,15 +74,16 @@ IDR_SHIPROUTEMANAGEPOPUPMENU MENU
7474 // Dialog resources
7575 //
7676 LANGUAGE LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN
77-IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62
77+IDD_ABOUTBOX DIALOGEX 0, 0, 194, 69
7878 STYLE DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU
7979 CAPTION "バージョン情報 GVONavish"
80-FONT 9, "MS UI Gothic", 0, 0, 1
80+FONT 11, "MS UI Gothic", 400, 0, 128
8181 {
82- ICON IDR_MAINFRAME, IDC_STATIC, 14, 14, 18, 21, SS_ICON, WS_EX_LEFT
83- LTEXT "GVONavish, Version 1.0", IDC_STATIC, 42, 14, 114, 8, SS_LEFT | SS_NOPREFIX, WS_EX_LEFT
84- LTEXT "Copyright (C) 2014", IDC_STATIC, 42, 26, 114, 8, SS_LEFT, WS_EX_LEFT
85- DEFPUSHBUTTON "OK", IDOK, 113, 41, 50, 14, WS_GROUP, WS_EX_LEFT
82+ ICON IDR_MAINFRAME, IDC_STATIC, 14, 14, 16, 17, SS_ICON, WS_EX_LEFT
83+ CONTROL "GVONavish, Version 1.0", IDC_VERSION_LABEL, WC_STATIC, SS_LEFTNOWORDWRAP | SS_NOPREFIX, 42, 14, 149, 8, WS_EX_LEFT
84+ CONTROL "Copyright (C) 2014", IDC_COPYRIGHT_LABEL, WC_STATIC, SS_LEFTNOWORDWRAP, 42, 26, 149, 8, WS_EX_LEFT
85+ DEFPUSHBUTTON "OK", IDOK, 141, 52, 50, 14, WS_GROUP, WS_EX_LEFT
86+ LTEXT "http://gvonavish.sourceforge.jp/", 0, 42, 39, 149, 8, SS_LEFT, WS_EX_LEFT
8687 }
8788
8889
--- a/GVONavish/GVONavish/Resource.h
+++ b/GVONavish/GVONavish/Resource.h
@@ -11,6 +11,8 @@
1111 #define IDR_POPUPMENU 137
1212 #define IDC_SHIPROUTELIST 138
1313 #define IDI_BLANK 145
14+#define IDC_COPYRIGHT_LABEL 146
15+#define IDC_VERSION_LABEL 147
1416 #define IDM_DELETE_SHIP_ROUTE 40000
1517 #define IDM_ROUTE_MANAGE_OPTION 40001
1618 #define IDM_DEBUG_INTERVAL_NORMAL 40002
Show on old repository browser