This commit was manufactured by cvs2svn to create tag 'WX_2_2_9'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_2_9@13364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
197
samples/treectrl/TreectrlVC.dsp
Normal file
197
samples/treectrl/TreectrlVC.dsp
Normal file
@@ -0,0 +1,197 @@
|
||||
# Microsoft Developer Studio Project File - Name="TreectrlVC" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=TreectrlVC - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "TreectrlVC.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "TreectrlVC.mak" CFG="TreectrlVC - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "TreectrlVC - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "TreectrlVC - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "TreectrlVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "TreectrlVC - Win32 Release DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "TreectrlVC - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/treetest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/treetest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DebugDLL"
|
||||
# PROP BASE Intermediate_Dir "DebugDLL"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "DebugDLL"
|
||||
# PROP Intermediate_Dir "DebugDLL"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/treetest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Release DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "ReleaseDLL"
|
||||
# PROP BASE Intermediate_Dir "ReleaseDLL"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "ReleaseDLL"
|
||||
# PROP Intermediate_Dir "ReleaseDLL"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/treetest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "TreectrlVC - Win32 Release"
|
||||
# Name "TreectrlVC - Win32 Debug"
|
||||
# Name "TreectrlVC - Win32 Debug DLL"
|
||||
# Name "TreectrlVC - Win32 Release DLL"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\treectrl.cpp
|
||||
|
||||
!IF "$(CFG)" == "TreectrlVC - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug"
|
||||
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug DLL"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Release DLL"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\treectrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\treectrl.rc
|
||||
|
||||
!IF "$(CFG)" == "TreectrlVC - Win32 Release"
|
||||
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug"
|
||||
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409 /i "../../include" /i "../../contrib/include"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug DLL"
|
||||
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Release DLL"
|
||||
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
29
samples/treectrl/TreectrlVC.dsw
Normal file
29
samples/treectrl/TreectrlVC.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "TreectrlVC"=.\TreectrlVC.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -6,5 +6,5 @@ WXDIR = ../..
|
||||
TARGET=treectrl
|
||||
OBJECTS = $(TARGET).o
|
||||
|
||||
include $(WXDIR)\src\makeprog.g95
|
||||
include $(WXDIR)/src/makeprog.g95
|
||||
|
||||
|
||||
@@ -9,9 +9,12 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// important: the #pragma argument must be different from treectrl.cpp,
|
||||
// otherwise gcc gets confused (as there is also treectrl.cpp in the library
|
||||
// which has identical #pragma) and the sample crashes on startup!
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#pragma interface
|
||||
#pragma interface "treetest.cpp"
|
||||
#pragma implementation "treetest.cpp"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
@@ -428,7 +431,18 @@ void MyFrame::OnSetImageSize(wxCommandEvent& event)
|
||||
|
||||
void MyFrame::OnToggleImages(wxCommandEvent& event)
|
||||
{
|
||||
wxGetApp().SetShowImages(!wxGetApp().ShowImages());
|
||||
if ( wxGetApp().ShowImages() )
|
||||
{
|
||||
m_treeCtrl->CreateImageList(-1);
|
||||
|
||||
wxGetApp().SetShowImages(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_treeCtrl->CreateImageList();
|
||||
|
||||
wxGetApp().SetShowImages(TRUE);
|
||||
}
|
||||
|
||||
OnRecreate(event);
|
||||
}
|
||||
@@ -522,42 +536,42 @@ void MyTreeCtrl::CreateImageList(int size)
|
||||
if ( size == -1 )
|
||||
{
|
||||
m_imageListNormal = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Make an image list containing small icons
|
||||
m_imageListNormal = new wxImageList(size, size, TRUE);
|
||||
|
||||
// should correspond to TreeCtrlIcon_xxx enum
|
||||
#if defined(__WXMSW__) && defined(__WIN16__)
|
||||
m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap3", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap4", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap5", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
#else
|
||||
wxIcon icons[5];
|
||||
icons[0] = wxICON(icon1);
|
||||
icons[1] = wxICON(icon2);
|
||||
icons[2] = wxICON(icon3);
|
||||
icons[3] = wxICON(icon4);
|
||||
icons[4] = wxICON(icon5);
|
||||
|
||||
int sizeOrig = icons[0].GetWidth();
|
||||
for ( size_t i = 0; i < WXSIZEOF(icons); i++ )
|
||||
else
|
||||
{
|
||||
if ( size == sizeOrig )
|
||||
// Make an image list containing small icons
|
||||
m_imageListNormal = new wxImageList(size, size, TRUE);
|
||||
|
||||
// should correspond to TreeCtrlIcon_xxx enum
|
||||
#if defined(__WXMSW__) && defined(__WIN16__)
|
||||
m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap3", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap4", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap5", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
#else // !MSW
|
||||
wxIcon icons[5];
|
||||
icons[0] = wxICON(icon1);
|
||||
icons[1] = wxICON(icon2);
|
||||
icons[2] = wxICON(icon3);
|
||||
icons[3] = wxICON(icon4);
|
||||
icons[4] = wxICON(icon5);
|
||||
|
||||
int sizeOrig = icons[0].GetWidth();
|
||||
for ( size_t i = 0; i < WXSIZEOF(icons); i++ )
|
||||
{
|
||||
m_imageListNormal->Add(icons[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_imageListNormal->Add(wxImage(icons[i]).Rescale(size, size).
|
||||
ConvertToBitmap());
|
||||
if ( size == sizeOrig )
|
||||
{
|
||||
m_imageListNormal->Add(icons[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_imageListNormal->Add(wxImage(icons[i]).Rescale(size, size).
|
||||
ConvertToBitmap());
|
||||
}
|
||||
}
|
||||
#endif // MSW/!MSW
|
||||
}
|
||||
#endif
|
||||
|
||||
SetImageList(m_imageListNormal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user