1. more (minor) wxCaret bug fixes

2. try to enforce wxPaintDC usage only inside EVT_PAINT handler (only in
   debug mode)
3. warnings removed from pnghand.cpp and dibuitls.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-03 23:17:01 +00:00
parent 2bc07607fc
commit c6eba8f8b2
5 changed files with 99 additions and 56 deletions

View File

@@ -102,8 +102,8 @@
// standard macros missing from some compilers headers
#ifndef GET_X_LPARAM
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
#endif // GET_X_LPARAM
// ---------------------------------------------------------------------------
@@ -117,6 +117,17 @@ wxMenu *wxCurrentPopupMenu = NULL;
extern wxList WXDLLEXPORT wxPendingDelete;
extern char wxCanvasClassName[];
#ifdef __WXDEBUG__
// see comments in dcclient.cpp where g_isPainting is defined
extern bool g_isPainting;
inline static void wxStartPainting() { g_isPainting = TRUE; }
inline static void wxEndPainting() { g_isPainting = FALSE; }
#else // !debug
inline static void wxStartPainting() { }
inline static void wxEndPainting() { }
#endif // debug/!debug
// ---------------------------------------------------------------------------
// private functions
// ---------------------------------------------------------------------------
@@ -1674,7 +1685,9 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
break;
case WM_PAINT:
wxStartPainting();
processed = HandlePaint();
wxEndPainting();
break;
case WM_CLOSE: