// Intel, Visual Age.
#if defined(__WXWINCE__)
#define wxGetOSFHandle(fd) ((HANDLE)fd)
+ #define wxOpenOSFHandle(h, flags) ((int)wxPtrToUInt(h))
#elif defined(__CYGWIN__)
#define wxGetOSFHandle(fd) ((HANDLE)get_osfhandle(fd))
#elif defined(__VISUALC__) \
|| defined(__MINGW32__) \
|| (defined(__MWERKS__) && defined(__MSL__))
#define wxGetOSFHandle(fd) ((HANDLE)_get_osfhandle(fd))
+ #define wxOpenOSFHandle(h, flags) (_open_osfhandle(wxPtrToUInt(h), flags))
+ #define wx_fdopen _fdopen
#endif
// close the handle in the class dtor
RECT rect;
if ( !::GetWindowRect(hwnd, &rect) )
- {
wxLogLastError(_T("GetWindowRect"));
- }
return rect;
}
RECT rect;
if ( !::GetClientRect(hwnd, &rect) )
- {
wxLogLastError(_T("GetClientRect"));
- }
return rect;
}
: m_hdc(hdc)
{
if ( !::SelectClipRgn(hdc, hrgn) )
- {
wxLogLastError(_T("SelectClipRgn"));
- }
}
~HDCClipper()
{
m_modeOld = ::SetMapMode(hdc, mm);
if ( !m_modeOld )
- {
wxLogLastError(_T("SelectClipRgn"));
- }
}
~HDCMapModeChanger()
{
m_hGlobal = ::GlobalAlloc(flags, size);
if ( !m_hGlobal )
- {
wxLogLastError(_T("GlobalAlloc"));
- }
}
~GlobalPtr()
{
if ( m_hGlobal && ::GlobalFree(m_hGlobal) )
- {
wxLogLastError(_T("GlobalFree"));
- }
}
// implicit conversion
{
m_ptr = GlobalLock(hGlobal);
if ( !m_ptr )
- {
wxLogLastError(_T("GlobalLock"));
- }
}
~GlobalPtrLock()