Source cleaning: whitespaces,-1/wxID_ANY,TRUE/true,FALSE/false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-08-19 17:39:28 +00:00
parent a0f9686df5
commit fcf90ee1b1
5 changed files with 76 additions and 76 deletions

View File

@@ -93,7 +93,7 @@ private:
#endif // __WIN32__ #endif // __WIN32__
protected: protected:
// send a notification event, return TRUE if processed // send a notification event, return true if processed
bool SendClickEvent(); bool SendClickEvent();
// default button handling // default button handling

View File

@@ -200,7 +200,7 @@ wxBitmapRefData::wxBitmapRefData()
#endif #endif
m_isDIB = m_isDIB =
m_hasAlpha = FALSE; m_hasAlpha = false;
} }
wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data) wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data)
@@ -215,7 +215,7 @@ wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data)
wxASSERT_MSG( !data.m_isDIB, wxASSERT_MSG( !data.m_isDIB,
_T("can't copy bitmap locked for raw access!") ); _T("can't copy bitmap locked for raw access!") );
m_isDIB = FALSE; m_isDIB = false;
m_hasAlpha = data.m_hasAlpha; m_hasAlpha = data.m_hasAlpha;
} }
@@ -332,7 +332,7 @@ bool wxBitmap::CopyFromCursor(const wxCursor& cursor)
UnRef(); UnRef();
if ( !cursor.Ok() ) if ( !cursor.Ok() )
return FALSE; return false;
return CopyFromIconOrCursor(cursor); return CopyFromIconOrCursor(cursor);
} }
@@ -342,7 +342,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
UnRef(); UnRef();
if ( !icon.Ok() ) if ( !icon.Ok() )
return FALSE; return false;
return CopyFromIconOrCursor(icon); return CopyFromIconOrCursor(icon);
} }
@@ -351,12 +351,12 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
bool wxBitmap::CopyFromDIB(const wxDIB& dib) bool wxBitmap::CopyFromDIB(const wxDIB& dib)
{ {
wxCHECK_MSG( dib.IsOk(), FALSE, _T("invalid DIB in CopyFromDIB") ); wxCHECK_MSG( dib.IsOk(), false, _T("invalid DIB in CopyFromDIB") );
#ifdef SOMETIMES_USE_DIB #ifdef SOMETIMES_USE_DIB
HBITMAP hbitmap = dib.CreateDDB(); HBITMAP hbitmap = dib.CreateDDB();
if ( !hbitmap ) if ( !hbitmap )
return FALSE; return false;
#else // ALWAYS_USE_DIB #else // ALWAYS_USE_DIB
HBITMAP hbitmap = ((wxDIB &)dib).Detach(); // const_cast HBITMAP hbitmap = ((wxDIB &)dib).Detach(); // const_cast
#endif // SOMETIMES_USE_DIB/ALWAYS_USE_DIB #endif // SOMETIMES_USE_DIB/ALWAYS_USE_DIB
@@ -382,7 +382,7 @@ bool wxBitmap::CopyFromDIB(const wxDIB& dib)
delete palette; delete palette;
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
return TRUE; return true;
} }
#endif // NEVER_USE_DIB #endif // NEVER_USE_DIB
@@ -458,25 +458,22 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
} }
// Create from XPM data // Create from XPM data
#if wxUSE_IMAGE && wxUSE_XPM
bool wxBitmap::CreateFromXpm(const char **data) bool wxBitmap::CreateFromXpm(const char **data)
#else
bool wxBitmap::CreateFromXpm(const char **WXUNUSED(data))
#endif
{ {
#if wxUSE_IMAGE && wxUSE_XPM #if wxUSE_IMAGE && wxUSE_XPM
Init(); Init();
wxCHECK_MSG( data != NULL, FALSE, wxT("invalid bitmap data") ) wxCHECK_MSG( data != NULL, false, wxT("invalid bitmap data") )
wxXPMDecoder decoder; wxXPMDecoder decoder;
wxImage img = decoder.ReadData(data); wxImage img = decoder.ReadData(data);
wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") ) wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") )
*this = wxBitmap(img); *this = wxBitmap(img);
return TRUE; return true;
#else #else
return FALSE; wxUnusedVar(data);
return false;
#endif #endif
} }
@@ -515,7 +512,7 @@ bool wxBitmap::Create(int width, int height, int depth)
bool wxBitmap::Create(int width, int height, const wxDC& dc) bool wxBitmap::Create(int width, int height, const wxDC& dc)
{ {
wxCHECK_MSG( dc.Ok(), FALSE, _T("invalid HDC in wxBitmap::Create()") ); wxCHECK_MSG( dc.Ok(), false, _T("invalid HDC in wxBitmap::Create()") );
return DoCreate(width, height, -1, dc.GetHDC()); return DoCreate(width, height, -1, dc.GetHDC());
} }
@@ -542,12 +539,12 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
wxDIB dib(w, h, d); wxDIB dib(w, h, d);
if ( !dib.IsOk() ) if ( !dib.IsOk() )
return FALSE; return false;
// don't delete the DIB section in dib object dtor // don't delete the DIB section in dib object dtor
hbmp = dib.Detach(); hbmp = dib.Detach();
GetBitmapData()->m_isDIB = TRUE; GetBitmapData()->m_isDIB = true;
GetBitmapData()->m_depth = d; GetBitmapData()->m_depth = d;
} }
else // create a DDB else // create a DDB
@@ -622,7 +619,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, const wxDC& dc)
if (hBitmap == NULL) if (hBitmap == NULL)
{ {
::ReleaseDC(NULL, hScreenDC); ::ReleaseDC(NULL, hScreenDC);
return FALSE; return false;
} }
HDC hMemDC = ::CreateCompatibleDC(hScreenDC); HDC hMemDC = ::CreateCompatibleDC(hScreenDC);
@@ -648,7 +645,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, const wxDC& dc)
if (!hMaskBitmap) if (!hMaskBitmap)
{ {
hasMask = FALSE; hasMask = false;
} }
else else
{ {
@@ -659,7 +656,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, const wxDC& dc)
hOldMaskBitmap = ::SelectObject( hMaskDC, hMaskBitmap); hOldMaskBitmap = ::SelectObject( hMaskDC, hMaskBitmap);
} }
#else #else
hasMask = FALSE; hasMask = false;
#endif #endif
} }
@@ -706,7 +703,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, const wxDC& dc)
SetPalette(image.GetPalette()); SetPalette(image.GetPalette());
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
return TRUE; return true;
} }
wxImage wxBitmap::ConvertToImage() const wxImage wxBitmap::ConvertToImage() const
@@ -787,7 +784,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth)
bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc) bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc)
{ {
wxCHECK_MSG( dc.Ok(), FALSE, wxCHECK_MSG( dc.Ok(), false,
_T("invalid HDC in wxBitmap::CreateFromImage()") ); _T("invalid HDC in wxBitmap::CreateFromImage()") );
return CreateFromImage(image, -1, dc.GetHDC()); return CreateFromImage(image, -1, dc.GetHDC());
@@ -795,7 +792,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc)
bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc) bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
{ {
wxCHECK_MSG( image.Ok(), FALSE, wxT("invalid image") ); wxCHECK_MSG( image.Ok(), false, wxT("invalid image") );
UnRef(); UnRef();
@@ -805,7 +802,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
wxDIB dib(image); wxDIB dib(image);
if ( !dib.IsOk() ) if ( !dib.IsOk() )
return FALSE; return false;
// store the bitmap parameters // store the bitmap parameters
@@ -828,7 +825,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
// don't delete the DIB section in dib object dtor // don't delete the DIB section in dib object dtor
hbitmap = dib.Detach(); hbitmap = dib.Detach();
refData->m_isDIB = TRUE; refData->m_isDIB = true;
refData->m_depth = dib.GetDepth(); refData->m_depth = dib.GetDepth();
} }
#ifndef ALWAYS_USE_DIB #ifndef ALWAYS_USE_DIB
@@ -851,7 +848,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
image.GetMaskBlue()))); image.GetMaskBlue())));
} }
return TRUE; return true;
} }
wxImage wxBitmap::ConvertToImage() const wxImage wxBitmap::ConvertToImage() const
@@ -965,12 +962,12 @@ bool wxBitmap::LoadFile(const wxString& filename, long type)
{ {
*this = wxBitmap(image); *this = wxBitmap(image);
return TRUE; return true;
} }
} }
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE
return FALSE; return false;
} }
bool wxBitmap::Create(void *data, long type, int width, int height, int depth) bool wxBitmap::Create(void *data, long type, int width, int height, int depth)
@@ -983,7 +980,7 @@ bool wxBitmap::Create(void *data, long type, int width, int height, int depth)
{ {
wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), type); wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), type);
return FALSE; return false;
} }
m_refData = new wxBitmapRefData; m_refData = new wxBitmapRefData;
@@ -1013,7 +1010,7 @@ bool wxBitmap::SaveFile(const wxString& filename,
} }
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE
return FALSE; return false;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -1347,7 +1344,7 @@ wxMask::~wxMask()
bool wxMask::Create(const wxBitmap& bitmap) bool wxMask::Create(const wxBitmap& bitmap)
{ {
#ifndef __WXMICROWIN__ #ifndef __WXMICROWIN__
wxCHECK_MSG( bitmap.Ok() && bitmap.GetDepth() == 1, FALSE, wxCHECK_MSG( bitmap.Ok() && bitmap.GetDepth() == 1, false,
_T("can't create mask from invalid or not monochrome bitmap") ); _T("can't create mask from invalid or not monochrome bitmap") );
if ( m_maskBitmap ) if ( m_maskBitmap )
@@ -1370,9 +1367,10 @@ bool wxMask::Create(const wxBitmap& bitmap)
DeleteDC(srcDC); DeleteDC(srcDC);
SelectObject(destDC, 0); SelectObject(destDC, 0);
DeleteDC(destDC); DeleteDC(destDC);
return TRUE; return true;
#else #else
return FALSE; wxUnusedVar(bitmap);
return false;
#endif #endif
} }
@@ -1398,7 +1396,7 @@ bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
} }
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
return FALSE; return false;
} }
// Create a mask from a bitmap and a colour indicating // Create a mask from a bitmap and a colour indicating
@@ -1406,7 +1404,7 @@ bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
{ {
#ifndef __WXMICROWIN__ #ifndef __WXMICROWIN__
wxCHECK_MSG( bitmap.Ok(), FALSE, _T("invalid bitmap in wxMask::Create") ); wxCHECK_MSG( bitmap.Ok(), false, _T("invalid bitmap in wxMask::Create") );
if ( m_maskBitmap ) if ( m_maskBitmap )
{ {
@@ -1429,7 +1427,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
wxLogLastError(wxT("CreateCompatibleDC")); wxLogLastError(wxT("CreateCompatibleDC"));
} }
bool ok = TRUE; bool ok = true;
// SelectObject() will fail // SelectObject() will fail
wxASSERT_MSG( !bitmap.GetSelectedInto(), wxASSERT_MSG( !bitmap.GetSelectedInto(),
@@ -1440,7 +1438,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
{ {
wxLogLastError(wxT("SelectObject")); wxLogLastError(wxT("SelectObject"));
ok = FALSE; ok = false;
} }
HGDIOBJ hbmpDstOld = ::SelectObject(destDC, (HBITMAP)m_maskBitmap); HGDIOBJ hbmpDstOld = ::SelectObject(destDC, (HBITMAP)m_maskBitmap);
@@ -1448,7 +1446,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
{ {
wxLogLastError(wxT("SelectObject")); wxLogLastError(wxT("SelectObject"));
ok = FALSE; ok = false;
} }
if ( ok ) if ( ok )
@@ -1467,7 +1465,9 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
return ok; return ok;
#else // __WXMICROWIN__ #else // __WXMICROWIN__
return FALSE; wxUnusedVar(bitmap);
wxUnusedVar(colour);
return false;
#endif // __WXMICROWIN__/!__WXMICROWIN__ #endif // __WXMICROWIN__/!__WXMICROWIN__
} }
@@ -1482,7 +1482,7 @@ bool wxBitmapHandler::Create(wxGDIImage *image,
{ {
wxBitmap *bitmap = wxDynamicCast(image, wxBitmap); wxBitmap *bitmap = wxDynamicCast(image, wxBitmap);
return bitmap ? Create(bitmap, data, flags, width, height, depth) : FALSE; return bitmap ? Create(bitmap, data, flags, width, height, depth) : false;
} }
bool wxBitmapHandler::Load(wxGDIImage *image, bool wxBitmapHandler::Load(wxGDIImage *image,
@@ -1492,7 +1492,7 @@ bool wxBitmapHandler::Load(wxGDIImage *image,
{ {
wxBitmap *bitmap = wxDynamicCast(image, wxBitmap); wxBitmap *bitmap = wxDynamicCast(image, wxBitmap);
return bitmap ? LoadFile(bitmap, name, flags, width, height) : FALSE; return bitmap ? LoadFile(bitmap, name, flags, width, height) : false;
} }
bool wxBitmapHandler::Save(wxGDIImage *image, bool wxBitmapHandler::Save(wxGDIImage *image,
@@ -1501,7 +1501,7 @@ bool wxBitmapHandler::Save(wxGDIImage *image,
{ {
wxBitmap *bitmap = wxDynamicCast(image, wxBitmap); wxBitmap *bitmap = wxDynamicCast(image, wxBitmap);
return bitmap ? SaveFile(bitmap, name, type) : FALSE; return bitmap ? SaveFile(bitmap, name, type) : false;
} }
bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap), bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap),
@@ -1511,7 +1511,7 @@ bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap),
int WXUNUSED(height), int WXUNUSED(height),
int WXUNUSED(depth)) int WXUNUSED(depth))
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap), bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap),
@@ -1520,7 +1520,7 @@ bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap),
int WXUNUSED(desiredWidth), int WXUNUSED(desiredWidth),
int WXUNUSED(desiredHeight)) int WXUNUSED(desiredHeight))
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap), bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap),
@@ -1528,7 +1528,7 @@ bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap),
int WXUNUSED(type), int WXUNUSED(type),
const wxPalette *WXUNUSED(palette)) const wxPalette *WXUNUSED(palette))
{ {
return FALSE; return false;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -1573,7 +1573,7 @@ bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel,
*lpDIBHeader = lpDIBheader; *lpDIBHeader = lpDIBheader;
return TRUE; return true;
} }
void wxFreeDIB(LPBITMAPINFO lpDIBHeader) void wxFreeDIB(LPBITMAPINFO lpDIBHeader)
@@ -1650,12 +1650,12 @@ HICON wxBitmapToIconOrCursor(const wxBitmap& bmp,
HICON wxBitmapToHICON(const wxBitmap& bmp) HICON wxBitmapToHICON(const wxBitmap& bmp)
{ {
return wxBitmapToIconOrCursor(bmp, TRUE, 0, 0); return wxBitmapToIconOrCursor(bmp, true, 0, 0);
} }
HCURSOR wxBitmapToHCURSOR(const wxBitmap& bmp, int hotSpotX, int hotSpotY) HCURSOR wxBitmapToHCURSOR(const wxBitmap& bmp, int hotSpotX, int hotSpotY)
{ {
return (HCURSOR)wxBitmapToIconOrCursor(bmp, FALSE, hotSpotX, hotSpotY); return (HCURSOR)wxBitmapToIconOrCursor(bmp, false, hotSpotX, hotSpotY);
} }
HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h) HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)

