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:
@@ -760,6 +760,12 @@ bool wxApp::ProcessMessage(
|
||||
}
|
||||
#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
|
||||
|
@@ -1104,14 +1104,24 @@ void wxDC::EndPage()
|
||||
|
||||
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(
|
||||
|
@@ -44,7 +44,7 @@ ULONG wxTimerProc(HWND hwnd, ULONG, int nIdTimer, ULONG);
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
|
||||
|
||||
wxTimer::wxTimer()
|
||||
wxTimer::Init()
|
||||
{
|
||||
m_ulId = 0;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ wxTimer::wxTimer()
|
||||
wxTimer::~wxTimer()
|
||||
{
|
||||
Stop();
|
||||
|
||||
wxTimer::Stop();
|
||||
wxTimerList.DeleteObject(this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user