[Ttssh2-commit] [7580] TTXRecurringCommand 高DPI対応

scmno****@osdn***** scmno****@osdn*****
2019年 4月 12日 (金) 01:21:31 JST


Revision: 7580
          https://osdn.net/projects/ttssh2/scm/svn/commits/7580
Author:   zmatsuo
Date:     2019-04-12 01:21:31 +0900 (Fri, 12 Apr 2019)
Log Message:
-----------
TTXRecurringCommand 高DPI対応

Modified Paths:
--------------
    trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c

-------------- next part --------------
Modified: trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c
===================================================================
--- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c	2019-04-11 16:21:18 UTC (rev 7579)
+++ trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c	2019-04-11 16:21:31 UTC (rev 7580)
@@ -8,6 +8,7 @@
 #include "tt_res.h"
 #include "resource.h"
 #include "i18n.h"
+#include "dlglib.h"
 
 #include "compat_w95.h"
 
@@ -465,12 +466,15 @@
 //
 static LRESULT CALLBACK RecurringCommandSetting(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) {
 	char uimsg[MAX_UIMSG];
+#if 0
 	static HFONT DlgFont;
 	LOGFONT logfont;
 	HFONT font;
+#endif
 
 	switch (msg) {
 	  case WM_INITDIALOG:
+#if 0
 	  	font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0);
 		GetObject(font, sizeof(LOGFONT), &logfont);
 
@@ -487,6 +491,7 @@
 		else {
 			DlgFont = NULL;
 		}
+#endif
 
 		GetWindowText(dlg, uimsg, sizeof(uimsg));
 		GetI18nStr(SECTION, "DLG_TITLE", pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg), uimsg, pvar->ts->UILanguageFile);
@@ -548,16 +553,20 @@
 			}
 
 			EndDialog(dlg, IDOK);
+#if 0
 			if (DlgFont != NULL) {
 				DeleteObject(DlgFont);
 			}
+#endif
 			return TRUE;
 
 		  case IDCANCEL:
 			EndDialog(dlg, IDCANCEL);
+#if 0
 			if (DlgFont != NULL) {
 				DeleteObject(DlgFont);
 			}
+#endif
 			return TRUE;
 		}
 		break;
@@ -571,8 +580,11 @@
 static int PASCAL TTXProcessCommand(HWND hWin, WORD cmd) {
 	switch (cmd) {
 	  case ID_MENU_SETUP:
-		switch (DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SETUP_RECURRINGCOMMAND),
-		                       hWin, RecurringCommandSetting, (LPARAM)NULL)) {
+		  SetDialogFont(pvar->ts->SetupFName,
+						pvar->ts->UILanguageFile,
+						SECTION);
+		switch (TTDialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SETUP_RECURRINGCOMMAND),
+								 hWin, RecurringCommandSetting, (LPARAM)NULL)) {
 		  case IDOK:
 			break;
 		  case IDCANCEL:


Ttssh2-commit メーリングリストの案内