Minor bug fixes.

This commit is contained in:
Dmitry Timoshkov 2002-11-15 04:13:46 +00:00 committed by Alexandre Julliard
parent 4cda16e03b
commit a1c46d375c
1 changed files with 4 additions and 2 deletions

View File

@ -41,6 +41,7 @@ NOTEPAD_GLOBALS Globals;
VOID SetFileName(LPSTR szFileName)
{
lstrcpy(Globals.szFileName, szFileName);
Globals.szFileTitle[0] = 0;
GetFileTitle(szFileName, Globals.szFileTitle, sizeof(Globals.szFileTitle));
}
@ -125,8 +126,6 @@ LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
ES_AUTOVSCROLL | ES_MULTILINE,
0, 0, rc.right, rc.bottom, hWnd,
NULL, Globals.hInstance, NULL);
NOTEPAD_InitData();
DIALOG_FileNew();
} else {
ShowLastError();
return -1;
@ -305,6 +304,9 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
ExitProcess(1);
}
NOTEPAD_InitData();
DIALOG_FileNew();
ShowWindow(Globals.hMainWnd, show);
UpdateWindow(Globals.hMainWnd);
DragAcceptFiles(Globals.hMainWnd, TRUE);