]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dlgcmn.cpp
Hacks for wine.
[wxWidgets.git] / src / common / dlgcmn.cpp
index 1355125f52431ac3738a80b86e23f6475ec2bac6..dd09b3a3220cab915edf19c82135900d483ee94d 100644 (file)
@@ -456,6 +456,7 @@ void wxDialogBase::SetEscapeId(int escapeId)
 
 bool wxDialogBase::EmulateButtonClickIfPresent(int id)
 {
+#if wxUSE_BUTTON
     wxButton *btn = wxDynamicCast(FindWindow(id), wxButton);
 
     if ( !btn || !btn->IsEnabled() || !btn->IsShown() )
@@ -466,6 +467,10 @@ bool wxDialogBase::EmulateButtonClickIfPresent(int id)
     btn->GetEventHandler()->ProcessEvent(event);
 
     return true;
+#else // !wxUSE_BUTTON
+    wxUnusedVar(id);
+    return false;
+#endif // wxUSE_BUTTON/!wxUSE_BUTTON
 }
 
 bool wxDialogBase::IsEscapeKey(const wxKeyEvent& event)