-#if defined(__VISUALC__) || \
- (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
- (defined(__GNUG__) && defined(__MSVCRT__))
- typedef unsigned (__stdcall *RtlThreadStart)(void *);
-
- m_hThread = (HANDLE)_beginthreadex(NULL, 0,
- (RtlThreadStart)
- wxThreadInternal::WinThreadStart,
- thread, CREATE_SUSPENDED,
- (unsigned int *)&m_tid);
+#ifdef wxUSE_BEGIN_THREAD
+ m_hThread = (HANDLE)_beginthreadex
+ (
+ NULL, // default security
+#ifdef __WATCOMC__
+ 10240, // stack size can't be NULL in Watcom
+#else
+ 0, // default stack size
+#endif
+ wxThreadInternal::WinThreadStart, // entry point
+ thread,
+ CREATE_SUSPENDED,
+ (unsigned int *)&m_tid
+ );