#include <string.h>
#include <ctype.h>
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__) || defined(__WXMICROWIN__)) && !defined(__CYGWIN10__))
#include <commctrl.h>
#endif
+#ifndef __WXMICROWIN__
#include "wx/msw/msvcrt.h"
+#endif
// ----------------------------------------------------------------------------
// conditional compilation
#define _WIN32_IE 0x0200
#endif
-#if _WIN32_IE >= 0x0300
+#if _WIN32_IE >= 0x0300 \
+ && !( defined(__MINGW32__) && !wxCHECK_W32API_VERSION( 1, 0 ) )
#include <shlwapi.h>
#endif
extern wxChar *wxBuffer;
extern wxList *wxWinHandleList;
extern wxList WXDLLEXPORT wxPendingDelete;
+#ifndef __WXMICROWIN__
extern void wxSetKeyboardHook(bool doIt);
+#endif
MSG s_currentMsg;
wxApp *wxTheApp = NULL;
wxBitmap::InitStandardHandlers();
-#if defined(__WIN95__)
+#if defined(__WIN95__) && !defined(__WXMICROWIN__)
InitCommonControls();
-
#endif // __WIN95__
-#if wxUSE_OLE || wxUSE_DRAG_AND_DROP || wxUSE_DATAOBJ
+#if wxUSE_OLE || wxUSE_DRAG_AND_DROP
#ifdef __WIN16__
// for OLE, enlarge message queue to be as large as possible
while (!SetMessageQueue(iMsg) && (iMsg -= 8))
;
#endif // Win16
+
// we need to initialize OLE library
if ( FAILED(::OleInitialize(NULL)) )
wxLogError(_("Cannot initialize OLE"));
RegisterWindowClasses();
+#ifndef __WXMICROWIN__
// Create the brush for disabling bitmap buttons
LOGBRUSH lb;
::DeleteObject( (HGDIOBJ)lb.lbHatch );
}
//else: wxWindows resources are probably not linked in
+#endif
#if wxUSE_PENWINDOWS
wxRegisterPenWin();
if (wxDummyChar) wxDummyChar++;
#endif
+#ifndef __WXMICROWIN__
wxSetKeyboardHook(TRUE);
+#endif
wxModule::RegisterModules();
if (!wxModule::InitializeModules())
//// WINDOWS-SPECIFIC CLEANUP
+#ifndef __WXMICROWIN__
wxSetKeyboardHook(FALSE);
+#endif
#if wxUSE_PENWINDOWS
wxCleanUpPenWin();
// do check for memory leaks on program exit
// (another useful flag is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free
// deallocated memory which may be used to simulate low-memory condition)
+#ifndef __WXMICROWIN__
wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+#endif
+
#ifdef __MWERKS__
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
// This seems to be necessary since there are 'rogue'
wxCHECK_MSG( wxApp::GetInitializerFunction(), 0,
wxT("No initializer - use IMPLEMENT_APP macro.") );
- wxTheApp = (*wxApp::GetInitializerFunction()) ();
+ wxTheApp = (wxApp*) (*wxApp::GetInitializerFunction()) ();
}
wxCHECK_MSG( wxTheApp, 0, wxT("You have to define an instance of wxApp!") );
wxLog::FlushActive();
#endif // wxUSE_LOG
+#if wxUSE_DC_CACHEING
+ // automated DC cache management: clear the cached DCs and bitmap
+ // if it's likely that the app has finished with them, that is, we
+ // get an idle event and we're not dragging anything.
+ if (!::GetKeyState(MK_LBUTTON) && !::GetKeyState(MK_MBUTTON) && !::GetKeyState(MK_RBUTTON))
+ wxDC::ClearCache();
+#endif // wxUSE_DC_CACHEING
+
// Send OnIdle events to all windows
if ( SendIdleEvents() )
{
/* static */
int wxApp::GetComCtl32Version()
{
+#ifdef __WXMICROWIN__
+ return 0;
+#else
// cache the result
static int s_verComCtl32 = -1;
}
return s_verComCtl32;
+#endif
}
void wxExit()