]> git.saurik.com Git - wxWidgets.git/blob - src/msw/gdiobj.cpp
use GetLabelText() instead of wxStripMenuCodes() to avoid stripping the part of the...
[wxWidgets.git] / src / msw / gdiobj.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/gdiobj.cpp
3 // Purpose: wxGDIObject class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #ifdef __BORLANDC__
16 #pragma hdrstop
17 #endif
18
19 #include "wx/gdiobj.h"
20
21 #ifndef WX_PRECOMP
22 #include <stdio.h>
23 #include "wx/list.h"
24 #include "wx/utils.h"
25 #include "wx/app.h"
26 #endif
27
28 #include "wx/msw/private.h"
29
30 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject)
31
32 #define M_GDIDATA wx_static_cast(wxGDIRefData*, m_refData)
33
34 /*
35 void wxGDIObject::IncrementResourceUsage(void)
36 {
37 if ( !M_GDIDATA )
38 return;
39
40 // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
41 M_GDIDATA->m_usageCount ++;
42 };
43
44 void wxGDIObject::DecrementResourceUsage(void)
45 {
46 if ( !M_GDIDATA )
47 return;
48
49 M_GDIDATA->m_usageCount --;
50 if (wxTheApp)
51 wxTheApp->SetPendingCleanup(true);
52 // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
53 if (M_GDIDATA->m_usageCount < 0)
54 {
55 char buf[80];
56 sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
57 wxDebugMsg(buf);
58 }
59 // assert(M_GDIDATA->m_usageCount >= 0);
60 };
61
62 */