--- mstools/samples/fontview/fontview.c 2018/08/09 18:20:51 1.1.1.2 +++ mstools/samples/fontview/fontview.c 2018/08/09 18:21:55 1.1.1.3 @@ -12,6 +12,7 @@ #define APIENTRY FAR PASCAL typedef unsigned int UINT; #define WNDPROC FARPROC +#define DLGPROC FARPROC #endif @@ -573,7 +574,7 @@ BOOL FillInValue (HWND hwnd, int param) hInst = GetWindowWord (hwnd, GWW_HINSTANCE); #endif lpEnumFonts = MakeProcInstance ((FARPROC)EnumFontNames, hInst); - EnumFonts (hdc, NULL, lpEnumFonts, (LONG)&hwnd); + EnumFonts (hdc, NULL, (FONTENUMPROC)lpEnumFonts, (LPARAM)&hwnd); FreeProcInstance (lpEnumFonts); ReleaseDC (hwnd, hdc); atom = GlobalFindAtom ((LPSTR)lf.lfFaceName); @@ -1020,11 +1021,7 @@ static int idMenuSelect; case IDM_CREATEFONT: lpDlgFunc = MakeProcInstance((FARPROC) CreateDlgProc, hInst); -#if defined (WIN32) - DialogBoxParam(hInst, "CreateFont", hwnd, lpDlgFunc, (DWORD)(LPLOGFONT)&lf); -#else - DialogBoxParam(hInst, "CreateFont", hwnd, (FARPROC)lpDlgFunc, (DWORD)(LPLOGFONT)&lf); -#endif + DialogBoxParam(hInst, "CreateFont", hwnd, (DLGPROC)lpDlgFunc, (DWORD)(LPLOGFONT)&lf); FreeProcInstance(lpDlgFunc); index = (int)SendMessage (hwndCreateParam, CB_GETCURSEL, 0, 0); if (index != CB_ERR) { @@ -1038,11 +1035,7 @@ static int idMenuSelect; case IDM_TEXTMETRIC: lpDlgFunc = MakeProcInstance((FARPROC) MetricsDlgProc, hInst); -#if defined (WIN32) - DialogBoxParam(hInst, "TextMetric", hwnd, lpDlgFunc, (DWORD)(LPLOGFONT)&lf); -#else - DialogBoxParam(hInst, "TextMetric", hwnd, (FARPROC)lpDlgFunc, (DWORD)(LPLOGFONT)&lf); -#endif + DialogBoxParam(hInst, "TextMetric", hwnd, (DLGPROC)lpDlgFunc, (DWORD)(LPLOGFONT)&lf); FreeProcInstance(lpDlgFunc); index = (int)SendMessage (hwndCreateParam, CB_GETCURSEL, 0, 0); if (index != CB_ERR) { @@ -1055,11 +1048,7 @@ static int idMenuSelect; case IDM_ENUMFONTS: lpDlgFunc = MakeProcInstance((FARPROC) EnumDlgProc, hInst); -#if defined (WIN32) - DialogBoxParam(hInst, "EnumFonts", hwnd, lpDlgFunc, (DWORD)(LPLOGFONT)&lf); -#else - DialogBoxParam(hInst, "EnumFonts", hwnd, (FARPROC)lpDlgFunc, (DWORD)(LPLOGFONT)&lf); -#endif + DialogBoxParam(hInst, "EnumFonts", hwnd, (DLGPROC)lpDlgFunc, (DWORD)(LPLOGFONT)&lf); FreeProcInstance(lpDlgFunc); index = (int)SendMessage (hwndCreateParam, CB_GETCURSEL, 0, 0); if (index != CB_ERR) { @@ -1098,17 +1087,10 @@ static int idMenuSelect; case IDM_ABOUT: lpDlgFunc = MakeProcInstance((FARPROC) SimpleDlgProc, hInst); -#if defined (WIN32) DialogBox(hInst, (wmId==IDM_ABOUT)?"FONTVIEW":"UsageBox", hwnd, - lpDlgFunc); -#else - DialogBox(hInst, - (wmId==IDM_ABOUT)?"FONTVIEW":"UsageBox", - hwnd, - (FARPROC)lpDlgFunc); -#endif + (DLGPROC)lpDlgFunc); FreeProcInstance(lpDlgFunc); break;