Made wxStubs compile on Unix.

Improvements to doc/view on MDI, including multiple menus for wxFileHistory.
Added wxDirExists to wxMSW; moved wxMatchWild to filefn.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-09-16 21:52:23 +00:00
parent f93ce4dadc
commit 7f555861b7
43 changed files with 1266 additions and 465 deletions

View File

@@ -108,9 +108,13 @@ wxMetaFileDC::wxMetaFileDC(const wxString& file)
if (!file.IsNull() && wxFileExists(file))
wxRemoveFile(file);
m_hDC = (WXHDC) CreateMetaFile(file);
m_ok = TRUE;
if (!file.IsNull() && (file != ""))
m_hDC = (WXHDC) CreateMetaFile(file);
else
m_hDC = (WXHDC) CreateMetaFile(NULL);
m_ok = (m_hDC != (WXHDC) 0) ;
// Actual Windows mapping mode, for future reference.
m_windowsMappingMode = MM_TEXT;
@@ -145,12 +149,12 @@ wxMetaFileDC::~wxMetaFileDC(void)
m_hDC = 0;
}
void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y,
float *descent, float *externalLeading, wxFont *theFont, bool use16bit)
void wxMetaFileDC::GetTextExtent(const wxString& string, long *x, long *y,
long *descent, long *externalLeading, wxFont *theFont, bool use16bit) const
{
wxFont *fontToUse = theFont;
if (!fontToUse)
fontToUse = &m_font;
fontToUse = (wxFont*) &m_font;
HDC dc = GetDC(NULL);
@@ -161,10 +165,10 @@ void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y,
ReleaseDC(NULL, dc);
*x = (float)XDEV2LOGREL(sizeRect.cx);
*y = (float)YDEV2LOGREL(sizeRect.cy);
if (descent) *descent = (float)tm.tmDescent;
if (externalLeading) *externalLeading = (float)tm.tmExternalLeading;
*x = XDEV2LOGREL(sizeRect.cx);
*y = YDEV2LOGREL(sizeRect.cy);
if (descent) *descent = tm.tmDescent;
if (externalLeading) *externalLeading = tm.tmExternalLeading;
}
wxMetaFile *wxMetaFileDC::Close(void)