]> git.saurik.com Git - wxWidgets.git/commitdiff
Removed ::UpdateWindow from scrolwin.cpp; corrected default extension appending;
authorJulian Smart <julian@anthemion.co.uk>
Thu, 13 Jan 2000 09:40:24 +0000 (09:40 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 13 Jan 2000 09:40:24 +0000 (09:40 +0000)
corrected bug in dcprint.cpp that tried to access deleted memory

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

distrib/msw/tmake/b32.t
docs/bugs.txt
src/generic/scrolwin.cpp
src/msw/dcprint.cpp
src/msw/filedlg.cpp
src/msw/makefile.b32

index def9fe133390349116b83ec84b35583759da7288..c81b74c2f7201ad1cfce6afb339826cf0e3dac1b 100644 (file)
@@ -325,6 +325,7 @@ $(CFG): makefile.b32
 -H=$(WXDIR)\src\msw\wx32.csm
 -3
 -d
+-a1 # byte alignment
 -R-
 -X
 -w-par
index 4352dc858795935c3b94e810bd33092b8ff9ca74..db2b75abb0b35fe30f1720c94c28de4915c8c866 100644 (file)
@@ -326,6 +326,28 @@ WORKAROUND: Change the declaration to void * or long
 visitor_email_address: rjl@zk3.dec.com
 wxWINDOWS+VERSION: 2.1.10
 
+DATE+FIXED: 12/01/2000
+DATE+IDENTIFIED: 12/01/2000
+DETAILS: When I try to Print or create
+wxPrintPreview object in the
+printing sample, it fails.
+The reason is the wxGetDefaultDeviceName
+function in file msw/dcprint.cpp. In line 253
+the memory is freed, and then
+the pointer to the freed memory
+is used.
+FIXED+BY: Alexey V. Exarevsky (patched into wxWin 12/1/2000 by JACS)
+IDENTIFIED+BY: Alexey V. Exarevsky
+PLATFORMS: wxMSW, compiled by VC++ 6.0
+SHORT+DESCRIPTION: Print/Print preveiw to default printer in NT
+Submit: Submit
+WORKAROUND: I have moved lines that free
+memory below the lines that
+use lpszDeviceName and 
+lpszPortName
+visitor_email_address: ave@relex.ru
+wxWINDOWS+VERSION: 2.1.11
+
 
 ---------------------------END OF BUGLIST-------------------------
 
index a582eb959f8faea70a28ef0a8d8956ddf68271f9..caec7706091846f614af911e76edc2de0bb8de1a 100644 (file)
@@ -157,8 +157,8 @@ void wxScrolledWindow::SetScrollbars (int pixelsPerUnitX, int pixelsPerUnitY,
        m_targetWindow->Refresh(); 
    
 #ifdef __WXMSW__
-   // Necessary?
-    UpdateWindow ((HWND) m_targetWindow->GetHWND());
+    // Necessary?
+    // UpdateWindow ((HWND) m_targetWindow->GetHWND());
 #endif
 #ifdef __WXMAC__
                m_targetWindow->MacUpdateImmediately() ;
index 05daa7826dca9467b5b681952548fd3725c3bbd4..35c9be54be32ce76eb13192b1646ca4b576b6857 100644 (file)
@@ -247,12 +247,13 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
         lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset;
         lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset;
         lpszPortName   = (LPSTR)lpDevNames + lpDevNames->wOutputOffset;
-        GlobalUnlock(pd.hDevNames);
-        GlobalFree(pd.hDevNames);
-        pd.hDevNames=NULL;
 
         deviceName = lpszDeviceName;
         portName = lpszPortName;
+
+        GlobalUnlock(pd.hDevNames);
+        GlobalFree(pd.hDevNames);
+        pd.hDevNames=NULL;
     }
 
     if (pd.hDevMode)
index 0bc3273b386759b9c6b6525d0c971b5eff9258a6..17612e6fca7ab4bc381cdda26cd91cee24f59a45 100644 (file)
@@ -356,7 +356,7 @@ int wxFileDialog::ShowModal()
 
             m_filterIndex = (int)of.nFilterIndex - 1;
 
-            if ( of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != wxT('.') )
+            if ( !of.nFileExtension || (of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != wxT('.')) )
             {                                    // user has typed an filename
                 // without an extension:
 
index 5a93432c83ab6aa626a2112daf271b4fa6cc1d5d..b8fb7f9e5e4614c8a27d08ca8c61e22b9fccd185 100644 (file)
@@ -913,6 +913,7 @@ $(CFG): makefile.b32
 -H=$(WXDIR)\src\msw\wx32.csm
 -3
 -d
+-a1 # byte alignment
 -R-
 -X
 -w-par