]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/button.cpp
fixed memory leak and removed duplicated code
[wxWidgets.git] / src / msw / button.cpp
index 46d520bcf79413d186854c747c5fc5aa654802c9..06e356af658a4369e7ad98d7c09d845cea529b54 100644 (file)
@@ -90,10 +90,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl,"wx/button.h")
 wxBEGIN_PROPERTIES_TABLE(wxButton)
        wxEVENT_PROPERTY( Click , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent)
 
-       wxPROPERTY( Font , wxFont , SetFont , GetFont  , , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+       wxPROPERTY( Font , wxFont , SetFont , GetFont  , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
        wxPROPERTY( Label, wxString , SetLabel, GetLabel, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
 
-    wxPROPERTY_FLAGS( WindowStyle , wxButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
+    wxPROPERTY_FLAGS( WindowStyle , wxButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
 
 wxEND_PROPERTIES_TABLE()
 
@@ -203,7 +203,7 @@ wxSize wxButton::DoGetBestSize() const
     GetTextExtent(wxGetWindowText(GetHWND()), &wBtn, NULL);
 
     int wChar, hChar;
-    wxGetCharSize(GetHWND(), &wChar, &hChar, &GetFont());
+    wxGetCharSize(GetHWND(), &wChar, &hChar, GetFont());
 
     // add a margin -- the button is wider than just its label
     wBtn += 3*wChar;
@@ -285,7 +285,7 @@ wxSize wxButtonBase::GetDefaultSize()
    NB: all this is quite complicated by now and the worst is that normally
        it shouldn't be necessary at all as for the normal Windows programs
        DefWindowProc() and IsDialogMessage() take care of all this
-       automatically -- however in wxWindows programs this doesn't work for
+       automatically -- however in wxWidgets programs this doesn't work for
        nested hierarchies (i.e. a notebook inside a notebook) for unknown
        reason and so we have to reproduce all this code ourselves. It would be
        very nice if we could avoid doing it.
@@ -298,7 +298,7 @@ void wxButton::SetDefault()
 
     wxCHECK_RET( parent, _T("button without parent?") );
 
-    // set this one as the default button both for wxWindows ...
+    // set this one as the default button both for wxWidgets ...
     wxWindow *winOldDefault = parent->SetDefaultItem(this);
 
     // ... and Windows