// Platform Methods ///////////////////////////////////////////////////////////////////
+jstring org::xwt::plat::Win32::_getEnv(jstring key) {
+ int len = JvGetStringUTFLength(key);
+ char buf[len + 1];
+ JvGetStringUTFRegion(key, 0, len, buf);
+ buf[len] = '\0';
+ char buf2[1024];
+ DWORD ret = GetEnvironmentVariable(buf, buf2, 1024);
+ if (ret > 0 && ret < 1024) return JvNewStringLatin1(buf2);
+ return NULL;
+}
+
jstring org::xwt::plat::Win32::_fileDialog(jstring suggestedFileName, jboolean write) {
char buf[1024];
char buf[JvGetStringUTFLength(message) + 1];
buf[JvGetStringUTFLength(message)] = '\0';
JvGetStringUTFRegion(message, 0, JvGetStringUTFLength(message), buf);
- MessageBox (NULL, buf, "XWT Critical Abort", MB_OK | MB_ICONSTOP | MB_TASKMODAL | MB_SETFOREGROUND);
+ MessageBox (NULL, buf, "XWT Cannot Continue", MB_OK | MB_ICONSTOP | MB_TASKMODAL | MB_SETFOREGROUND);
java::lang::System::exit(-1);
}
hdc = (jint)GetDC((HWND)hwnd);
}
-void org::xwt::plat::Win32$Win32Surface::finalize() { /* DeleteObject((void*)hwnd); */ }
+void org::xwt::plat::Win32$Win32Surface::finalize() { DeleteObject((void*)hwnd); }
void org::xwt::plat::Win32$Win32Surface::toFront() { BringWindowToTop((HWND)hwnd); }
void org::xwt::plat::Win32$Win32Surface::toBack() { SetWindowPos((HWND)hwnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); }
void org::xwt::plat::Win32$Win32Surface::_dispose() { PostMessage((HWND)hwnd, WM_USER_DISPOSE, 0, 0); }