Browse Source

added special paste options to multi paste images

Scott Brogden 2 years ago
parent
commit
7ef2d3a874
15 changed files with 309 additions and 57 deletions
  1. 6 0
      ActionEnums.cpp
  2. 2 1
      ActionEnums.h
  3. 85 17
      BitmapHelper.cpp
  4. 1 0
      BitmapHelper.h
  5. 3 0
      CP_Main.rc
  6. 2 0
      CP_Main.vcxproj
  7. 2 0
      CP_Main.vcxproj.filters
  8. 52 0
      ImageFormatAggregator.cpp
  9. 19 0
      ImageFormatAggregator.h
  10. 47 31
      OleClipSource.cpp
  11. 76 7
      QPasteWnd.cpp
  12. 6 0
      QPasteWnd.h
  13. 4 1
      Resource.h
  14. 2 0
      SpecialPasteOptions.cpp
  15. 2 0
      SpecialPasteOptions.h

+ 6 - 0
ActionEnums.cpp

@@ -386,6 +386,12 @@ CString ActionEnums::EnumDescription(ActionEnumValues value)
 	case PASTE_CAMEL_CASE:
 		val = "Paste CamelCase";
 		break;
+	case PASTE_MULTI_IMAGE_HORIZONTAL:
+		val = "Paste Muliple Images Horizontally";
+		break;
+	case PASTE_MULTI_IMAGE_VERTICAL:
+		val = "Paste Muliple Images Vertically";
+		break;
 	}
 
 	CString translatedValue = theApp.m_Language.GetQuickPasteKeyboardString(value, val);

+ 2 - 1
ActionEnums.h

@@ -130,7 +130,8 @@ public:
 		SYSTEM_MENU,
 		SET_DRAG_FILE_NAME,
 		PASTE_CAMEL_CASE,
-
+		PASTE_MULTI_IMAGE_HORIZONTAL,
+		PASTE_MULTI_IMAGE_VERTICAL,
 		LAST_ACTION
 	};
 

+ 85 - 17
BitmapHelper.cpp

@@ -85,31 +85,99 @@ BOOL CBitmapHelper::GetCBitmap(void	*pClip2, CDC *pDC, CBitmap *pBitMap, int nMa
 
 					delete gdipBitmap;
 				}
-				/*else
-				{
-					pBitMap->CreateCompatibleBitmap(pDC, nWidth, nHeight);
-					ASSERT(pBitMap->m_hObject != NULL);
 
-					CDC MemDc;
-					MemDc.CreateCompatibleDC(pDC);
+				bRet = TRUE;
+			}
+	}
+	
+
+	return bRet;
+}
 
-					CBitmap* oldBitmap = MemDc.SelectObject(pBitMap);
+BOOL CBitmapHelper::GetCBitmap(CClipFormats &clips, CDC* pDC, CBitmap* pBitMap, BOOL horizontal)
+{
+	BOOL bRet = FALSE;
 
+	int count = clips.GetCount();
+	int width = 0;
+	int height = 0;
 
-					::StretchDIBits(MemDc.m_hDC,
-						0, 0,
-						lpBI->bmiHeader.biWidth, lpBI->bmiHeader.biHeight,
-						0, 0, lpBI->bmiHeader.biWidth,
-						lpBI->bmiHeader.biHeight,
-						pDIBBits, lpBI, DIB_PAL_COLORS, SRCCOPY);
+	for (int i = 0; i < count; i++)
+	{
+		CClipFormat clip = clips[i];
 
-					MemDc.SelectObject(oldBitmap);
-				}*/
+		Gdiplus::Bitmap* gdipBitmap = clip.CreateGdiplusBitmap();
 
