git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8860
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
#endif // wxUSE_TOOLTIPS
+ //
+ // We must relay Timer events to wxTimer's processing function
+ //
+ if (pMsg->msg == WM_TIMER)
+ wxTimerProc(NULL, 0, pMsg->mp1, 0);
+
//
// For some composite controls (like a combobox), wndThis might be NULL
// because the subcontrol is not a wxWindow, but only the control itself
wxCoord wxDC::GetCharHeight() const
{
- // TODO
- return(8);
+ FONTMETRICS vFM; // metrics structure
+
+ ::GpiQueryFontMetrics( m_hPS
+ ,sizeof(FONTMETRICS)
+ ,&vFM
+ );
+ return YDEV2LOGREL(vFM.lXHeight);
}
wxCoord wxDC::GetCharWidth() const
{
- // TODO
- return(8);
+ FONTMETRICS vFM; // metrics structure
+
+ ::GpiQueryFontMetrics( m_hPS
+ ,sizeof(FONTMETRICS)
+ ,&vFM
+ );
+ return XDEV2LOGREL(vFM.lAveCharWidth);
}
void wxDC::DoGetTextExtent(
IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
-wxTimer::wxTimer()
+wxTimer::Init()
{
m_ulId = 0;
}
wxTimer::~wxTimer()
{
Stop();
-
+ wxTimer::Stop();
wxTimerList.DeleteObject(this);
}