--- mstools/samples/multipad/mpprint.c 2018/08/09 18:20:01 1.1.1.1 +++ mstools/samples/multipad/mpprint.c 2018/08/09 18:20:40 1.1.1.2 @@ -220,7 +220,7 @@ VOID APIENTRY PrintFile(HWND hwnd) /* Disable the main application window and create the Cancel dialog */ EnableWindow (hwndFrame, FALSE); - hwndPDlg = CreateDialog (hInst, IDD_PRINT, hwnd, (WNDPROC)PrintDlgProc); + hwndPDlg = CreateDialog (hInst, IDD_PRINT, hwnd, (DLGPROC)PrintDlgProc); if (!hwndPDlg) goto getout3; @@ -252,7 +252,7 @@ VOID APIENTRY PrintFile(HWND hwnd) /* While more lines print out the text */ while (iLine < nLinesEc){ - if (yExtSoFar + dy > yExtPage){ + if (yExtSoFar + (INT)dy > yExtPage){ /* Reached the end of a page. Tell the device driver to eject a * page */ @@ -265,7 +265,7 @@ VOID APIENTRY PrintFile(HWND hwnd) * and lock from that offset into the buffer */ ich = (WORD)SendMessage (hwndEdit, EM_LINEINDEX, iLine, 0L); cch = (WORD)SendMessage (hwndEdit, EM_LINELENGTH, ich, 0L); - pch = LocalLock(hT) + ich; + pch = (PSTR)LocalLock(hT) + ich; /* Print the line and unlock the text handle */ TextOut (hdc, 0, yExtSoFar, (LPSTR)pch, cch);