View File

@@ -126,7 +126,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
m_marginY = wxDEFAULT_BUTTON_MARGIN; m_marginY = wxDEFAULT_BUTTON_MARGIN;
} }
if (id == -1) if (id == wxID_ANY)
m_windowId = NewControlId(); m_windowId = NewControlId();
else else
m_windowId = id; m_windowId = id;

View File

@@ -88,10 +88,10 @@ wxEND_FLAGS( wxButtonStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl,"wx/button.h") IMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl,"wx/button.h")
wxBEGIN_PROPERTIES_TABLE(wxButton) wxBEGIN_PROPERTIES_TABLE(wxButton)
wxEVENT_PROPERTY( Click , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent) wxEVENT_PROPERTY( Click , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent)
wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE, 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( Label, wxString , SetLabel, GetLabel, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
wxPROPERTY_FLAGS( WindowStyle , wxButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxPROPERTY_FLAGS( WindowStyle , wxButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
@@ -129,7 +129,7 @@ bool wxButton::Create(wxWindow *parent,
const wxString& name) const wxString& name)
{ {
if ( !CreateControl(parent, id, pos, size, style, validator, name) ) if ( !CreateControl(parent, id, pos, size, style, validator, name) )
return FALSE; return false;
WXDWORD exstyle; WXDWORD exstyle;
WXDWORD msStyle = MSWGetStyle(style, &exstyle); WXDWORD msStyle = MSWGetStyle(style, &exstyle);
@@ -302,8 +302,8 @@ void wxButton::SetDefault()
wxWindow *winOldDefault = parent->SetDefaultItem(this); wxWindow *winOldDefault = parent->SetDefaultItem(this);
// ... and Windows // ... and Windows
SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), FALSE); SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), false);
SetDefaultStyle(this, TRUE); SetDefaultStyle(this, true);
} }
// set this button as being currently default // set this button as being currently default
@@ -316,8 +316,8 @@ void wxButton::SetTmpDefault()
wxWindow *winOldDefault = parent->GetDefaultItem(); wxWindow *winOldDefault = parent->GetDefaultItem();
parent->SetTmpDefaultItem(this); parent->SetTmpDefaultItem(this);
SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), FALSE); SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), false);
SetDefaultStyle(this, TRUE); SetDefaultStyle(this, true);
} }
// unset this button as currently default, it may still stay permanent default // unset this button as currently default, it may still stay permanent default
@@ -331,8 +331,8 @@ void wxButton::UnsetTmpDefault()
wxWindow *winOldDefault = parent->GetDefaultItem(); wxWindow *winOldDefault = parent->GetDefaultItem();
SetDefaultStyle(this, FALSE); SetDefaultStyle(this, false);
SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), TRUE); SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), true);
} }
/* static */ /* static */
@@ -413,7 +413,7 @@ void wxButton::Command(wxCommandEvent & event)
bool wxButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) bool wxButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
{ {
bool processed = FALSE; bool processed = false;
switch ( param ) switch ( param )
{ {
// NOTE: Apparently older versions (NT 4?) of the common controls send // NOTE: Apparently older versions (NT 4?) of the common controls send
@@ -510,14 +510,14 @@ bool wxButton::SetBackgroundColour(const wxColour &colour)
if ( !wxControl::SetBackgroundColour(colour) ) if ( !wxControl::SetBackgroundColour(colour) )
{ {
// nothing to do // nothing to do
return FALSE; return false;
} }
MakeOwnerDrawn(); MakeOwnerDrawn();
Refresh(); Refresh();
return TRUE; return true;
} }
bool wxButton::SetForegroundColour(const wxColour &colour) bool wxButton::SetForegroundColour(const wxColour &colour)
@@ -525,14 +525,14 @@ bool wxButton::SetForegroundColour(const wxColour &colour)
if ( !wxControl::SetForegroundColour(colour) ) if ( !wxControl::SetForegroundColour(colour) )
{ {
// nothing to do // nothing to do
return FALSE; return false;
} }
MakeOwnerDrawn(); MakeOwnerDrawn();
Refresh(); Refresh();
return TRUE; return true;
} }
/* /*
@@ -592,7 +592,7 @@ static void DrawButtonFrame(HDC hdc, const RECT& rectBtn,
DrawRect(hdc, r); DrawRect(hdc, r);
(void)SelectObject(hdc, hpenGrey); (void)SelectObject(hdc, hpenGrey);
InflateRect(&r, -1, -1); ::InflateRect(&r, -1, -1);
DrawRect(hdc, r); DrawRect(hdc, r);
} }
@@ -602,7 +602,7 @@ static void DrawButtonFrame(HDC hdc, const RECT& rectBtn,
{ {
DrawRect(hdc, r); DrawRect(hdc, r);
InflateRect(&r, -1, -1); ::InflateRect(&r, -1, -1);
} }
wxDrawLine(hdc, r.left, r.bottom, r.right, r.bottom); wxDrawLine(hdc, r.left, r.bottom, r.right, r.bottom);
@@ -685,7 +685,7 @@ bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
::DeleteObject(hbrushBackground); ::DeleteObject(hbrushBackground);
return TRUE; return true;
} }
#endif // __WIN32__ #endif // __WIN32__