X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..ab5ebf521fca1ddff1de556db7c53b25b501cdeb:/src/msw/accel.cpp diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp index 563ce9929c..5f82d74601 100644 --- a/src/msw/accel.cpp +++ b/src/msw/accel.cpp @@ -26,6 +26,8 @@ #include "wx/accel.h" +#if wxUSE_ACCEL + #include "wx/msw/private.h" IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) @@ -57,10 +59,7 @@ wxAcceleratorRefData::~wxAcceleratorRefData() { if (m_hAccel) { - // This function not available in WIN16 -#if !defined(__WIN16__) DestroyAcceleratorTable((HACCEL) m_hAccel); -#endif } m_hAccel = 0 ; } @@ -96,10 +95,8 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& resource) extern int wxCharCodeWXToMSW(int id, bool *isVirtual); // Create from an array -#if !defined(__WIN16__) wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]) { - // Not available in WIN16 m_refData = new wxAcceleratorRefData; ACCEL* arr = new ACCEL[n]; @@ -131,14 +128,6 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0); } -#else // Win16 -wxAcceleratorTable::wxAcceleratorTable(int WXUNUSED(n), const wxAcceleratorEntry WXUNUSED(entries)[]) -{ - // No, we simply gracefully degrade; we don't expect the - // developer to pepper their code with #ifdefs just for this. - // wxFAIL_MSG("not implemented"); -} -#endif // Win32/16 bool wxAcceleratorTable::Ok() const { @@ -166,3 +155,4 @@ bool wxAcceleratorTable::Translate(wxWindow *window, WXMSG *wxmsg) const return Ok() && ::TranslateAccelerator(GetHwndOf(window), GetHaccel(), msg); } +#endif