#else // !wxUSE_OWNER_DRAWN
// we may still have owner-drawn buttons internally because we have to make
// them owner-drawn to support colour change
- wxControl *item = wxDynamicCast(FindItem(id), wxButton);
+ wxControl *item =
+# if wxUSE_BUTTON
+ wxDynamicCast(FindItem(id), wxButton)
+# else
+ NULL
+# endif
+ ;
#endif // USE_OWNER_DRAWN
if ( item )
node = node->GetNext();
}
-
- // update the colours we use if they were not set explicitly by the user:
- // this must be done or OnCtlColor() would continue to use the old colours
- if ( !m_hasFgCol || !m_hasBgCol )
- {
- wxVisualAttributes attrs = GetDefaultAttributes();
- if ( !m_hasFgCol )
- m_foregroundColour = attrs.colFg;
-
- if ( !m_hasBgCol )
- m_backgroundColour = attrs.colBg;
- }
}
extern wxCOLORMAP *wxGetStdColourMap()
wxLogLastError(_T("GetMenuItemInfo"));
}
}
+#else
+ wxUnusedVar(chAccel);
+ wxUnusedVar(lParam);
#endif
return wxNOT_FOUND;
}
return GetEventHandler()->ProcessEvent(event);
#else
+ wxUnusedVar(msg);
+ wxUnusedVar(x);
+ wxUnusedVar(y);
+ wxUnusedVar(flags);
return false;
#endif
}
// global functions
// ===========================================================================
-void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font)
+void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont& the_font)
{
TEXTMETRIC tm;
HDC dc = ::GetDC((HWND) wnd);
HFONT fnt =0;
HFONT was = 0;
- if ( the_font )
- {
- // the_font->UseResource();
- // the_font->RealizeResource();
- fnt = (HFONT)((wxFont *)the_font)->GetResourceHandle(); // const_cast
- if ( fnt )
- was = (HFONT) SelectObject(dc,fnt);
- }
+
+ // the_font.UseResource();
+ // the_font.RealizeResource();
+ fnt = (HFONT)the_font.GetResourceHandle(); // const_cast
+ if ( fnt )
+ was = (HFONT) SelectObject(dc,fnt);
+
GetTextMetrics(dc, &tm);
- if ( the_font && fnt && was )
+ if ( fnt && was )
{
SelectObject(dc,was);
}
if ( y )
*y = tm.tmHeight + tm.tmExternalLeading;
- // if ( the_font )
- // the_font->ReleaseResource();
+ // the_font.ReleaseResource();
}
// Returns 0 if was a normal ASCII value, not a special key. This indicates that