mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[NOTEPAD]
Improve print argument flag. Patch by Lee Schroeder. CORE-7514 #resolve svn path=/trunk/; revision=61173
This commit is contained in:
parent
bcbc26ebd2
commit
abbea26543
1 changed files with 15 additions and 7 deletions
|
@ -462,9 +462,9 @@ static int AlertFileDoesNotExist(LPCTSTR szFileName)
|
|||
return(nResult);
|
||||
}
|
||||
|
||||
static void HandleCommandLine(LPTSTR cmdline)
|
||||
static BOOL HandleCommandLine(LPTSTR cmdline)
|
||||
{
|
||||
int opt_print=0;
|
||||
int opt_print = 0;
|
||||
|
||||
while (*cmdline == _T(' ') || *cmdline == _T('-') || *cmdline == _T('/'))
|
||||
{
|
||||
|
@ -480,7 +480,7 @@ static void HandleCommandLine(LPTSTR cmdline)
|
|||
{
|
||||
case 'p':
|
||||
case 'P':
|
||||
opt_print=1;
|
||||
opt_print = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -526,7 +526,10 @@ static void HandleCommandLine(LPTSTR cmdline)
|
|||
DoOpenFile(file_name);
|
||||
InvalidateRect(Globals.hMainWnd, NULL, FALSE);
|
||||
if (opt_print)
|
||||
{
|
||||
DIALOG_FilePrint();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -539,7 +542,9 @@ static void HandleCommandLine(LPTSTR cmdline)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -554,10 +559,10 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh
|
|||
HMONITOR monitor;
|
||||
MONITORINFO info;
|
||||
INT x, y;
|
||||
|
||||
|
||||
static const TCHAR className[] = _T("NPClass");
|
||||
static const TCHAR winName[] = _T("Notepad");
|
||||
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
|
@ -626,7 +631,10 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh
|
|||
|
||||
DIALOG_ViewStatusBar();
|
||||
|
||||
HandleCommandLine(cmdline);
|
||||
if (!HandleCommandLine(cmdline))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
hAccel = LoadAccelerators( hInstance, MAKEINTRESOURCE(ID_ACCEL) );
|
||||
|
||||
|
|
Loading…
Reference in a new issue