-				bRet = TRUE;
+		if (horizontal)
+		{
+			width += (int)gdipBitmap->GetWidth();
+			height = max((int)gdipBitmap->GetHeight(), height);
+		}
+		else
+		{
+			width = max((int)gdipBitmap->GetWidth(), width);
+			height += (int)gdipBitmap->GetHeight();
+		}
+	
+
+		delete gdipBitmap;
+	}
+
+	pBitMap->CreateCompatibleBitmap(pDC, width, height);
+	ASSERT(pBitMap->m_hObject != NULL);
+
+	CDC MemDc2;
+	MemDc2.CreateCompatibleDC(pDC);
+
+	CBitmap* oldBitmap2 = MemDc2.SelectObject(pBitMap);
+
+	Gdiplus::Graphics graphics(MemDc2);
+	graphics.SetInterpolationMode(Gdiplus::InterpolationModeHighQualityBicubic);
+	graphics.SetPixelOffsetMode(Gdiplus::PixelOffsetModeHalf);
+
+	graphics.Clear(Gdiplus::Color::White);
+
+	int destX = 0;
+	int destY = 0;
+
+	for (int i = 0; i < count; i++)
+	{
+		CClipFormat clip = clips[i];
+
+		if (clip.m_cfType == CF_DIB ||
+			clip.m_cfType == theApp.m_PNG_Format)
+		{
+			if (pBitMap)
+			{
+				Gdiplus::Bitmap* gdipBitmap = clip.CreateGdiplusBitmap();
+
+				if (gdipBitmap != NULL &&
+					gdipBitmap->GetHeight() > 0 &&
+					gdipBitmap->GetWidth() > 0)
+				{
+					Gdiplus::ImageAttributes attrs;
+					Gdiplus::Rect dest(destX, destY, gdipBitmap->GetWidth(), gdipBitmap->GetHeight());
+
+					graphics.DrawImage(gdipBitmap, dest, 0, 0, gdipBitmap->GetWidth(), gdipBitmap->GetHeight(), Gdiplus::UnitPixel, &attrs);
+
+					if (horizontal)
+					{
+						destX += gdipBitmap->GetWidth();
+					}
+					else
+					{
+						destY += gdipBitmap->GetHeight();
+					}
+
+					delete gdipBitmap;
+
+					bRet = TRUE;
+				}
 			}
+		}
 	}
-	
+
+	MemDc2.SelectObject(oldBitmap2);
 
 	return bRet;
 }

+ 1 - 0
BitmapHelper.h

@@ -20,6 +20,7 @@ public:
 	static int		GetCBitmapWidth(const CBitmap & cbm);
 	static int		GetCBitmapHeight(const CBitmap & cbm);
 	static BOOL		GetCBitmap(void	*pClip2, CDC *pDC, CBitmap *pBitMap, int nMaxHeight);
+	static BOOL		GetCBitmap(CClipFormats&clips, CDC* pDC, CBitmap* pBitMap, BOOL horizontal);
 	static HANDLE	hBitmapToDIB(HBITMAP hBitmap, DWORD dwCompression, HPALETTE hPal);
 	static WORD		PaletteSize(LPSTR lpDIB);
 	static WORD		DIBNumColors(LPSTR lpDIB);

+ 3 - 0
CP_Main.rc

@@ -270,6 +270,9 @@ BEGIN
             MENUITEM "Paste + Two Line Feeds",      ID_SPECIALPASTE_PASTE32919
             MENUITEM "Paste + Current Time",        ID_SPECIALPASTE_PASTE32927
             MENUITEM SEPARATOR
+            MENUITEM "Multiple Images Horizontally", ID_SPECIALPASTE_MULTIPLEIMAGESHORIZONTALLY
+            MENUITEM "Multiple Images Vertically",  ID_SPECIALPASTE_MULTIPLEIMAGESVERTICALLY
+            MENUITEM SEPARATOR
             MENUITEM "Paste, Don't Change Clip Order", ID_SPECIALPASTE_PASTE32945
             MENUITEM SEPARATOR
             MENUITEM "Typoglycemia",                ID_SPECIALPASTE_TYPOGLYCEMIA

+ 2 - 0
CP_Main.vcxproj

@@ -642,6 +642,7 @@
     <ClCompile Include="CF_UnicodeTextAggregator.cpp" />
     <ClCompile Include="ChaiScriptOnCopy.cpp" />
     <ClCompile Include="ChaiScriptXml.cpp" />
+    <ClCompile Include="ImageFormatAggregator.cpp" />
     <ClCompile Include="Clip.cpp">
       <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
       <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Disabled</Optimization>
@@ -2900,6 +2901,7 @@
     <ClInclude Include="CGdiPlusBitmap.h" />
     <ClInclude Include="ChaiScriptOnCopy.h" />
     <ClInclude Include="ChaiScriptXml.h" />
+    <ClInclude Include="ImageFormatAggregator.h" />
     <ClInclude Include="ClipCompare.h" />
     <ClInclude Include="ClipFormatQListCtrl.h" />
     <ClInclude Include="ICU_String.h" />

+ 2 - 0
CP_Main.vcxproj.filters

