Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2003-10-08 20:07:13 +0000
committerFelipe Heidrich2003-10-08 20:07:13 +0000
commite8427031ed92d318c7506b365df431889c906fcd (patch)
tree8ede6a385ceb9785969763b25c03305c79b0e765
parentc598a1d6036baaa809649eb1f79f7ee491165d8d (diff)
downloadeclipse.platform.swt-e8427031ed92d318c7506b365df431889c906fcd.tar.gz
eclipse.platform.swt-e8427031ed92d318c7506b365df431889c906fcd.tar.xz
eclipse.platform.swt-e8427031ed92d318c7506b365df431889c906fcd.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c28
2 files changed, 28 insertions, 15 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
index 749aafc1e0..fbd98d7e5f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
@@ -1826,21 +1826,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetClipboardFormatNameW)
}
#endif
-#ifndef NO_GetComboBoxInfo
-JNIEXPORT jboolean JNICALL OS_NATIVE(GetComboBoxInfo)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1)
-{
- COMBOBOXINFO _arg1, *lparg1=NULL;
- jboolean rc;
- NATIVE_ENTER(env, that, "GetComboBoxInfo\n")
- if (arg1) lparg1 = getCOMBOBOXINFOFields(env, arg1, &_arg1);
- rc = (jboolean)GetComboBoxInfo((HWND)arg0, lparg1);
- if (arg1) setCOMBOBOXINFOFields(env, arg1, lparg1);
- NATIVE_EXIT(env, that, "GetComboBoxInfo\n")
- return rc;
-}
-#endif
-
#ifndef NO_GetCurrentObject
JNIEXPORT jint JNICALL OS_NATIVE(GetCurrentObject)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c
index 8e38a8e84d..306b1caf3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c
@@ -138,6 +138,34 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EnumSystemLanguageGroupsW)
}
#endif
+
+#ifndef NO_GetComboBoxInfo
+JNIEXPORT jboolean JNICALL OS_NATIVE(GetComboBoxInfo)
+ (JNIEnv *env, jclass that, jint arg0, jobject arg1)
+{
+ COMBOBOXINFO _arg1, *lparg1=NULL;
+ jboolean rc;
+ NATIVE_ENTER(env, that, "GetComboBoxInfo\n")
+ if (arg1) lparg1 = getCOMBOBOXINFOFields(env, arg1, &_arg1);
+ {
+ /*
+ * GetComboBoxInfo is a Win2000 and Win98 specific call
+ * If you link it into swt.dll a system modal entry point not found dialog will
+ * appear as soon as swt.dll is loaded. Here we check for the entry point and
+ * only do the call if it exists.
+ */
+ HMODULE hm;
+ FARPROC fp;
+ if ((hm=GetModuleHandle("user32.dll")) && (fp=GetProcAddress(hm, "GetComboBoxInfo"))) {
+ rc = (jboolean)(fp)((HWND)arg0, lparg1);
+ }
+ }
+ if (arg1) setCOMBOBOXINFOFields(env, arg1, lparg1);
+ NATIVE_EXIT(env, that, "GetComboBoxInfo\n")
+ return rc;
+}
+#endif
+
#ifndef NO_GetLayout
JNIEXPORT jint JNICALL OS_NATIVE(GetLayout)
(JNIEnv *env, jclass that, jint arg0)

Back to the top