From 58abfef64f8b685c8e77a608f24cb1b618e3c83c Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Tue, 6 Apr 1999 12:55:44 +0000
Subject: [PATCH] Fixed OnMenuHighlight, wxPrintData problems

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/filedlg.tex  | 5 +----
 docs/latex/wx/function.tex | 2 +-
 docs/latex/wx/menu.tex     | 6 +++---
 src/common/cmndata.cpp     | 4 ++++
 src/makevc.env             | 2 +-
 src/msw/frame.cpp          | 4 ++--
 6 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/docs/latex/wx/filedlg.tex b/docs/latex/wx/filedlg.tex
index 1631a49d12..f21fb1ad4e 100644
--- a/docs/latex/wx/filedlg.tex
+++ b/docs/latex/wx/filedlg.tex
@@ -16,9 +16,6 @@ This class represents the file chooser dialog.
 \wxheading{See also}
 
 \helpref{wxFileDialog overview}{wxfiledialogoverview}, \helpref{wxFileSelector}{wxfileselector}
-%\rtfsp\helpref{wxFileSelectorEx}{wxfileselectorex}
-%\helpref{wxLoadFileSelector}{wxloadfileselector},\rtfsp
-%\helpref{wxSaveFileSelector}{wxsavefileselector}
 
 \wxheading{Remarks}
 
@@ -43,7 +40,7 @@ Under Windows (only), the wildcard may be a specification for multiple
 types of file with a description for each, such as:
 
 \begin{verbatim}
- "BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif"
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
 \end{verbatim}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index 670204264c..39a1950da3 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -433,7 +433,7 @@ Under Windows (only), the wildcard may be a specification for multiple
 types of file with a description for each, such as:
 
 \begin{verbatim}
- "BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif"
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
 \end{verbatim}
 
 The application must check for an empty return value (the user pressed
diff --git a/docs/latex/wx/menu.tex b/docs/latex/wx/menu.tex
index 9823528169..cf8c61dcc8 100644
--- a/docs/latex/wx/menu.tex
+++ b/docs/latex/wx/menu.tex
@@ -199,7 +199,7 @@ before matching.
 
 \helpref{wxMenu::FindItemForId}{wxmenufinditemforid}
 
-\membersection{wxMenu::FindItemForId}\label{wxmenufinditemforid}
+\membersection{wxMenu::FindItemForId}\label{wxmenufinditem}
 
 \constfunc{wxMenuItem*}{FindItemForId}{\param{int}{ id}, \param{wxMenu **}{ menuForItem = NULL}}
 
@@ -504,9 +504,9 @@ The menu item identifier, or -1 if none was found.
 Any special menu codes are stripped out of source and target strings
 before matching.
 
-\membersection{wxMenuBar::FindItemById}\label{wxmenubarfinditembyid}
+\membersection{wxMenuBar::FindItemForId}\label{wxmenubarfinditemforid}
 
-\constfunc{wxMenuItem *}{FindItemById}{\param{int}{ id}}
+\constfunc{wxMenuItem *}{FindItemForId}{\param{int}{ id}}
 
 Finds the menu item object associated with the given menu item identifier,
 
diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp
index ab9bc7b4e2..872e8e4b6e 100644
--- a/src/common/cmndata.cpp
+++ b/src/common/cmndata.cpp
@@ -198,6 +198,10 @@ wxPrintData::wxPrintData()
 
 wxPrintData::wxPrintData(const wxPrintData& printData)
 {
+#ifdef __WXMSW__
+    m_devMode = NULL;
+#endif
+
     (*this) = printData;
 }
 
diff --git a/src/makevc.env b/src/makevc.env
index b8166cc439..28a66ef729 100644
--- a/src/makevc.env
+++ b/src/makevc.env
@@ -131,7 +131,7 @@ D=$(D)DLL
 
 WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
 
-INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(EXTRAINC)
+INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib -I$(WXDIR)/src/jpeg $(EXTRAINC)
 LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\xpm.lib
 
 MAKEPRECOMP=/YcWX/WXPREC.H
diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp
index 5c9b873da5..0099a31787 100644
--- a/src/msw/frame.cpp
+++ b/src/msw/frame.cpp
@@ -761,7 +761,7 @@ void wxFrame::MSWOnMenuHighlight(WXWORD nItem, WXWORD nFlags, WXHMENU hSysMenu)
     event.SetEventObject( this );
     GetEventHandler()->ProcessEvent(event);
   }
-  else if (nFlags != MF_SEPARATOR)
+  else if ((nFlags != MF_SEPARATOR) && (nItem != 0) && (nItem != 65535))
   {
     wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, nItem);
     event.SetEventObject( this );
@@ -863,7 +863,7 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
     if ( menuId != -1 )
     {
       wxMenuBar *menuBar = GetMenuBar();
-      if (menuBar)
+      if (menuBar && menuBar->FindItem(menuId))
       {
         // set status text even if the string is empty - this will at
         // least remove the string from the item which was previously
-- 
2.50.0

