]> git.saurik.com Git - wxWidgets.git/commitdiff
Set RADIOBTN_PARENT_IS_RADIOBOX to 0 (sorry, but...); fixed a
authorJulian Smart <julian@anthemion.co.uk>
Thu, 13 Jan 2000 13:17:19 +0000 (13:17 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 13 Jan 2000 13:17:19 +0000 (13:17 +0000)
Dialog Editor crash problem; made wxStaticBitmap movable again

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

distrib/msw/generic.rsp
distrib/msw/makefile.rsp
docs/msw/install.txt
include/wx/msw/statbmp.h
src/common/resource.cpp
src/msw/radiobox.cpp
src/msw/statbmp.cpp
utils/dialoged/src/reseditr.cpp
utils/dialoged/src/reseditr.h
utils/projgen/makeproj.cpp

index 968c22792643bf2baf73767028f17d965bf69c8b..be8de8a80396a7d14b98eb713b6cf03e0507de8f 100644 (file)
@@ -19,6 +19,9 @@ wx-config.in
 makefile.unx.in
 wxinstall
 Makefile
+descrip.mms
+setup.h_vms
+src/common/descrip.mms
 
 distrib/msw/*.rsp
 distrib/msw/*.bat
index 4293b1f919e5badca9bc614ed12c2bc8e43c0386..059a8f9199ebdc9b7da72714a52d31da4bade034 100644 (file)
@@ -2,7 +2,6 @@ Makefile.in
 src/Makefile
 locale/Makefile
 samples/Makefile.in
-samples/bombs/Makefile.in
 samples/caret/Makefile.in
 samples/checklst/Makefile.in
 samples/config/Makefile.in
@@ -43,14 +42,17 @@ samples/treectrl/Makefile.in
 samples/typetest/Makefile.in
 samples/validate/Makefile.in
 samples/wizard/Makefile.in
-samples/wxpoem/Makefile.in
-samples/wxsocket/Makefile.in
-samples/nettest/Makefile.in
+samples/socket/Makefile.in
+samples/dialup/Makefile.in
 samples/font/Makefile.in
 samples/menu/Makefile.in
 samples/console/Makefile.in
-samples/life/Makefile.in
 samples/calendar/Makefile.in
+demos/bombs/Makefile.in
+demos/forty/Makefile.in
+demos/fractal/Makefile.in
+demos/poem/Makefile.in
+demos/life/Makefile.in
 utils/glcanvas/motif/Makefile.in
 utils/Makefile.in
 utils/wxMMedia2/Makefile.in
index a12338bef151ab8fd63037726df09b7f15f49860..3a5e7d719a505acdcea883cc84eb65f34002837c 100644 (file)
@@ -48,6 +48,7 @@ wx2_x_y_vc.zip             MS VC++ 5.0 project files
 wx2_x_y_cw.zip             Metrowerks CodeWarrior project files
 wx2_x_y_bc.zip             BC++ 5 project files
 jpeg.zip                   Use this to allow wxImage to read and write JPEG files
+tiff.zip                   Use this to allow wxImage to read and write TIFF files
 
 Unarchive the required files plus any optional documentation
 files into a suitable directory such as c:\wx.
@@ -100,7 +101,11 @@ Using project files:
 Using makefiles:
 
 1. Make sure your WXWIN variable is set.
-2. Change directory to wx\src\msw. Type:
+2. If you do NOT have the TIFF or JPEG source code, please remove
+   the tiff and jpeg targets from the 'all' target in
+   src\msw\makefile.vc. Also ensure the settings in
+   include\wx\msw\setup.h specify not to use JPEG or TIFF.
+3. Change directory to wx\src\msw. Type:
 
   'nmake -f makefile.vc'
 
@@ -111,9 +116,6 @@ Using makefiles:
 
    to make the wxWindows core library without debug information
    (wx\lib\wx.lib).
-3. If you wish to use JPEG in your applications, do the same
-   procedure in src\jpeg but add the 'all' target to the
-   command line.
 4. Change directory to wx\samples and type 'nmake -f makefile.vc'
    to make all the samples. You can also make them individually.
 
index 85308a7d1347ade8377bb7bce3727b90b6dc5e01..3715b09f7ce6705e0fc075286eda922bd62b37c5 100644 (file)
@@ -67,8 +67,8 @@ public:
     // IMPLEMENTATION
 #ifdef __WIN16__
     virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
-    virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
 #endif // __WIN16__
+    virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
 
 protected:
     virtual wxSize DoGetBestSize() const;
index cd930265e039c8438845ed9e4079cd11af4262e7..19ffdaef1bb55c8bc69e95d8ebc4df38324d8d10 100644 (file)
@@ -347,7 +347,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
    else if (itemType == wxString(wxT("wxMessage")) || itemType == wxString(wxT("wxStaticText")) ||
          itemType == wxString(wxT("wxStaticBitmap")))
       {
-        if (childResource->GetValue4() != wxT(""))
+        if (childResource->GetValue4() != wxT("") || itemType == wxString(wxT("wxStaticBitmap")) )
         {
           // Bitmap message
           wxBitmap bitmap = childResource->GetBitmap();
@@ -357,6 +357,12 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
             ((wxItemResource*) childResource)->SetBitmap(bitmap);
           }
 #if wxUSE_BITMAP_MESSAGE
+#ifdef __WXMSW__
+          // Use a default bitmap
+          if (!bitmap.Ok())
+             bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
+#endif
+
           if (bitmap.Ok())
            control = new wxStaticBitmap(parent, id, bitmap, pos, size,
              childResource->GetStyle(), childResource->GetName());
index 7aaff04b2115c30fcf529255681d009d98873d8f..26868c3ec0f0ada5f779cefc84d74f2789f80cf2 100644 (file)
@@ -56,7 +56,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
 //     reason to revert to the backward compatible behaviour - but I still
 //     leave this possibility just in case.
 
-#define RADIOBTN_PARENT_IS_RADIOBOX 1
+#define RADIOBTN_PARENT_IS_RADIOBOX 0
 
 // ---------------------------------------------------------------------------
 // private functions
index da32aead681f8571f625018d05bed2823bf6dc2a..0b47d28c656bcd04e0f73e3bd319e08647ea1980 100644 (file)
@@ -216,7 +216,9 @@ bool wxStaticBitmap::MSWOnDraw(WXDRAWITEMSTRUCT *item)
 
     return TRUE;
 }
+#endif // Win16
 
+// We need this or the control can never be moved e.g. in Dialog Editor.
 long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
                                    WXWPARAM wParam,
                                    WXLPARAM lParam)
@@ -228,4 +230,4 @@ long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
 
     return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
 }
-#endif // Win16
+
index 6ec0f160a3889e3d2022190f00a91555a102c5ce..5d68f37e81e8b610d11da4136a3a0a3e7b1f2091 100644 (file)
@@ -427,7 +427,7 @@ bool wxResourceManager::New(bool loadFromFile, const wxString& filename)
         return FALSE;
     }
     
-    if (!m_resourceTable.ParseResourceFile(WXSTRINGCAST str))
+    if (!m_resourceTable.ParseResourceFile(str))
     {
       wxMessageBox("Could not read file.", "Resource file load error", wxOK | wxICON_EXCLAMATION);
       return FALSE;
@@ -1486,12 +1486,15 @@ bool wxResourceManager::DeleteResource(wxItemResource *res)
 
 bool wxResourceManager::DeleteResource(wxWindow *win)
 {
-  if (win->IsKindOf(CLASSINFO(wxControl)))
+  if (win->IsKindOf(CLASSINFO(wxControl)) && (win->GetEventHandler() != win))
   {
     // Deselect and refresh window in case we leave selection
     // handles behind
     wxControl *item = (wxControl *)win;
     wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
+
+    wxASSERT_MSG( win->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorControlHandler)), "Wrong kind of handler in DeleteResource" );
+
     if (childHandler->IsSelected())
     {
       RemoveSelection(item);
@@ -2241,6 +2244,22 @@ void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event)
     }
     case OBJECT_MENU_DELETE:
     {
+      if (data->IsKindOf(CLASSINFO(wxControl)) && (data->GetEventHandler() != data))
+      {
+         // Deselect and refresh window in case we leave selection
+         // handles behind
+         wxControl *item = (wxControl *)data;
+         wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
+         if (childHandler->IsSelected())
+         {
+            wxResourceManager::GetCurrentResourceManager()->RemoveSelection(item);
+            childHandler->SelectItem(FALSE);
+#ifndef __WXGTK__
+            item->GetParent()->Refresh();
+#endif
+         }
+      } 
+
       wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data);
       wxResourceManager::GetCurrentResourceManager()->DeleteResource(data);
       wxResourceManager::GetCurrentResourceManager()->DeleteWindow(data);
index c0b2c6840b0471329c4690c07a2f57ff9fd7687b..00e57587cb51e0cf1167f2c2ce8231d59fbb08b9 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _RESEDITR_H_
 #define _RESEDITR_H_
 
-#define wxDIALOG_EDITOR_VERSION 1.6
+#define wxDIALOG_EDITOR_VERSION 1.7
 
 #ifdef __GNUG__
 #pragma interface "reseditr.h"
index 4b7fcda40f1eec35f862cef37e309093285bc038..15a63fc23319f2ab42b9654e9acdb9913fc79db6 100644 (file)
@@ -311,8 +311,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../src/Debug", "../../../src/jpeg/Debug", "../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../src/Release", "../../../src/jpeg/Release", "../../../tiff/Release", 0));
 
     project.SetProjectName("DialogEdVC");
     project.SetTargetName("dialoged");
@@ -333,8 +333,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../src/Debug", "../../../src/jpeg/Debug", "../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../src/Release", "../../../src/jpeg/Release", "../../../tiff/Release", 0));
 
     project.SetProjectName("Tex2RTFVC");
     project.SetTargetName("tex2rtf");
@@ -354,8 +354,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../src/Debug", "../../../src/jpeg/Debug", "../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../src/Release", "../../../src/jpeg/Release", "../../../tiff/Release", 0));
 
     project.SetProjectName("HelpGenVC");
     project.SetTargetName("helpgen");
@@ -376,8 +376,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../include", 0));
     project.SetLibDirs(wxStringList("../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../src/Debug", "../../src/jpeg/Debug", "../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../src/Release", "../../src/jpeg/Release", "../../tiff/Release", 0));
 
     project.SetProjectName("ProjGenVC");
     project.SetTargetName("makeproj");
@@ -395,8 +395,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../include", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
     project.SetLibDirs(wxStringList("../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../src/Debug", "../../../src/jpeg/Debug", "../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../src/Release", "../../../src/jpeg/Release", "../../../tiff/Release", 0));
 
     project.SetProjectName("TreeSampleVC");
     project.SetTargetName("test");
@@ -414,8 +414,9 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../../include", "../../src", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
     project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../src/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", "../../../../src/jpeg/Release", "../../../../tiff/Release", 0));
+
     project.SetExtraLibs(wxStringList("ogl.lib", 0));
 
     project.SetProjectName("OGLEditVC");
@@ -436,8 +437,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../../include", "../../src", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
     project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../src/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../src/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../src/Release", "../../../../src/jpeg/Release", "../../../../tiff/Release", 0));
     project.SetExtraLibs(wxStringList("ogl.lib", 0));
 
     project.SetProjectName("StudioVC");
@@ -460,8 +461,9 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
     project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", "../../../../src/jpeg/Release", "../../../../tiff/Release", 0));
+
     project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
 
     project.SetProjectName("CubeVC");
@@ -481,8 +483,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
     project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", "../../../../src/jpeg/Release", "../../../../tiff/Release", 0));
     project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
 
     project.SetProjectName("IsoSurfVC");
@@ -502,8 +504,8 @@ void MyApp::GenerateSamples(const wxString& dir)
     project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
     project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
     project.SetLibDirs(wxStringList("../../../../lib", 0));
-    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", 0));
-    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", 0));
+    project.SetDebugLibDirs(wxStringList("../../../../src/Debug", "../../win/Debug", "../../../../src/jpeg/Debug", "../../../../src/tiff/Debug", 0));
+    project.SetReleaseLibDirs(wxStringList("../../../../src/Release", "../../win/Release", "../../../../src/jpeg/Release", "../../../../tiff/Release", 0));
     project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
 
     project.SetProjectName("PenguinVC");