Index: src/winhugs/winhugs.rc =================================================================== RCS file: /cvs/hugs98/src/winhugs/winhugs.rc,v retrieving revision 1.16 diff -u -r1.16 winhugs.rc --- src/winhugs/winhugs.rc 5 Sep 2005 11:23:52 -0000 1.16 +++ src/winhugs/winhugs.rc 5 Sep 2005 13:38:56 -0000 @@ -152,15 +152,15 @@ // Dialog // -ABOUTDLGBOX DIALOGEX 35, 24, 289, 113 +ABOUTDLGBOX DIALOGEX 35, 24, 318, 113 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION CAPTION "About Hugs for Windows" FONT 8, "MS Shell Dlg", 400, 0, 0x0 BEGIN - PUSHBUTTON "OK",IDOK,221,90,53,16 - LTEXT "Hugs 98: Based on the Haskell 98 standard\nCopyright © 1994-2005\nBug reports to: hugs-bugs@haskell.org\nWebsite: http://www.haskell.org/hugs\n\nPlease see the distribution for License and Credits info", - IDC_STATIC,103,22,178,66 + PUSHBUTTON "OK",IDOK,252,90,53,16 + CONTROL "",rtfAbout,"RichEdit20A",ES_MULTILINE | ES_AUTOHSCROLL | + ES_READONLY | WS_TABSTOP,103,17,201,67,WS_EX_TRANSPARENT END OPTIONSDLGBOX DIALOGEX 14, 24, 313, 234 Index: src/winhugs/DlgAbout.c =================================================================== RCS file: /cvs/hugs98/src/winhugs/DlgAbout.c,v retrieving revision 1.1 diff -u -r1.1 DlgAbout.c --- src/winhugs/DlgAbout.c 1 Sep 2005 12:22:19 -0000 1.1 +++ src/winhugs/DlgAbout.c 5 Sep 2005 14:57:38 -0000 @@ -3,10 +3,22 @@ #include "resrc1.h" #include "Winmenu.h" +// String containing version name +extern char* versionString; + const int BmpWidth = 111; const int BmpHeight = 112; const int BmpTransparent = RGB(253,5,255); +LPCTSTR AboutText = + "Hugs 98: Based on the Haskell 98 standard\n" + "Copyright © 1994-2005\n" + "Bug reports to: mailto:hugs-bugs@haskell.org\n" + "Website: http://www.haskell.org/hugs\n" + "\n" + "Please see the distribution for License and Credits info\n" + "Version: "; + typedef struct _AboutData { HIMAGELIST hImgList; @@ -24,6 +36,7 @@ switch (Msg) { case WM_INITDIALOG: { + HWND hRTF = GetDlgItem(hDlg, rtfAbout); AboutData* ad = malloc(sizeof(AboutData)); HBITMAP hBmp; SetWindowLongPtr(hDlg, GWL_USERDATA, (LONG) ad); @@ -34,6 +47,12 @@ hBmp = LoadBitmap(hThisInstance, MAKEINTRESOURCE(BMP_ABOUT)); ImageList_AddMasked(ad->hImgList, hBmp, BmpTransparent); DeleteObject(hBmp); + + SendMessage(hRTF, EM_AUTOURLDETECT, TRUE, 0); + SetWindowText(hRTF, AboutText); + SendMessage(hRTF, EM_SETSEL, -1, -1); + SendMessage(hRTF, EM_REPLACESEL, FALSE, (LPARAM) versionString); + SendMessage(hRTF, EM_SETEVENTMASK, 0, ENM_LINK); } return TRUE; @@ -56,6 +75,25 @@ } break; + case WM_NOTIFY: + if (wParam == rtfAbout && ((LPNMHDR) lParam)->code == EN_LINK) + { + TEXTRANGE tr; + char Buffer[1000]; + ENLINK* enl = (ENLINK*) lParam; + + if (enl->msg == WM_LBUTTONUP) + { + tr.lpstrText = Buffer; + tr.chrg.cpMin = enl->chrg.cpMin; + tr.chrg.cpMax = enl->chrg.cpMax; + + SendMessage(enl->nmhdr.hwndFrom, EM_GETTEXTRANGE, 0, (LPARAM) &tr); + ExecuteFile(Buffer); + } + } + break; + case WM_DESTROY: { AboutData* ad = (AboutData*) GetWindowLongPtr(hDlg, GWL_USERDATA); Index: src/winhugs/resrc1.h =================================================================== RCS file: /cvs/hugs98/src/winhugs/resrc1.h,v retrieving revision 1.2 diff -u -r1.2 resrc1.h --- src/winhugs/resrc1.h 5 Sep 2005 11:23:52 -0000 1.2 +++ src/winhugs/resrc1.h 5 Sep 2005 13:36:33 -0000 @@ -12,6 +12,7 @@ #define IDC_RICHEDIT21 1005 #define rtfPreview 1005 #define txtPath 1005 +#define rtfAbout 1005 #define ID_RTF 1006 #define IDC_CHECK1 1012 #define chkOverlap 1012