wxASSERT_MSG( !theFont || theFont->Ok(),
_T("invalid font in GetTextExtent()") );
- const wxFont fontToUse(theFont ? *theFont : GetFont());
+ wxFont fontToUse;
+ if (theFont)
+ fontToUse = *theFont;
+ else
+ fontToUse = GetFont();
WindowHDC hdc(GetHwnd());
SelectInHDC selectFont(hdc, GetHfontOf(fontToUse));
point.y = y;
::ClientToScreen(hWnd, &point);
wxCurrentPopupMenu = menu;
+#if defined(__WXWINCE__)
UINT flags = 0;
-#if !defined(__WXWINCE__)
- flags = TPM_RIGHTBUTTON;
+#else
+ UINT flags = TPM_RIGHTBUTTON;
#endif
::TrackPopupMenu(hMenu, flags, point.x, point.y, 0, hWnd, NULL);
return true;
}
}
+#else
+ wxUnusedVar(lParam);
#endif // wxUSE_TOOLTIPS
return false;
{
TEXTMETRIC tm;
HDC dc = ::GetDC((HWND) wnd);
- HFONT fnt =0;
HFONT was = 0;
// the_font.UseResource();
// the_font.RealizeResource();
- fnt = (HFONT)the_font.GetResourceHandle(); // const_cast
+ HFONT fnt = (HFONT)the_font.GetResourceHandle(); // const_cast
if ( fnt )
was = (HFONT) SelectObject(dc,fnt);