Doc typos corrected, added wxDIALOG_UNIT_COMPATIBILITY test, made file open

error result in a message box (docview.cpp)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-07-08 10:29:17 +00:00
parent 92eaf25bd0
commit 3a035fb95f
5 changed files with 28 additions and 8 deletions

View File

@@ -15,9 +15,8 @@ docs/wine/COPYING.LIB
distrib/msw/*.rsp
distrib/msw/*.bat
tools/gettext/xgettext.exe
tools/gettext/msgfmt.exe
tools/gettext/msgunfmt.exe
tools/gettext/*.exe
tools/gettext/*.sed
src/makeb32.env
src/makeprog.b32

View File

@@ -95,7 +95,7 @@ is destroyed.
\func{wxObject *}{Get}{\param{long}{ key}}
\func{wxObject *}{Get}{\param{const wxString\& }{ key}}
\func{wxObject *}{Get}{\param{const char*}{ key}}
Gets data from the hash table, using an integer or string key (depending on which
has table constructor was used).
@@ -121,13 +121,12 @@ description for \helpref{wxNode}{wxnode}. The user will probably only wish to us
\func{void}{Put}{\param{long}{ key}, \param{wxObject *}{object}}
\func{void}{Put}{\param{const wxString\& }{ key}, \param{wxObject *}{object}}
\func{void}{Put}{\param{const char*}{ key}, \param{wxObject *}{object}}
Inserts data into the hash table, using an integer or string key (depending on which
has table constructor was used). The key string is copied and stored by the hash
table implementation.
\membersection{wxList::GetCount}
\constfunc{size\_t}{GetCount}{\void}

View File

@@ -1,6 +1,6 @@
\section{\class{wxStopWatch}}\label{wxstopwatch}
The wxStopWatch class allow you to measure time intervalls.
The wxStopWatch class allow you to measure time intervals.
\wxheading{Include files}

View File

@@ -1349,8 +1349,22 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
0,
wxTheApp->GetTopWindow());
if (!pathTmp.IsEmpty() && wxFileExists(pathTmp))
if (!pathTmp.IsEmpty())
{
if (!wxFileExists(pathTmp))
{
wxString msgTitle;
if (!wxTheApp->GetAppName().IsEmpty())
msgTitle = wxTheApp->GetAppName();
else
msgTitle = wxString(_("File error"));
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK | wxICON_EXCLAMATION,
wxTheApp->GetTopWindow());
path = wxT("");
return (wxDocTemplate *) NULL;
}
m_lastDirectory = wxPathOnly(pathTmp);
path = pathTmp;

View File

@@ -1344,7 +1344,11 @@ int wxWindow::GetCharWidth() const
{
// +1 is needed because Windows apparently adds it when calculating the
// dialog units size in pixels
#if wxDIALOG_UNIT_COMPATIBILITY
return wxGetTextMetrics(this).tmAveCharWidth ;
#else
return wxGetTextMetrics(this).tmAveCharWidth + 1;
#endif
}
void wxWindow::GetTextExtent(const wxString& string,
@@ -4279,21 +4283,25 @@ static TEXTMETRIC wxGetTextMetrics(const wxWindow *win)
HWND hwnd = GetHwndOf(win);
HDC hdc = ::GetDC(hwnd);
#if !wxDIALOG_UNIT_COMPATIBILITY
// and select the current font into it
HFONT hfont = GetHfontOf(win->GetFont());
if ( hfont )
{
hfont = (HFONT)::SelectObject(hdc, hfont);
}
#endif
// finally retrieve the text metrics from it
GetTextMetrics(hdc, &tm);
#if !wxDIALOG_UNIT_COMPATIBILITY
// and clean up
if ( hfont )
{
(void)::SelectObject(hdc, hfont);
}
#endif
::ReleaseDC(hwnd, hdc);