$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
erase $(LIBTARGET)
- tlib $(LIBTARGET) /P1024 @&&!
+ tlib $(LIBTARGET) /P2048 @&&!
+$(COMMONOBJS:.obj =.obj +)\
+$(GENERICOBJS:.obj =.obj +)\
+$(MSWOBJS:.obj =.obj +)\
directory by 10 (and the number of files to be maintained too).
</blockquote>
+<P>
+
+<H3>How do you use VC++'s memory leak checking instead of that in wxWindows?</H3>
+
+Vadim Zeitlin:
+
+<pre>
+On the VC++ level, it's just the matter of calling _CrtSetDbgFlag() in the very
+beginning of the program. In wxWindows, this is done automatically when
+compiling with VC++ in debug mode unless wxUSE_GLOBAL_MEMORY_OPERATORS or
+__NO_VC_CRTDBG__ are defined - this check is done in wx/msw/msvcrt.h which
+is included from app.cpp which then calls wxCrtSetDbgFlag() without any
+#ifdefs.
+
+This works quite well: at the end of the program, all leaked blocks with their
+malloc count are shown. This number (malloc count) can be used to determine
+where exactly the object was allocated: for this it's enough to set the variable
+_crtBreakAlloc (look in VC98\crt\srs\dbgheap.c line 326) to this number and
+a breakpoint will be triggered when the block with this number is allocated.
+
+For simple situations it works like a charm. For something more complicated
+like reading uninitialized memory a specialized tool is probably better...
+
+Regards,
+VZ
+</pre>
+
+
</font>
</BODY>
\wxheading{See also}
-\helpref{wxBitmap}{wxbitmap}
+\helpref{wxBitmap}{wxbitmap},
\helpref{wxInitAllImageHandlers}{wxinitallimagehandlers}
\latexignore{\rtfignore{\wxheading{Members}}}
class WXDLLEXPORT wxDateTimeHolidayAuthority;
WX_DEFINE_EXPORTED_ARRAY(wxDateTimeHolidayAuthority *, wxHolidayAuthoritiesArray);
+class wxDateTimeHolidaysModule;
class WXDLLEXPORT wxDateTimeHolidayAuthority
{
+ friend wxDateTimeHolidaysModule;
public:
// returns TRUE if the given date is a holiday
static bool IsHoliday(const wxDateTime& dt);
virtual void OnExit()
{
wxDateTimeHolidayAuthority::ClearAllAuthorities();
+ wxDateTimeHolidayAuthority::ms_authorities.Clear();
}
private:
cnt = p.Length();
for (i = 0; i < cnt; i++)
- if (p.GetChar(i) == wxT('\\')); p.GetWritableChar(i) = wxT('/'); // wanna be windows-safe
+ if (p.GetChar(i) == wxT('\\')) p.GetWritableChar(i) = wxT('/'); // Want to be windows-safe
if (p.Left(2) == wxT("./")) { p = p.Mid(2); cnt -= 2; }
m_FindFileHandler = NULL;
for (int i = spec2.Length()-1; i >= 0; i--)
- if (spec2[(unsigned int) i] == wxT('\\')) spec2.GetWritableChar(i) = wxT('/'); // wanna be windows-safe
+ if (spec2[(unsigned int) i] == wxT('\\')) spec2.GetWritableChar(i) = wxT('/'); // Want to be windows-safe
node = m_Handlers.GetFirst();
while (node)
// wxPrinterDC bit blitting/bitmap drawing
// ----------------------------------------------------------------------------
+// Win16 doesn't define GDI_ERROR.
+#ifndef GDI_ERROR
+#define GDI_ERROR -1
+#endif
+
void wxPrinterDC::DoDrawBitmap(const wxBitmap &bmp,
wxCoord x, wxCoord y,
bool useMask)
#pragma hdrstop
#endif
+// For _A_SUBDIR, etc.
+#if defined(__BORLANDC__) && defined(__WIN16__)
+#include <dos.h>
+#endif
+
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
erase $(LIBTARGET)
- tlib $(LIBTARGET) /P1024 @&&!
+ tlib $(LIBTARGET) /P2048 @&&!
+$(COMMONOBJS:.obj =.obj +)\
+$(GENERICOBJS:.obj =.obj +)\
+$(MSWOBJS:.obj =.obj +)\
if ( width > -1 ) width1 = width;
if ( height > -1 ) height1 = height;
+ // Unfortunately this won't work in WIN16. Unless perhaps
+ // we define WS_EX_CONTROLPARENT ourselves?
+#ifndef __WIN16__
// if we have wxTAB_TRAVERSAL style, we want WS_EX_CONTROLPARENT or
// IsDialogMessage() won't work for us
if ( GetWindowStyleFlag() & wxTAB_TRAVERSAL )
{
extendedStyle |= WS_EX_CONTROLPARENT;
}
+#endif
HWND hParent = (HWND)NULL;
if ( parent )
wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
int *attribList /* not used yet! */, const wxPalette& palette):
- wxScrolledWindow(parent, id, pos, size, style, name)
+ wxScrolledWindow()
{
- m_hDC = (WXHDC) ::GetDC((HWND) GetHWND());
+ m_glContext = (wxGLContext*) NULL;
- SetupPixelFormat();
- SetupPalette(palette);
+ bool ret = Create(parent, id, pos, size, style, name);
+
+ if ( ret )
+ {
+ SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
+ SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+ }
+
+ m_hDC = (WXHDC) ::GetDC((HWND) GetHWND());
+
+ SetupPixelFormat();
+ SetupPalette(palette);
+
+ m_glContext = new wxGLContext(TRUE, this, palette);
- m_glContext = new wxGLContext(TRUE, this, palette);
}
wxGLCanvas::wxGLCanvas( wxWindow *parent,
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
int *attribList, const wxPalette& palette )
: wxScrolledWindow()
-// : wxScrolledWindow(parent, id, pos, size, style, name)
{
+ m_glContext = (wxGLContext*) NULL;
+
bool ret = Create(parent, id, pos, size, style, name);
if ( ret )