wxUniv compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -180,7 +180,7 @@ void wxFileData::ReadData()
|
|||||||
|
|
||||||
#if defined(__DOS__) || defined(__WINDOWS__)
|
#if defined(__DOS__) || defined(__WINDOWS__)
|
||||||
// c:\.. is a drive don't stat it
|
// c:\.. is a drive don't stat it
|
||||||
if ((fileName == wxT("..")) && (filePath.length() <= 5))
|
if ((m_fileName == wxT("..")) && (m_filePath.length() <= 5))
|
||||||
{
|
{
|
||||||
m_type = is_drive;
|
m_type = is_drive;
|
||||||
m_size = 0;
|
m_size = 0;
|
||||||
@@ -225,7 +225,7 @@ void wxFileData::ReadData()
|
|||||||
buff.st_mode & wxS_IWOTH ? _T('w') : _T('-'),
|
buff.st_mode & wxS_IWOTH ? _T('w') : _T('-'),
|
||||||
buff.st_mode & wxS_IXOTH ? _T('x') : _T('-'));
|
buff.st_mode & wxS_IXOTH ? _T('x') : _T('-'));
|
||||||
#elif defined(__WIN32__)
|
#elif defined(__WIN32__)
|
||||||
DWORD attribs = GetFileAttributes(filePath);
|
DWORD attribs = GetFileAttributes(m_filePath);
|
||||||
if (attribs != (DWORD)-1)
|
if (attribs != (DWORD)-1)
|
||||||
{
|
{
|
||||||
m_permissions.Printf(_T("%c%c%c%c"),
|
m_permissions.Printf(_T("%c%c%c%c"),
|
||||||
|
@@ -2348,13 +2348,15 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
|
|||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
{
|
{
|
||||||
wxPaintDCEx *pdc = 0;
|
if ( wParam )
|
||||||
if (wParam) {
|
{
|
||||||
pdc = new wxPaintDCEx(this, (WXHDC) wParam);
|
// cast to wxWindow is needed for wxUniv
|
||||||
|
wxPaintDCEx dc((wxWindow *)this, (WXHDC)wParam);
|
||||||
|
processed = HandlePaint();
|
||||||
}
|
}
|
||||||
processed = HandlePaint();
|
else
|
||||||
if (pdc) {
|
{
|
||||||
delete pdc;
|
processed = HandlePaint();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3550,19 +3552,25 @@ bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
|
|||||||
|
|
||||||
#endif // USE_OWNER_DRAWN
|
#endif // USE_OWNER_DRAWN
|
||||||
|
|
||||||
#if wxUSE_CONTROLS
|
#if wxUSE_CONTROLS && !defined(__WXUNIVERSAL__)
|
||||||
|
|
||||||
|
wxControl *item = wxDynamicCast
|
||||||
|
(
|
||||||
|
FindItem(id),
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
wxWindow *item = FindItem(id);
|
wxControl
|
||||||
if ( item && item->IsKindOf(CLASSINFO(wxControl)) )
|
#else // !wxUSE_OWNER_DRAWN
|
||||||
return ((wxControl *)item)->MSWOnDraw(itemStruct);
|
// we may still have owner-drawn buttons internally
|
||||||
#elif !defined(__WXUNIVERSAL__)
|
// because we have to make them owner-drawn to support
|
||||||
// we may still have owner-drawn buttons internally because we have to make
|
// colour change
|
||||||
// them owner-drawn to support colour change
|
wxButton
|
||||||
wxWindow *item = FindItem(id);
|
|
||||||
if ( item && item->IsKindOf(CLASSINFO(wxButton)) )
|
|
||||||
return ((wxButton *)item)->MSWOnDraw(itemStruct);
|
|
||||||
#endif // USE_OWNER_DRAWN
|
#endif // USE_OWNER_DRAWN
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( item )
|
||||||
|
{
|
||||||
|
return item->MSWOnDraw(itemStruct);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_CONTROLS
|
#endif // wxUSE_CONTROLS
|
||||||
|
|
||||||
@@ -3571,7 +3579,7 @@ bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
|
|||||||
|
|
||||||
bool wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
|
bool wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
|
||||||
{
|
{
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
|
||||||
// is it a menu item?
|
// is it a menu item?
|
||||||
MEASUREITEMSTRUCT *pMeasureStruct = (MEASUREITEMSTRUCT *)itemStruct;
|
MEASUREITEMSTRUCT *pMeasureStruct = (MEASUREITEMSTRUCT *)itemStruct;
|
||||||
if ( id == 0 && pMeasureStruct->CtlType == ODT_MENU )
|
if ( id == 0 && pMeasureStruct->CtlType == ODT_MENU )
|
||||||
@@ -3584,12 +3592,13 @@ bool wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
|
|||||||
&pMeasureStruct->itemHeight);
|
&pMeasureStruct->itemHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow *item = FindItem(id);
|
wxControl *item = wxDynamicCast(FindItem(id), wxControl);
|
||||||
if ( item && item->IsKindOf(CLASSINFO(wxControl)) )
|
if ( item )
|
||||||
{
|
{
|
||||||
return ((wxControl *)item)->MSWOnMeasure(itemStruct);
|
return item->MSWOnMeasure(itemStruct);
|
||||||
}
|
}
|
||||||
#endif // owner-drawn menus
|
#endif // wxUSE_OWNER_DRAWN
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user