-#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
+ stackSize,
+ wxThreadInternal::WinThreadStart, // entry point
+ thread,
+ CREATE_SUSPENDED,
+ (unsigned int *)&m_tid
+ );