#include <stdlib.h>
#include <time.h>
-#ifdef __WXMSW__
+#if defined(__WXMSW__)
#include "wx/msw/private.h" // includes windows.h for OutputDebugString
-#else //Unix
+#endif
+
+#if !defined(__WXMSW__) || defined(__WXMICROWIN__)
#include <signal.h>
#endif //Win/Unix
// under Windows, programs usually don't have stderr at all, so show the
// messages also under debugger - unless it's a console program
-#if defined(__WXMSW__) && wxUSE_GUI
+#if defined(__WXMSW__) && wxUSE_GUI && !defined(__WXMICROWIN__)
str += wxT("\r\n") ;
OutputDebugString(str.c_str());
#endif // MSW
// get error code from syste
unsigned long wxSysErrorCode()
{
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__
return ::GetLastError();
#else //WIN16
if ( nErrCode == 0 )
nErrCode = wxSysErrorCode();
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__
static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
// break into the debugger
void wxTrap()
{
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
DebugBreak();
#elif defined(__WXMAC__)
#if __powerc
// send it to the normal log destination
wxLogDebug(szBuf);
-#if wxUSE_GUI || defined(__WXMSW__)
+#if (wxUSE_GUI && wxUSE_MSGDLG) || defined(__WXMSW__)
// this message is intentionally not translated - it is for
// developpers only
wxStrcat(szBuf, wxT("\nDo you want to stop the program?\nYou can also choose [Cancel] to suppress further warnings."));
// use the native message box if available: this is more robust than
// using our own
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
switch ( ::MessageBox(NULL, szBuf, _T("Debug"),
MB_YESNOCANCEL | MB_ICONSTOP ) ) {
case IDYES: