#include <ctype.h>
-#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
+#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
#include <direct.h>
#ifndef __MWERKS__
#include <dos.h>
#include <sys/stat.h>
#endif
-#if defined(__WIN32__) && !defined(__WXWINE__)
+#if defined(__WIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__)
#include <io.h>
#ifndef __GNUWIN32__
#ifdef __WIN32__
-static DWORD wxExecuteThread(wxExecuteData *data)
+static DWORD __stdcall wxExecuteThread(void *arg)
{
+ wxExecuteData *data = (wxExecuteData*)arg;
+
WaitForSingleObject(data->hProcess, INFINITE);
// get the exit code
DWORD tid;
HANDLE hThread = ::CreateThread(NULL,
0,
- (LPTHREAD_START_ROUTINE)wxExecuteThread,
+ wxExecuteThread,
(void *)data,
0,
&tid);
// ok, process ready to accept DDE requests
ok = wxExecuteDDE(ddeServer, ddeTopic, ddeCommand);
}
-
- if ( !ok )
- {
- // FIXME just as above we don't check Execute() return code
- wxLogNull nolog;
- (void)conn->Execute(ddeCommand);
- }
}
#endif // wxUSE_IPC
return wxExecute(command, sync, handler);
}
-#if wxUSE_GUI
-
-// ----------------------------------------------------------------------------
-// Metafile helpers
-// ----------------------------------------------------------------------------
-
-extern void PixelToHIMETRIC(LONG *x, LONG *y)
-{
- ScreenHDC hdcRef;
-
- int iWidthMM = GetDeviceCaps(hdcRef, HORZSIZE),
- iHeightMM = GetDeviceCaps(hdcRef, VERTSIZE),
- iWidthPels = GetDeviceCaps(hdcRef, HORZRES),
- iHeightPels = GetDeviceCaps(hdcRef, VERTRES);
-
- *x *= (iWidthMM * 100);
- *x /= iWidthPels;
- *y *= (iHeightMM * 100);
- *y /= iHeightPels;
-}
-
-extern void HIMETRICToPixel(LONG *x, LONG *y)
-{
- ScreenHDC hdcRef;
-
- int iWidthMM = GetDeviceCaps(hdcRef, HORZSIZE),
- iHeightMM = GetDeviceCaps(hdcRef, VERTSIZE),
- iWidthPels = GetDeviceCaps(hdcRef, HORZRES),
- iHeightPels = GetDeviceCaps(hdcRef, VERTRES);
-
- *x *= iWidthPels;
- *x /= (iWidthMM * 100);
- *y *= iHeightPels;
- *y /= (iHeightMM * 100);
-}
-
-#endif // wxUSE_GUI