[CLIPBRD] Clipbrd program should accept the quoted file path (#638)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sat, 18 Aug 2018 16:36:47 +0000 (01:36 +0900)
committerMark Jansen <mark.jansen@reactos.org>
Sat, 18 Aug 2018 16:36:47 +0000 (18:36 +0200)
base/applications/clipbrd/clipbrd.c
base/applications/clipbrd/precomp.h

index 280cc6f..aa14d44 100644 (file)
@@ -409,6 +409,8 @@ static LRESULT WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
 
             UpdateDisplayMenu();
             SetDisplayFormat(0);
+
+            DragAcceptFiles(hWnd, TRUE);
             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 (lpCmdLine != NULL && *lpCmdLine)
-        LoadClipboardDataFromFile(lpCmdLine);
+    if (__argc >= 2)
+        LoadClipboardDataFromFile(__wargv[1]);
 
     while (GetMessageW(&msg, 0, 0, 0))
     {
index 7a04b96..e5dd178 100644 (file)
@@ -25,6 +25,7 @@
 #include <htmlhelp.h>
 #include <commdlg.h>
 #include <winnls.h>
+#include <stdlib.h>
 
 #include "resources.h"
 #include "cliputils.h"