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
makefile.unx.in
wxinstall
Makefile
makefile.unx.in
wxinstall
Makefile
+descrip.mms
+setup.h_vms
+src/common/descrip.mms
distrib/msw/*.rsp
distrib/msw/*.bat
distrib/msw/*.rsp
distrib/msw/*.bat
src/Makefile
locale/Makefile
samples/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
samples/caret/Makefile.in
samples/checklst/Makefile.in
samples/config/Makefile.in
samples/typetest/Makefile.in
samples/validate/Makefile.in
samples/wizard/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/font/Makefile.in
samples/menu/Makefile.in
samples/console/Makefile.in
-samples/life/Makefile.in
samples/calendar/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
utils/glcanvas/motif/Makefile.in
utils/Makefile.in
utils/wxMMedia2/Makefile.in
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
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.
Unarchive the required files plus any optional documentation
files into a suitable directory such as c:\wx.
Using makefiles:
1. Make sure your WXWIN variable is set.
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:
to make the wxWindows core library without debug information
(wx\lib\wx.lib).
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.
4. Change directory to wx\samples and type 'nmake -f makefile.vc'
to make all the samples. You can also make them individually.
// IMPLEMENTATION
#ifdef __WIN16__
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
// IMPLEMENTATION
#ifdef __WIN16__
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
- virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+ virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
protected:
virtual wxSize DoGetBestSize() const;
protected:
virtual wxSize DoGetBestSize() const;
else if (itemType == wxString(wxT("wxMessage")) || itemType == wxString(wxT("wxStaticText")) ||
itemType == wxString(wxT("wxStaticBitmap")))
{
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();
{
// Bitmap message
wxBitmap bitmap = childResource->GetBitmap();
((wxItemResource*) childResource)->SetBitmap(bitmap);
}
#if wxUSE_BITMAP_MESSAGE
((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());
if (bitmap.Ok())
control = new wxStaticBitmap(parent, id, bitmap, pos, size,
childResource->GetStyle(), childResource->GetName());
// reason to revert to the backward compatible behaviour - but I still
// leave this possibility just in case.
// 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
// ---------------------------------------------------------------------------
// private functions
+// We need this or the control can never be moved e.g. in Dialog Editor.
long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
WXWPARAM wParam,
WXLPARAM lParam)
long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
WXWPARAM wParam,
WXLPARAM lParam)
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
}
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
}
- 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;
{
wxMessageBox("Could not read file.", "Resource file load error", wxOK | wxICON_EXCLAMATION);
return FALSE;
bool wxResourceManager::DeleteResource(wxWindow *win)
{
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();
{
// 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);
if (childHandler->IsSelected())
{
RemoveSelection(item);
}
case OBJECT_MENU_DELETE:
{
}
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);
wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data);
wxResourceManager::GetCurrentResourceManager()->DeleteResource(data);
wxResourceManager::GetCurrentResourceManager()->DeleteWindow(data);
#ifndef _RESEDITR_H_
#define _RESEDITR_H_
#ifndef _RESEDITR_H_
#define _RESEDITR_H_
-#define wxDIALOG_EDITOR_VERSION 1.6
+#define wxDIALOG_EDITOR_VERSION 1.7
#ifdef __GNUG__
#pragma interface "reseditr.h"
#ifdef __GNUG__
#pragma interface "reseditr.h"
project.SetIncludeDirs(wxStringList("../../../include", 0));
project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
project.SetLibDirs(wxStringList("../../../lib", 0));
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");
project.SetProjectName("DialogEdVC");
project.SetTargetName("dialoged");
project.SetIncludeDirs(wxStringList("../../../include", 0));
project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
project.SetLibDirs(wxStringList("../../../lib", 0));
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");
project.SetProjectName("Tex2RTFVC");
project.SetTargetName("tex2rtf");
project.SetIncludeDirs(wxStringList("../../../include", 0));
project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
project.SetLibDirs(wxStringList("../../../lib", 0));
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");
project.SetProjectName("HelpGenVC");
project.SetTargetName("helpgen");
project.SetIncludeDirs(wxStringList("../../include", 0));
project.SetResourceIncludeDirs(wxStringList("../../include", 0));
project.SetLibDirs(wxStringList("../../lib", 0));
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");
project.SetProjectName("ProjGenVC");
project.SetTargetName("makeproj");
project.SetIncludeDirs(wxStringList("../../../include", 0));
project.SetResourceIncludeDirs(wxStringList("../../../include", 0));
project.SetLibDirs(wxStringList("../../../lib", 0));
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");
project.SetProjectName("TreeSampleVC");
project.SetTargetName("test");
project.SetIncludeDirs(wxStringList("../../../../include", "../../src", 0));
project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
project.SetLibDirs(wxStringList("../../../../lib", 0));
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");
project.SetExtraLibs(wxStringList("ogl.lib", 0));
project.SetProjectName("OGLEditVC");
project.SetIncludeDirs(wxStringList("../../../../include", "../../src", 0));
project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
project.SetLibDirs(wxStringList("../../../../lib", 0));
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");
project.SetExtraLibs(wxStringList("ogl.lib", 0));
project.SetProjectName("StudioVC");
project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
project.SetLibDirs(wxStringList("../../../../lib", 0));
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");
project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
project.SetProjectName("CubeVC");
project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
project.SetLibDirs(wxStringList("../../../../lib", 0));
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");
project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
project.SetProjectName("IsoSurfVC");
project.SetIncludeDirs(wxStringList("../../../../include", "../../win", 0));
project.SetResourceIncludeDirs(wxStringList("../../../../include", 0));
project.SetLibDirs(wxStringList("../../../../lib", 0));
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");
project.SetExtraLibs(wxStringList("glcanvas.lib", "opengl32.lib", "glu32.lib", 0));
project.SetProjectName("PenguinVC");