@@ -470,6 +470,7 @@
     <ClCompile Include="ICU_String.cpp">
       <Filter>source</Filter>
     </ClCompile>
+    <ClCompile Include="ImageFormatAggregator.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="sqlite\CppSQLite3.h">
@@ -977,6 +978,7 @@
     <ClInclude Include="ICU_String.h">
       <Filter>header</Filter>
     </ClInclude>
+    <ClInclude Include="ImageFormatAggregator.h" />
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="CP_Main.rc">

+ 52 - 0
ImageFormatAggregator.cpp

@@ -0,0 +1,52 @@
+#include "stdafx.h"
+#include ".\ImageFormatAggregator.h"
+#include "Misc.h"
+#include "shared/Tokenizer.h"
+#include "BitmapHelper.h"
+
+CImageFormatAggregator::CImageFormatAggregator(BOOL horizontally)
+{
+	m_horizontally = horizontally;
+}
+
+CImageFormatAggregator::~CImageFormatAggregator(void)
+{
+}
+
+bool CImageFormatAggregator::AddClip(LPVOID lpData, int nDataSize, int nPos, int nCount, UINT cfType)
+{
+	HGLOBAL hGlobal = ::NewGlobalP(lpData, nDataSize);
+	
+	CClipFormat data(cfType, hGlobal);
+	//m_images owns the data now
+	data.AutoDeleteData(false);
+
+	m_images.Add(data);
+
+	return true;
+}
+
+HGLOBAL CImageFormatAggregator::GetHGlobal()
+{
+	CBitmap bitmap;
+	if (CBitmapHelper::GetCBitmap(m_images, CDC::FromHandle(GetDC(GetActiveWindow())), &bitmap, m_horizontally) == FALSE)
+	{
+		bitmap.DeleteObject();
+		return NULL;
+	}
+
+	int count = m_images.GetCount();
+	for (int i = 0; i < count; i++)
+	{
+		CClipFormat clip = m_images[i];
+		clip.AutoDeleteData(true);
+		clip.Free();
+	}
+
+	HPALETTE hPal = NULL;
+	auto returnHGlobal = CBitmapHelper::hBitmapToDIB((HBITMAP)bitmap, BI_RGB, hPal);
+
+	bitmap.DeleteObject();
+
+	return returnHGlobal;
+}

+ 19 - 0
ImageFormatAggregator.h

@@ -0,0 +1,19 @@
+#pragma once
+#include "stdafx.h"
+#include "IClipAggregator.h"
+#include "Clip.h"
+
+class CImageFormatAggregator : public IClipAggregator
+{
+public:
+	CImageFormatAggregator(BOOL horizontally);
+	~CImageFormatAggregator(void);
+
+	virtual bool AddClip(LPVOID lpData, int nDataSize, int nPos, int nCount, UINT cfType);
+	virtual HGLOBAL GetHGlobal();
+
+protected:
+	CClipFormats m_images;
+	BOOL m_horizontally;
+};
+

+ 47 - 31
OleClipSource.cpp

@@ -15,6 +15,7 @@
 #include "DittoChaiScript.h"
 #include "ChaiScriptOnCopy.h"
 #include "Slugify.h"
