Removed references to DEBUG and WXDEBUG; cured Motif font problem; removed

some warnings in OGL; fixed bug in wxChoice


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-09 11:57:05 +00:00
parent 605c9c8318
commit ea57084d10
47 changed files with 205 additions and 321 deletions

View File

@@ -82,7 +82,7 @@
#ifdef __WXDEBUG__
const char *wxGetMessageName(int message);
#endif //WXDEBUG
#endif //__WXDEBUG__
#define WINDOW_MARGIN 3 // This defines sensitivity of Leave events
@@ -895,9 +895,8 @@ LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
wxWndHook = NULL;
wnd->m_hWnd = (WXHWND) hWnd;
}
#if (WXDEBUG > 1)
wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
#endif
// wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
// Stop right here if we don't have a valid handle
// in our wxWnd object.
if (wnd && !wnd->m_hWnd) {
@@ -936,7 +935,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Processing %s(%lx, %lx)",
wxGetMessageName(message), wParam, lParam);
#endif // WXDEBUG
#endif // __WXDEBUG__
HWND hWnd = (HWND)m_hWnd;
@@ -1557,10 +1556,6 @@ void wxWindow::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow
wxWndHook = NULL;
wxWinHandleList->Append((long)m_hWnd, this);
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWCreate %d\n", m_hWnd);
#endif
}
void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
@@ -1569,9 +1564,6 @@ void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
bool wxWindow::MSWOnClose(void)
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnClose %d\n", handle);
#endif
return FALSE;
}
@@ -1614,9 +1606,6 @@ bool wxWindow::MSWOnEndSession(bool endSession, long logOff)
bool wxWindow::MSWOnDestroy(void)
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnDestroy %d\n", handle);
#endif
// delete our drop target if we've got one
#if wxUSE_DRAG_AND_DROP
if ( m_pDropTarget != NULL ) {
@@ -1675,9 +1664,6 @@ bool wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam)
void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu))
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnMenuHighlight %d\n", handle);
#endif
}
void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem)
@@ -1686,10 +1672,6 @@ void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem)
bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate))
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnActivate %d\n", handle);
#endif
wxActivateEvent event(wxEVT_ACTIVATE, ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE)),
m_windowId);
event.SetEventObject(this);
@@ -1699,9 +1681,6 @@ bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSE
bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd);
#endif
// Deal with caret
if (m_caretEnabled && (m_caretWidth > 0) && (m_caretHeight > 0))
{
@@ -1719,9 +1698,6 @@ bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd);
#endif
// Deal with caret
if (m_caretEnabled)
{
@@ -1737,9 +1713,6 @@ bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
void wxWindow::MSWOnDropFiles(WXWPARAM wParam)
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd);
#endif
HDROP hFilesInfo = (HDROP) wParam;
POINT dropPoint;
@@ -1830,9 +1803,6 @@ bool wxWindow::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd);
#endif
if (nCtlColor == CTLCOLOR_DLG)
{
return OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam);
@@ -1930,7 +1900,7 @@ long wxWindow::Default()
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.",
wxGetMessageName(m_lastMsg));
#endif // WXDEBUG
#endif // __WXDEBUG__
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
}
@@ -2014,9 +1984,6 @@ bool wxWindow::MSWTranslateMessage(WXMSG* pMsg)
long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate))
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnMDIActivate %d\n", m_hWnd);
#endif
return 1;
}
@@ -2066,9 +2033,6 @@ void wxWindow::MSWOnSize(int w, int h, WXUINT WXUNUSED(flag))
if (m_inOnSize)
return;
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnSize %d\n", m_hWnd);
#endif
if (!m_hWnd)
return;
@@ -2090,9 +2054,6 @@ void wxWindow::MSWOnWindowPosChanging(void *WXUNUSED(lpPos))
// Deal with child commands from buttons etc.
bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
#if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnCommand\n");
#endif
if (wxCurrentPopupMenu)
{
wxMenu *popupMenu = wxCurrentPopupMenu;
@@ -2100,22 +2061,11 @@ bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
bool succ = popupMenu->MSWCommand(cmd, id);
return succ;
}
#if WXDEBUG > 1
char buf[80];
sprintf(buf, "Looking for item %d...\n", id);
wxDebugMsg(buf);
#endif
wxWindow *item = FindItem(id);
if (item)
{
bool value = item->MSWCommand(cmd, id);
#if WXDEBUG > 1
if (value)
wxDebugMsg("MSWCommand succeeded\n");
else
wxDebugMsg("MSWCommand failed\n");
#endif
return value;
}
else
@@ -2730,9 +2680,6 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
HFONT was = 0;
if (the_font)
{
#if WXDEBUG > 1
wxDebugMsg("wxGetCharSize: Selecting HFONT %X\n", fnt);
#endif
// the_font->UseResource();
// the_font->RealizeResource();
if ((fnt=(HFONT) the_font->GetResourceHandle()))
@@ -2741,9 +2688,6 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
GetTextMetrics(dc, &tm);
if (the_font && fnt && was)
{
#if WXDEBUG > 1
wxDebugMsg("wxGetCharSize: Selecting old HFONT %X\n", was);
#endif
SelectObject(dc,was) ;
}
ReleaseDC((HWND)wnd, dc);
@@ -4865,4 +4809,4 @@ const char *wxGetMessageName(int message)
return s_szBuf;
}
}
#endif //WXDEBUG
#endif //__WXDEBUG__