Minor bug fixes.
This commit is contained in:
parent
4cda16e03b
commit
a1c46d375c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue