Commit a1c46d37 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Minor bug fixes.

parent 4cda16e0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment