mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 19:31:31 +00:00
[FONTVIEW] Fix regression; opening files won't list files (#3045)
Based on Mark Jansen's patch in CORE-17001.
This commit is contained in:
parent
9170432c8f
commit
49be08bc69
1 changed files with 6 additions and 4 deletions
|
@ -35,7 +35,7 @@ HINSTANCE g_hInstance;
|
||||||
INT g_FontIndex = 0;
|
INT g_FontIndex = 0;
|
||||||
INT g_NumFonts = 0;
|
INT g_NumFonts = 0;
|
||||||
LOGFONTW g_LogFonts[64];
|
LOGFONTW g_LogFonts[64];
|
||||||
LPCWSTR g_fileName;
|
LPCWSTR g_fileName = L"";
|
||||||
WCHAR g_FontTitle[1024] = L"";
|
WCHAR g_FontTitle[1024] = L"";
|
||||||
BOOL g_FontPrint = FALSE;
|
BOOL g_FontPrint = FALSE;
|
||||||
BOOL g_DisableInstall = FALSE;
|
BOOL g_DisableInstall = FALSE;
|
||||||
|
@ -102,7 +102,6 @@ wWinMain(HINSTANCE hThisInstance,
|
||||||
int argc;
|
int argc;
|
||||||
INT i;
|
INT i;
|
||||||
WCHAR** argv;
|
WCHAR** argv;
|
||||||
WCHAR szFileName[MAX_PATH] = L"";
|
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
HWND hMainWnd;
|
HWND hMainWnd;
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
@ -125,6 +124,8 @@ wWinMain(HINSTANCE hThisInstance,
|
||||||
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
WCHAR szFileName[MAX_PATH] = L"";
|
||||||
OPENFILENAMEW fontOpen;
|
OPENFILENAMEW fontOpen;
|
||||||
WCHAR filter[MAX_PATH*2] = {0}, dialogTitle[MAX_PATH];
|
WCHAR filter[MAX_PATH*2] = {0}, dialogTitle[MAX_PATH];
|
||||||
|
|
||||||
|
@ -154,6 +155,7 @@ wWinMain(HINSTANCE hThisInstance,
|
||||||
exiting the program altogether */
|
exiting the program altogether */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -190,9 +192,9 @@ wWinMain(HINSTANCE hThisInstance,
|
||||||
g_fileName = fileName;
|
g_fileName = fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AddFontResourceW(fileName))
|
if (!AddFontResourceW(g_fileName))
|
||||||
{
|
{
|
||||||
ErrorMsgBox(0, IDS_ERROR_NOFONT, fileName);
|
ErrorMsgBox(0, IDS_ERROR_NOFONT, g_fileName);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue