X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FWin32.cc;h=f3f5fd7d6923777188ad90c017870c194b49ee56;hb=8192dcbd3ba21e385ef2b9fdcb5d9eb98b3a1f25;hp=af70e1d853101b04fcbdb0d904a3904fcbe09a87;hpb=27d9c4dfdd8cb966bd80c2e4ac5a072d7fb133d0;p=org.ibex.core.git diff --git a/src/org/xwt/plat/Win32.cc b/src/org/xwt/plat/Win32.cc index af70e1d..f3f5fd7 100644 --- a/src/org/xwt/plat/Win32.cc +++ b/src/org/xwt/plat/Win32.cc @@ -324,6 +324,23 @@ jint org::xwt::plat::Win32::_stringWidth(jstring font, jstring text) { return size.cx; } +jboolean org::xwt::plat::Win32::_newBrowserWindow_(jstring url) { + + int len = min(2048, JvGetStringUTFLength(url)); + char buf[len + 1]; + JvGetStringUTFRegion(url, 0, len, buf); + buf[len] = '\0'; + + SHELLEXECUTEINFO ei; + memset(&ei, 0, sizeof(ei)); + ei.cbSize = sizeof(ei); + ei.lpVerb = "open"; + ei.lpFile = buf; + ei.fMask = SEE_MASK_NOCLOSEPROCESS; + ei.nShow = SW_SHOWDEFAULT; + return (ShellExecuteEx(&ei) == 0); + +} // Win32DoubleBuffer /////////////////////////////////////////////////////////////////////////