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