#undef GetClassInfo
#endif
-#ifdef __DEBUG__
+#ifdef __WXDEBUG__
static const char *GetMessageName(int message);
-#endif //DEBUG
+#endif //WXDEBUG
#define WINDOW_MARGIN 3 // This defines sensitivity of Leave events
BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler)
EVT_CHAR(wxWindow::OnChar)
- EVT_SIZE(wxWindow::OnSize)
EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground)
EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged)
EVT_INIT_DIALOG(wxWindow::OnInitDialog)
if (fontToUse && fontToUse->Ok())
{
if ((fnt=(HFONT) fontToUse->GetResourceHandle()))
- was = SelectObject(dc,fnt) ;
+ was = (HFONT) SelectObject(dc,fnt) ;
}
SIZE sizeRect;
wxWndHook = NULL;
wnd->m_hWnd = (WXHWND) hWnd;
}
-#if (DEBUG > 1)
+#if (WXDEBUG > 1)
wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
#endif
// Stop right here if we don't have a valid handle
// Main Windows 3 window proc
long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
- #ifdef __DEBUG__
+ #ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Processing %s", GetMessageName(message));
- #endif // DEBUG
+ #endif // WXDEBUG
HWND hWnd = (HWND)m_hWnd;
{
#if 0
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWDestroyWindow %d\n", handle);
#endif
MSWDetachWindowMenu();
wxWndHook = NULL;
wxWinHandleList->Append((long)m_hWnd, this);
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWCreate %d\n", m_hWnd);
#endif
}
bool wxWindow::MSWOnClose(void)
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnClose %d\n", handle);
#endif
return FALSE;
bool wxWindow::MSWOnDestroy(void)
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnDestroy %d\n", handle);
#endif
// delete our drop target if we've got one
void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu))
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnMenuHighlight %d\n", handle);
#endif
}
bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate))
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnActivate %d\n", handle);
#endif
bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd);
#endif
// Deal with caret
bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd);
#endif
// Deal with caret
void wxWindow::MSWOnDropFiles(WXWPARAM wParam)
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd);
#endif
- HANDLE hFilesInfo = (HANDLE)wParam;
+ HDROP hFilesInfo = (HDROP) wParam;
POINT dropPoint;
DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint);
WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd);
#endif
if (nCtlColor == CTLCOLOR_DLG)
if (m_lastMsg == 0)
return 0;
- #ifdef __DEBUG__
+ #ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.",
GetMessageName(m_lastMsg));
- #endif // DEBUG
+ #endif // WXDEBUG
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
}
long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate))
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnMDIActivate %d\n", m_hWnd);
#endif
return 1;
if (m_inOnSize)
return;
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnSize %d\n", m_hWnd);
#endif
if (!m_hWnd)
// Deal with child commands from buttons etc.
bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control))
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnCommand\n");
#endif
if (wxCurrentPopupMenu)
bool succ = popupMenu->MSWCommand(cmd, id);
return succ;
}
-#if DEBUG > 1
+#if WXDEBUG > 1
char buf[80];
sprintf(buf, "Looking for item %d...\n", id);
wxDebugMsg(buf);
if (item)
{
bool value = item->MSWCommand(cmd, id);
-#if DEBUG > 1
+#if WXDEBUG > 1
if (value)
wxDebugMsg("MSWCommand succeeded\n");
else
}
else
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("Could not find item!\n");
char buf[100];
wxDebugMsg("Item ids for this panel:\n");
HFONT was = 0;
if (the_font)
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxGetCharSize: Selecting HFONT %X\n", fnt);
#endif
// the_font->UseResource();
// the_font->RealizeResource();
if ((fnt=(HFONT) the_font->GetResourceHandle()))
- was = SelectObject(dc,fnt) ;
+ was = (HFONT) SelectObject(dc,fnt) ;
}
GetTextMetrics(dc, &tm);
if (the_font && fnt && was)
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxGetCharSize: Selecting old HFONT %X\n", was);
#endif
SelectObject(dc,was) ;
::ScrollWindow((HWND) GetHWND(), dx, dy, NULL, NULL);
}
-void wxWindow::OnSize(wxSizeEvent& event)
-{
- Default();
-#if USE_CONSTRAINTS
- if (GetAutoLayout())
- Layout();
-#endif
-}
-
/*
void wxWindow::CalcScrolledPosition(int x, int y, int *xx, int *yy) const
{
if (vert_units)
y_pages = (int)(v_height/vert_units) - y_page;
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
int y = 0;
#else
int y = y_page-1;
return IsShown() && IsEnabled();
}
-#ifdef __DEBUG__
+#ifdef __WXDEBUG__
static const char *GetMessageName(int message)
{
switch ( message ) {
return s_szBuf;
}
}
-#endif //DEBUG
+#endif //WXDEBUG