summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SendScreenshotPlus/src')
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp13
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.h2
-rw-r--r--plugins/SendScreenshotPlus/src/global.h5
3 files changed, 20 insertions, 0 deletions
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index 70eb7a11df..ab74f569a1 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -27,6 +27,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "global.h"
//---------------------------------------------------------------------------
+//Workaround for MS bug ComboBox_SelectItemData
+int ComboBox_SelectItemData(HWND hwndCtl, int indexStart, LPARAM data) {
+ int i = 0;
+ for ( i ; i < ComboBox_GetCount(hwndCtl); i++) {
+ if(data == ComboBox_GetItemData(hwndCtl, i)) {
+ ComboBox_SetCurSel (hwndCtl,i);
+ return i;
+ }
+ }
+ return CB_ERR;
+}
+
+//---------------------------------------------------------------------------
// MonitorInfoEnum
size_t MonitorInfoEnum(MONITORINFOEX* & myMonitors, RECT & virtualScreen) {
MONITORS tmp = {0,0};
diff --git a/plugins/SendScreenshotPlus/src/Utils.h b/plugins/SendScreenshotPlus/src/Utils.h
index 5091bda811..f82c0142a2 100644
--- a/plugins/SendScreenshotPlus/src/Utils.h
+++ b/plugins/SendScreenshotPlus/src/Utils.h
@@ -42,6 +42,8 @@ extern HWND g_hCapture;
extern HBITMAP g_hBitmap, g_hbmMask;
//---------------------------------------------------------------------------
+int ComboBox_SelectItemData(HWND hwndCtl, int indexStart, LPARAM data);
+
size_t MonitorInfoEnum(MONITORINFOEX* & myMonitors, RECT & virtualScreen);
BOOL CALLBACK MonitorInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData);
diff --git a/plugins/SendScreenshotPlus/src/global.h b/plugins/SendScreenshotPlus/src/global.h
index 66ee29e4a2..4d773e4258 100644
--- a/plugins/SendScreenshotPlus/src/global.h
+++ b/plugins/SendScreenshotPlus/src/global.h
@@ -44,6 +44,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <string>
using namespace std;
+#ifdef ComboBox_SelectItemData
+ // use Workaround for MS bug ComboBox_SelectItemData;
+ #undef ComboBox_SelectItemData
+#endif
+
#include <win2k.h>
#include <msapi/vsstyle.h>
#include <msapi/vssym32.h>