diff --git a/programs/clock/language.c b/programs/clock/language.c index 3dbf11aebc..823e98e6bb 100644 --- a/programs/clock/language.c +++ b/programs/clock/language.c @@ -181,7 +181,7 @@ VOID LANGUAGE_Init(VOID) CHAR szBuffer[MAX_PATHNAME_LEN]; #ifdef WINELIB - Globals.lpszLanguage = Languages[Options.language].name; + Globals.lpszLanguage = (LPSTR)Languages[Options.language].name; #endif if (Globals.lpszLanguage == "En") { diff --git a/programs/clock/main.h b/programs/clock/main.h index 221b1657fe..5979d81f67 100644 --- a/programs/clock/main.h +++ b/programs/clock/main.h @@ -28,7 +28,7 @@ typedef struct HMENU hPopupMenu1; LPCSTR lpszIniFile; LPCSTR lpszIcoFile; - LPCSTR lpszLanguage; + LPSTR lpszLanguage; UINT wStringTableOffset; BOOL bAnalog; diff --git a/programs/cmdlgtst/cmdlgtst.c b/programs/cmdlgtst/cmdlgtst.c index 00772835c9..a790bb1b82 100644 --- a/programs/cmdlgtst/cmdlgtst.c +++ b/programs/cmdlgtst/cmdlgtst.c @@ -65,8 +65,6 @@ static OPENFILENAME ofn; static HWND findDialogBox = 0; static UINT findMessageId = 0; -static int findDialogBoxInit = 0; -static int findDialogStructInit = 0; static FINDREPLACE frS; static char fromstring[1024], tostring[1024]; @@ -390,9 +388,9 @@ void mw_PrintSetup(HWND hWnd) // Escape(tmp.hDC, NEWFRAME, 0, NULL, NULL); // Escape(tmp.hDC, ENDDOC, 0, NULL, NULL); // DeleteDC(tmp.hDC); - if (pd.hDevMode != NULL) + if (pd.hDevMode != 0) GlobalFree(pd.hDevMode); - if (pd.hDevNames != NULL) + if (pd.hDevNames != 0) GlobalFree(pd.hDevNames); pd.hDevMode = 0; diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c index f8ebd36b3a..c51b4f8213 100644 --- a/programs/notepad/dialog.c +++ b/programs/notepad/dialog.c @@ -47,7 +47,7 @@ int AlertIDS(UINT ids_message, UINT ids_caption, WORD type) { return (MessageBox(Globals.hMainWnd, szMessage, szCaption, type)); } -void AlertFileNotFound(LPCSTR szFileName) { +void AlertFileNotFound(LPSTR szFileName) { int nResult; CHAR szMessage[MAX_STRING_LEN]; @@ -65,7 +65,7 @@ void AlertFileNotFound(LPCSTR szFileName) { } -int AlertFileNotSaved(LPCSTR szFileName) { +int AlertFileNotSaved(LPSTR szFileName) { int nResult; CHAR szMessage[MAX_STRING_LEN]; @@ -373,14 +373,14 @@ VOID DIALOG_FilePrint(VOID) */ /* Let commdlg manage copy settings */ - printer.nCopies = PD_USEDEVMODECOPIES; + printer.nCopies = (WORD)PD_USEDEVMODECOPIES; if (PrintDlg(&printer)) { /* initialize DOCINFO */ di.cbSize = sizeof(DOCINFO); - lstrcpy(di.lpszDocName, szDocumentName); - lstrcpy(di.lpszOutput, szOutput); + lstrcpy((LPSTR)di.lpszDocName, szDocumentName); + lstrcpy((LPSTR)di.lpszOutput, szOutput); hContext = printer.hDC; assert(hContext!=0); @@ -627,7 +627,7 @@ VOID DIALOG_PageSetup(VOID) WNDPROC lpfnDlg; lpfnDlg = MakeProcInstance(DIALOG_PAGESETUP_DlgProc, Globals.hInstance); - DialogBox(Globals.hInstance, STRING_PAGESETUP_Xx, Globals.hMainWnd, lpfnDlg); + DialogBox(Globals.hInstance, STRING_PAGESETUP_Xx, Globals.hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); } diff --git a/programs/notepad/main.c b/programs/notepad/main.c index 5a481116f4..ca628c21d7 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -17,6 +17,9 @@ #include "dialog.h" #include "language.h" +extern BOOL DoCloseFile(void); +extern void DoOpenFile(LPCSTR szFileName); + NOTEPAD_GLOBALS Globals; /*********************************************************************** diff --git a/programs/notepad/search.c b/programs/notepad/search.c index c6218dae54..e53851b870 100644 --- a/programs/notepad/search.c +++ b/programs/notepad/search.c @@ -32,7 +32,7 @@ } for (i=0; i delta[szBuf[i]]) { + if ((nSPLen-j+1) > delta[(int)szBuf[i]]) { i+= (nSPLen-j+1); } else { - i+= delta[szBuf[i]]; + i+= delta[(int)szBuf[i]]; } } } while (j>0 && i<=nBufLen); diff --git a/programs/progman/dialog.c b/programs/progman/dialog.c index 5157d92b1f..107462ab3f 100644 --- a/programs/progman/dialog.c +++ b/programs/progman/dialog.c @@ -35,7 +35,7 @@ INT DIALOG_New(INT nDefault) New.nDefault = nDefault; ret = DialogBox(Globals.hInstance, STRING_NEW_Xx, - Globals.hMainWnd, lpfnDlg); + Globals.hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); return ret; } @@ -97,7 +97,7 @@ HLOCAL DIALOG_CopyMove(LPCSTR lpszProgramName, LPCSTR lpszFromGroupName, ret = DialogBox(Globals.hInstance, bMove ? STRING_MOVE_Xx : STRING_COPY_Xx, - Globals.hMainWnd, lpfnDlg); + Globals.hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); return((ret == IDOK) ? CopyMove.hToGroup : 0); @@ -186,7 +186,7 @@ BOOL DIALOG_GroupAttributes(LPSTR lpszTitle, LPSTR lpszGrpFile, INT nSize) GroupAttributes.lpszGrpFile = lpszGrpFile; ret = DialogBox(Globals.hInstance, STRING_GROUP_Xx, - Globals.hMainWnd, lpfnDlg); + Globals.hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); return(ret == IDOK); } @@ -269,7 +269,7 @@ BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine, lstrcpyn(ProgramAttributes.lpszTmpIconFile, lpszIconFile, MAX_PATHNAME_LEN); ret = DialogBox(Globals.hInstance, STRING_PROGRAM_Xx, - Globals.hMainWnd, lpfnDlg); + Globals.hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); return(ret == IDOK); @@ -391,7 +391,7 @@ VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile, Symbol.lpnIconIndex = lpnIconIndex; DialogBox(Globals.hInstance, STRING_SYMBOL_Xx, - Globals.hMainWnd, lpfnDlg); + Globals.hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); } @@ -476,7 +476,7 @@ VOID DIALOG_Execute() { WNDPROC lpfnDlg = MakeProcInstance(DIALOG_EXECUTE_DlgProc, Globals.hInstance); DialogBox(Globals.hInstance, STRING_EXECUTE_Xx, - Globals.hMainWnd, lpfnDlg); + Globals.hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); } diff --git a/programs/progman/group.c b/programs/progman/group.c index fa2df79789..7b3dc0e46d 100644 --- a/programs/progman/group.c +++ b/programs/progman/group.c @@ -5,7 +5,9 @@ */ #include +#include #include "windows.h" +#include "windowsx.h" #include "progman.h" /*********************************************************************** diff --git a/programs/progman/main.c b/programs/progman/main.c index 44ccfff32a..8bd01611f3 100644 --- a/programs/progman/main.c +++ b/programs/progman/main.c @@ -5,7 +5,9 @@ */ #include +#include #include "windows.h" +#include "windowsx.h" #include "license.h" #include "progman.h" @@ -15,6 +17,8 @@ GLOBALS Globals; +VOID WINAPI WriteOutProfiles16(void); + static VOID MAIN_CreateGroups(void); static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); static ATOM MAIN_RegisterMainWinClass(void); diff --git a/programs/progman/program.c b/programs/progman/program.c index 40ff409c13..51a4e545a7 100644 --- a/programs/progman/program.c +++ b/programs/progman/program.c @@ -4,7 +4,9 @@ * Copyright 1996 Ulrich Schmid */ +#include #include "windows.h" +#include "windowsx.h" #include "progman.h" /*********************************************************************** diff --git a/programs/view/init.c b/programs/view/init.c index bb8d118b63..e510550868 100644 --- a/programs/view/init.c +++ b/programs/view/init.c @@ -1,5 +1,6 @@ #include #include "globals.h" +#include "resource.h" /* global variables */ diff --git a/programs/view/view.c b/programs/view/view.c index 7241bbed32..de4d17a9f5 100644 --- a/programs/view/view.c +++ b/programs/view/view.c @@ -1,4 +1,5 @@ #include +#include "resource.h" /* #include @@ -183,7 +184,7 @@ HMETAFILE GetPlaceableMetaFile( HWND hwnd, LPCSTR szFileName ) _llseek(fh, sizeof(APMFILEHEADER), 0); if (!_lread(fh, lpData, (UINT)(mfHeader.mtSize * 2L))) { - GlobalFree(lpData); + GlobalFree((HGLOBAL)lpData); _lclose(fh); return 0; } diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index d06655decb..9948441f40 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -5,7 +5,9 @@ */ #include +#include #include "windows.h" +#include "windowsx.h" #include "winhelp.h" static void Report(LPCSTR str) diff --git a/programs/winhelp/macro.c b/programs/winhelp/macro.c index bb152086e1..82fd5a2ff3 100644 --- a/programs/winhelp/macro.c +++ b/programs/winhelp/macro.c @@ -482,7 +482,7 @@ VOID MACRO_Print(VOID) printer.hPrintTemplate = 0; printer.hSetupTemplate = 0; - if (PrintDlg16(&printer)) { + if (PrintDlg16((LPPRINTDLG16)&printer)) { fprintf(stderr, "Print()\n"); }; } diff --git a/programs/winhelp/macro.lex.l b/programs/winhelp/macro.lex.l index 0e6823d12f..e40e159e32 100644 --- a/programs/winhelp/macro.lex.l +++ b/programs/winhelp/macro.lex.l @@ -177,7 +177,7 @@ VOID MACRO_ExecuteMacro(LPCSTR macro) if (!lstrcmpi(macro, "MacroTest")) { WNDPROC lpfnDlg = MakeProcInstance(MACRO_TestDialogProc, Globals.hInstance); - DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, lpfnDlg); + DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, (DLGPROC)lpfnDlg); FreeProcInstance(lpfnDlg); macro = szTestMacro; } diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c index 39271a82e7..590deaff9c 100644 --- a/programs/winhelp/winhelp.c +++ b/programs/winhelp/winhelp.c @@ -5,7 +5,9 @@ */ #include +#include #include "windows.h" +#include "windowsx.h" #include "winhelp.h" #ifdef WINELIB