OSDN Git Service

Fix crash in the About dialog when running WinMerge on Wine.
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 15 Apr 2020 14:16:54 +0000 (23:16 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 15 Apr 2020 14:16:54 +0000 (23:16 +0900)
Src/AboutDlg.cpp
Src/Merge.rc
Src/resource.h

index f43110b..d989430 100644 (file)
@@ -86,6 +86,7 @@ void CAboutDlg::Impl::DoDataExchange(CDataExchange* pDX)
 {
        CTrDialog::DoDataExchange(pDX);
        //{{AFX_DATA_MAP(CAboutDlg::Impl)
+       DDX_Text(pDX, IDC_DEVELOPERS, m_p->m_info.developers);
        DDX_Text(pDX, IDC_COMPANY, m_p->m_info.copyright);
        DDX_Text(pDX, IDC_VERSION, m_p->m_info.version);
        //}}AFX_DATA_MAP
@@ -102,8 +103,7 @@ BOOL CAboutDlg::Impl::OnInitDialog()
 
        m_font.CreatePointFont(10 * 10, _T("Tahoma"));
 
-       SetDlgItemText(static_cast<unsigned>(IDC_STATIC), m_p->m_info.developers);
-       GetDlgItem(IDC_STATIC)->SetFont(&m_font);
+       GetDlgItem(IDC_DEVELOPERS)->SetFont(&m_font);
        GetDlgItem(IDC_VERSION)->SetFont(&m_font);
 
        String link;
index 7621a37..72209b1 100644 (file)
@@ -924,7 +924,7 @@ CAPTION "About WinMerge"
 FONT 8, "MS Shell Dlg", 0, 0, 0x1\r
 BEGIN\r
     CONTROL         "",IDC_ABOUTBOX_ICON,"Static",SS_OWNERDRAW,0,0,366,215\r
-    LTEXT           "",IDC_STATIC,7,60,200,120\r
+    LTEXT           "",IDC_DEVELOPERS,7,60,200,120\r
     LTEXT           "Version 1.0",IDC_VERSION,240,153,133,20,SS_NOPREFIX\r
     CONTROL         "Visit the WinMerge HomePage!",IDC_WWW,"SysLink",LWS_IGNORERETURN | 0x1,120,220,167,10\r
     LTEXT           "[VERSION COPYRIGHT GOES HERE]",IDC_COMPANY,7,172,350,42\r
index cb0e912..4b0cb33 100644 (file)
 #define IDC_WWW                         1019\r
 #define IDC_IGNCASE_CHECK               1020\r
 #define IDC_COMPANY                     1021\r
+#define IDC_DEVELOPERS                  1022\r
 #define IDC_VER_SYS                     1024\r
 #define IDC_HILITE_CHECK                1025\r
 #define IDC_IGNOREREGEXP                1026\r