[CLIPBRD] Clipbrd program should accept the quoted file path (#638)

This commit is contained in:
Katayama Hirofumi MZ 2018-08-19 01:36:47 +09:00 committed by Mark Jansen
parent cf56e1cb58
commit b2d2e3433b
2 changed files with 5 additions and 2 deletions

View file

@ -409,6 +409,8 @@ static LRESULT WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
UpdateDisplayMenu(); UpdateDisplayMenu();
SetDisplayFormat(0); SetDisplayFormat(0);
DragAcceptFiles(hWnd, TRUE);
break; break;
} }
@ -733,8 +735,8 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
} }
/* If the user provided a path to a clipboard data file, try to open it */ /* If the user provided a path to a clipboard data file, try to open it */
if (lpCmdLine != NULL && *lpCmdLine) if (__argc >= 2)
LoadClipboardDataFromFile(lpCmdLine); LoadClipboardDataFromFile(__wargv[1]);
while (GetMessageW(&msg, 0, 0, 0)) while (GetMessageW(&msg, 0, 0, 0))
{ {

View file

@ -25,6 +25,7 @@
#include <htmlhelp.h> #include <htmlhelp.h>
#include <commdlg.h> #include <commdlg.h>
#include <winnls.h> #include <winnls.h>
#include <stdlib.h>
#include "resources.h" #include "resources.h"
#include "cliputils.h" #include "cliputils.h"