+#include "ImageFormatAggregator.h"
 
 /*------------------------------------------------------------------*\
 COleClipSource
@@ -89,54 +90,69 @@ BOOL COleClipSource::DoImmediateRender()
 
 	if(count > 1)
 	{
-		CStringA SepA = CTextConvert::UnicodeToAnsi(g_Opt.GetMultiPasteSeparator());
-		CCF_TextAggregator CFText(SepA);
-		if(m_ClipIDs.AggregateData(CFText, CF_TEXT, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
+		if (m_pasteOptions.m_pasteImagesHorizontal ||
+			m_pasteOptions.m_pasteImagesVertically)
 		{
-			CClipFormat cf(CF_TEXT, CFText.GetHGlobal());
-			clip.m_Formats.Add(cf);
-			//clip.m_Formats now owns the global data
-			cf.m_autoDeleteData = false;
-		}
-
-		CStringW SepW = g_Opt.GetMultiPasteSeparator();
-		CCF_UnicodeTextAggregator CFUnicodeText(SepW);
-		if(m_ClipIDs.AggregateData(CFUnicodeText, CF_UNICODETEXT, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
-		{
-			CClipFormat cf(CF_UNICODETEXT, CFUnicodeText.GetHGlobal());
-			clip.m_Formats.Add(cf);
-			//clip.m_Formats now owns the global data
-			cf.m_autoDeleteData = false;
-		}
-
-		if (m_pasteOptions.LimitFormatsToText() == false)
-		{
-			CCF_HDropAggregator HDrop;
-			if(m_ClipIDs.AggregateData(HDrop, CF_HDROP, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
+			CImageFormatAggregator bigImage(m_pasteOptions.m_pasteImagesHorizontal);
+			if (m_ClipIDs.AggregateData(bigImage, CF_DIB, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
 			{
-				CClipFormat cf(CF_HDROP, HDrop.GetHGlobal());
+				CClipFormat cf(CF_DIB, bigImage.GetHGlobal());
 				clip.m_Formats.Add(cf);
 				//clip.m_Formats now owns the global data
 				cf.m_autoDeleteData = false;
 			}
-
-			CRichTextAggregator RichText(SepA);
-			if(m_ClipIDs.AggregateData(RichText, theApp.m_RTFFormat, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
+		}
+		else
+		{
+			CStringA SepA = CTextConvert::UnicodeToAnsi(g_Opt.GetMultiPasteSeparator());
+			CCF_TextAggregator CFText(SepA);
+			if (m_ClipIDs.AggregateData(CFText, CF_TEXT, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
 			{
-				CClipFormat cf(theApp.m_RTFFormat, RichText.GetHGlobal());
+				CClipFormat cf(CF_TEXT, CFText.GetHGlobal());
 				clip.m_Formats.Add(cf);
 				//clip.m_Formats now owns the global data
 				cf.m_autoDeleteData = false;
 			}
 
-			CHTMLFormatAggregator Html(SepA);
-			if(m_ClipIDs.AggregateData(Html, theApp.m_HTML_Format, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
+			CStringW SepW = g_Opt.GetMultiPasteSeparator();
+			CCF_UnicodeTextAggregator CFUnicodeText(SepW);
+			if (m_ClipIDs.AggregateData(CFUnicodeText, CF_UNICODETEXT, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
 			{
-				CClipFormat cf(theApp.m_HTML_Format, Html.GetHGlobal());
+				CClipFormat cf(CF_UNICODETEXT, CFUnicodeText.GetHGlobal());
 				clip.m_Formats.Add(cf);
 				//clip.m_Formats now owns the global data
 				cf.m_autoDeleteData = false;
 			}
+
+			if (m_pasteOptions.LimitFormatsToText() == false)
+			{
+				CCF_HDropAggregator HDrop;
+				if (m_ClipIDs.AggregateData(HDrop, CF_HDROP, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
+				{
+					CClipFormat cf(CF_HDROP, HDrop.GetHGlobal());
+					clip.m_Formats.Add(cf);
+					//clip.m_Formats now owns the global data
+					cf.m_autoDeleteData = false;
+				}
+
+				CRichTextAggregator RichText(SepA);
+				if (m_ClipIDs.AggregateData(RichText, theApp.m_RTFFormat, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
+				{
+					CClipFormat cf(theApp.m_RTFFormat, RichText.GetHGlobal());
+					clip.m_Formats.Add(cf);
+					//clip.m_Formats now owns the global data
+					cf.m_autoDeleteData = false;
+				}
+
+				CHTMLFormatAggregator Html(SepA);
+				if (m_ClipIDs.AggregateData(Html, theApp.m_HTML_Format, g_Opt.m_bMultiPasteReverse, m_pasteOptions.LimitFormatsToText()))
+				{
+					CClipFormat cf(theApp.m_HTML_Format, Html.GetHGlobal());
+					clip.m_Formats.Add(cf);
+					//clip.m_Formats now owns the global data
+					cf.m_autoDeleteData = false;
+				}
+			}
 		}
 	}
 

+ 76 - 7
QPasteWnd.cpp

@@ -353,13 +353,20 @@ BEGIN_MESSAGE_MAP(CQPasteWnd, CWndEx)
 
 	ON_COMMAND(ID_MENU_RESTOREDATABSAE, &CQPasteWnd::OnFirstRestoreDb)
 	ON_COMMAND(ID_MENU_BACKUPDATABASE, &CQPasteWnd::OnFirstBackupDb)
-		ON_COMMAND(ID_MENU_DELETEALLNONUSEDCLIPS, &CQPasteWnd::OnMenuDeleteallnonusedclips)
-		ON_UPDATE_COMMAND_UI(ID_MENU_DELETEALLNONUSEDCLIPS, &CQPasteWnd::OnUpdateMenuDeleteallnonusedclips)
-		ON_COMMAND(ID_IMPORT_SETDRAGFILENAME, &CQPasteWnd::OnImportSetdragfilename)
-		ON_UPDATE_COMMAND_UI(ID_IMPORT_SETDRAGFILENAME, &CQPasteWnd::OnUpdateImportSetdragfilename)
-		ON_COMMAND(ID_SPECIALPASTE_CAMELCASE, &CQPasteWnd::OnSpecialpasteCamelcase)
-		ON_UPDATE_COMMAND_UI(ID_SPECIALPASTE_CAMELCASE, &CQPasteWnd::OnUpdateSpecialpasteCamelcase)
-		END_MESSAGE_MAP()
+	ON_COMMAND(ID_MENU_DELETEALLNONUSEDCLIPS, &CQPasteWnd::OnMenuDeleteallnonusedclips)
+	ON_UPDATE_COMMAND_UI(ID_MENU_DELETEALLNONUSEDCLIPS, &CQPasteWnd::OnUpdateMenuDeleteallnonusedclips)
+	ON_COMMAND(ID_IMPORT_SETDRAGFILENAME, &CQPasteWnd::OnImportSetdragfilename)
+	ON_UPDATE_COMMAND_UI(ID_IMPORT_SETDRAGFILENAME, &CQPasteWnd::OnUpdateImportSetdragfilename)
+	ON_COMMAND(ID_SPECIALPASTE_CAMELCASE, &CQPasteWnd::OnSpecialpasteCamelcase)
+	ON_UPDATE_COMMAND_UI(ID_SPECIALPASTE_CAMELCASE, &CQPasteWnd::OnUpdateSpecialpasteCamelcase)
+
+		ON_COMMAND(ID_SPECIALPASTE_MULTIPLEIMAGESHORIZONTALLY, &CQPasteWnd::OnSpecialpasteMultipleImagesHorz)
+		ON_UPDATE_COMMAND_UI(ID_SPECIALPASTE_MULTIPLEIMAGESHORIZONTALLY, &CQPasteWnd::OnUpdateSpecialpasteMultipleImagesHorz)
+
+		ON_COMMAND(ID_SPECIALPASTE_MULTIPLEIMAGESVERTICALLY, &CQPasteWnd::OnSpecialpasteMultipleImagesVert)
+		ON_UPDATE_COMMAND_UI(ID_SPECIALPASTE_MULTIPLEIMAGESVERTICALLY, &CQPasteWnd::OnUpdateSpecialpasteMultipleImagesVert)
+
+END_MESSAGE_MAP()
 
 
 /////////////////////////////////////////////////////////////////////////////
@@ -3349,6 +3356,12 @@ bool CQPasteWnd::DoAction(CAccel a)
 	case ActionEnums::PASTE_CAMEL_CASE:
 		ret = DoPasteCamelCase();
 		break;
+	case ActionEnums::PASTE_MULTI_IMAGE_HORIZONTAL:
+		ret = DoPasteImagesHorz();
+		break;
+	case ActionEnums::PASTE_MULTI_IMAGE_VERTICAL:
+		ret = DoPasteImagesVert();
+		break;
 	}
 
 	return ret;
@@ -4602,6 +4615,32 @@ bool CQPasteWnd::DoPasteCamelCase()
 	return false;
 }
 
+bool CQPasteWnd::DoPasteImagesHorz()
+{
+	if (::GetFocus() == m_lstHeader.GetSafeHwnd())
+	{
+		CSpecialPasteOptions pasteOptions;
+		pasteOptions.m_pasteImagesHorizontal = true;
+		OpenSelection(pasteOptions);
+		return true;
+	}
+
+	return false;
+}
+
+bool CQPasteWnd::DoPasteImagesVert()
+{
+	if (::GetFocus() == m_lstHeader.GetSafeHwnd())
+	{
+		CSpecialPasteOptions pasteOptions;
+		pasteOptions.m_pasteImagesVertically = true;
+		OpenSelection(pasteOptions);
+		return true;
+	}
+
+	return false;
+}
+
 bool CQPasteWnd::DoPasteLowerCase()
 {
 	if (::GetFocus() == m_lstHeader.GetSafeHwnd())
@@ -7965,3 +8004,33 @@ void CQPasteWnd::OnUpdateSpecialpasteCamelcase(CCmdUI* pCmdUI)
 
 	UpdateMenuShortCut(pCmdUI, ActionEnums::PASTE_CAMEL_CASE);
 }
+
+void CQPasteWnd::OnSpecialpasteMultipleImagesHorz()
+{
+	DoAction(ActionEnums::PASTE_MULTI_IMAGE_HORIZONTAL);
+}
+
+void CQPasteWnd::OnUpdateSpecialpasteMultipleImagesHorz(CCmdUI* pCmdUI)
+{
+	if (!pCmdUI->m_pMenu)
+	{
+		return;
+	}
+
+	UpdateMenuShortCut(pCmdUI, ActionEnums::PASTE_MULTI_IMAGE_HORIZONTAL);
+}
+
+void CQPasteWnd::OnSpecialpasteMultipleImagesVert()
+{
+	DoAction(ActionEnums::PASTE_MULTI_IMAGE_VERTICAL);
+}
+
+void CQPasteWnd::OnUpdateSpecialpasteMultipleImagesVert(CCmdUI* pCmdUI)
+{
+	if (!pCmdUI->m_pMenu)
+	{
+		return;
+	}
+
+	UpdateMenuShortCut(pCmdUI, ActionEnums::PASTE_MULTI_IMAGE_VERTICAL);
+}

+ 6 - 0
QPasteWnd.h

@@ -277,6 +277,8 @@ public:
 	bool DoFilterOnSelectedClip();
 	bool DoPasteUpperCase();
 	bool DoPasteCamelCase();
+	bool DoPasteImagesVert();
+	bool DoPasteImagesHorz();
 	bool DoPasteLowerCase();
 	bool DoPasteCapitalize();
 	bool DoPasteSentenceCase();
@@ -592,4 +594,8 @@ public:
 	afx_msg void OnUpdateImportSetdragfilename(CCmdUI* pCmdUI);
 	afx_msg void OnSpecialpasteCamelcase();
 	afx_msg void OnUpdateSpecialpasteCamelcase(CCmdUI* pCmdUI);
+	afx_msg void OnSpecialpasteMultipleImagesHorz();
+	afx_msg void OnUpdateSpecialpasteMultipleImagesHorz(CCmdUI* pCmdUI);
+	afx_msg void OnSpecialpasteMultipleImagesVert();
+	afx_msg void OnUpdateSpecialpasteMultipleImagesVert(CCmdUI* pCmdUI);
 };

+ 4 - 1
Resource.h

@@ -807,6 +807,9 @@
 #define ID_FIRST_VIEWRTF                32973
 #define ID_FIRST_VIEWHTML               32974
 #define ID_FIRST_VIEWASIMAGE            32975
+#define ID_SPECIALPASTE_MULTIPLEIMAGESHORIZONTALLY 32976
+#define ID_SPECIALPASTE_MULTIPLEIMAGES  32977
+#define ID_SPECIALPASTE_MULTIPLEIMAGESVERTICALLY 32978
 
 // Next default values for new objects
 // 
@@ -814,7 +817,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
 #define _APS_NEXT_RESOURCE_VALUE        389
-#define _APS_NEXT_COMMAND_VALUE         32976
+#define _APS_NEXT_COMMAND_VALUE         32979
 #define _APS_NEXT_CONTROL_VALUE         2173
 #define _APS_NEXT_SYMED_VALUE           104
 #endif

+ 2 - 0
SpecialPasteOptions.cpp

@@ -24,6 +24,8 @@ CSpecialPasteOptions::CSpecialPasteOptions()
 	m_invertCase = false;
 	m_placeCF_HDROP_OnDrag = true;
 	m_pasteCamelCase = false;
+	m_pasteImagesHorizontal = false;
+	m_pasteImagesVertically = false;
 }
 
 CSpecialPasteOptions::~CSpecialPasteOptions()

+ 2 - 0
SpecialPasteOptions.h

@@ -10,6 +10,8 @@ public:
 	bool m_pasteAsPlainText;
 	bool m_pasteUpperCase;
 	bool m_pasteCamelCase;
+	bool m_pasteImagesHorizontal;
+	bool m_pasteImagesVertically;
 	bool m_pasteLowerCase;
 	bool m_pasteCapitalize;
 	bool m_pasteSentenceCase;