fixed signature of wxTimerProc to be conformant to what Windows expects it to be

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-09-18 11:54:21 +00:00
parent b521a84a30
commit 6d20f7ae50

View File

@@ -2,7 +2,7 @@
// Name: msw/timer.cpp // Name: msw/timer.cpp
// Purpose: wxTimer implementation // Purpose: wxTimer implementation
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by: Vadim Zeitlin (use hash map instead of list, global rewrite)
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
@@ -37,10 +37,6 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
// from utils.cpp
extern "C" WXDLLIMPEXP_BASE HWND
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// private globals // private globals
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -56,7 +52,8 @@ static wxTimerMap g_timerMap;
// private functions // private functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void WINAPI wxTimerProc(HWND hwnd, WORD, int idTimer, DWORD); // timer callback used for all timers
void WINAPI wxTimerProc(HWND hwnd, UINT msg, UINT idTimer, DWORD dwTime);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// macros // macros
@@ -93,7 +90,7 @@ bool wxTimer::Start(int milliseconds, bool oneShot)
NULL, // don't use window NULL, // don't use window
1, // id ignored with NULL hwnd anyhow 1, // id ignored with NULL hwnd anyhow
(UINT)m_milli, // delay (UINT)m_milli, // delay
(TIMERPROC)wxTimerProc // timer proc to call wxTimerProc // timer proc to call
); );
if ( !m_id ) if ( !m_id )
@@ -147,7 +144,11 @@ void wxProcessTimer(wxTimer& timer)
timer.Notify(); timer.Notify();
} }
void WINAPI wxTimerProc(HWND WXUNUSED(hwnd), WORD, int idTimer, DWORD) void WINAPI
wxTimerProc(HWND WXUNUSED(hwnd),
UINT WXUNUSED(msg),
UINT idTimer,
DWORD WXUNUSED(dwTime))
{ {
wxTimerMap::iterator node = g_timerMap.find(idTimer); wxTimerMap::iterator node = g_timerMap.find(idTimer);