Updates to Timer class and a couple of wxDC methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2000-11-28 22:13:33 +00:00
parent b9cf5e6d2b
commit 05a8bfed08
3 changed files with 22 additions and 6 deletions

View File

@@ -760,6 +760,12 @@ bool wxApp::ProcessMessage(
} }
#endif // wxUSE_TOOLTIPS #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 // For some composite controls (like a combobox), wndThis might be NULL
// because the subcontrol is not a wxWindow, but only the control itself // because the subcontrol is not a wxWindow, but only the control itself

View File

@@ -1104,14 +1104,24 @@ void wxDC::EndPage()
wxCoord wxDC::GetCharHeight() const wxCoord wxDC::GetCharHeight() const
{ {
// TODO FONTMETRICS vFM; // metrics structure
return(8);
::GpiQueryFontMetrics( m_hPS
,sizeof(FONTMETRICS)
,&vFM
);
return YDEV2LOGREL(vFM.lXHeight);
} }
wxCoord wxDC::GetCharWidth() const wxCoord wxDC::GetCharWidth() const
{ {
// TODO FONTMETRICS vFM; // metrics structure
return(8);
::GpiQueryFontMetrics( m_hPS
,sizeof(FONTMETRICS)
,&vFM
);
return XDEV2LOGREL(vFM.lAveCharWidth);
} }
void wxDC::DoGetTextExtent( void wxDC::DoGetTextExtent(

View File

@@ -44,7 +44,7 @@ ULONG wxTimerProc(HWND hwnd, ULONG, int nIdTimer, ULONG);
IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
wxTimer::wxTimer() wxTimer::Init()
{ {
m_ulId = 0; m_ulId = 0;
} }
@@ -52,7 +52,7 @@ wxTimer::wxTimer()
wxTimer::~wxTimer() wxTimer::~wxTimer()
{ {
Stop(); Stop();
wxTimer::Stop();
wxTimerList.DeleteObject(this); wxTimerList.DeleteObject(this);
} }