// In some mingws there is a missing extern "C" int the winsock header,
// so we put it here just to be safe. Note that this must appear _before_
-// #include "wx/msw/private.h" which itself includes <windows.h>, as this
+// #include "wx/msw/private.h" which itself includes <windows.h>, as this
// one in turn includes <winsock.h> unless we define WIN32_LEAN_AND_MEAN.
//
#if defined(__WIN32__) && !defined(__TWIN32__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
return strDir.c_str();
}
-wxChar *wxGetUserHome(const wxString& user)
+wxChar *wxGetUserHome(const wxString& WXUNUSED(user))
{
// VZ: the old code here never worked for user != "" anyhow! Moreover, it
// returned sometimes a malloc()'d pointer, sometimes a pointer to a
{
#if defined(__WIN32__)
DWORD attribs = GetFileAttributes(dir);
- return ((attribs != -1) && (attribs & FILE_ATTRIBUTE_DIRECTORY));
+ return ((attribs != (DWORD)-1) && (attribs & FILE_ATTRIBUTE_DIRECTORY));
#else // Win16
#ifdef __BORLANDC__
struct ffblk fileInfo;
bool wxGetEnv(const wxString& var, wxString *value)
{
+#ifdef __WIN16__
+ const wxChar* ret = wxGetenv(var);
+ if (ret)
+ {
+ *value = ret;
+ return TRUE;
+ }
+ else
+ return FALSE;
+#else
// first get the size of the buffer
DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
if ( !dwRet )
}
return TRUE;
+#endif
}
bool wxSetEnv(const wxString& var, const wxChar *value)
// process management
// ----------------------------------------------------------------------------
-int wxKill(long pid, int sig)
+int wxKill(long WXUNUSED(pid), int WXUNUSED(sig))
{
// TODO use SendMessage(WM_QUIT) and TerminateProcess() if needed
*majorVsn = info.dwMajorVersion;
if (minorVsn)
*minorVsn = info.dwMinorVersion;
-
+
switch ( info.dwPlatformId )
{
case VER_PLATFORM_WIN32s:
if ( height ) *height = GetDeviceCaps(dc, VERTSIZE);
}
+void wxClientDisplayRect(int *x, int *y, int *width, int *height)
+{
+#ifdef __WIN16__
+ *x = 0; *y = 0;
+ wxDisplaySize(width, height);
+#else
+ // Determine the desktop dimensions minus the taskbar and any other
+ // special decorations...
+ RECT r;
+
+ SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
+ if (x) *x = r.left;
+ if (y) *y = r.top;
+ if (width) *width = r.right - r.left;
+ if (height) *height = r.bottom - r.top;
+#endif
+}
+
// ---------------------------------------------------------------------------
// window information functions
WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
{
#ifndef __WIN32__
- return GetWindowWord((HWND)hWnd, GWW_ID);
+ return (WXWORD)GetWindowWord((HWND)hWnd, GWW_ID);
#else // Win32
- return GetWindowLong((HWND)hWnd, GWL_ID);
+ return (WXWORD)GetWindowLong((HWND)hWnd, GWL_ID);
#endif // Win16/32
}