Reuse common sample resources. Little code cleanup. Removed unused files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2006-07-20 11:57:15 +00:00
parent f21467d8ec
commit 0bcd4039e2
21 changed files with 48 additions and 216 deletions

View File

@ -17,13 +17,13 @@
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#include "wx/wx.h"
#endif
#include "wx/datetime.h"
#ifndef __WXMSW__
#include "mondrian.xpm"
#include "../sample.xpm"
#endif
#include "wx/dataview.h"
@ -325,11 +325,7 @@ bool MyApp::OnInit(void)
MyFrame::MyFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h):
wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
{
#ifdef __WXMSW__
SetIcon(wxIcon(_T("mondrian")));
#else
SetIcon(wxIcon(mondrian_xpm));
#endif
SetIcon(wxICON(sample));
wxMenu *file_menu = new wxMenu;
@ -347,7 +343,7 @@ MyFrame::MyFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h):
CreateStatusBar();
wxPanel *panel = new wxPanel( this, -1 );
wxPanel *panel = new wxPanel( this, wxID_ANY );
// Left wxDataViewCtrl
@ -421,11 +417,7 @@ END_EVENT_TABLE()
MySortingFrame::MySortingFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h):
wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
{
#ifdef __WXMSW__
SetIcon(wxIcon(_T("mondrian")));
#else
SetIcon(wxIcon(mondrian_xpm));
#endif
SetIcon(wxICON(sample));
wxMenu *file_menu = new wxMenu;

View File

@ -1,2 +0,0 @@
#include "wx/msw/wx.rc"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

View File

@ -1,44 +0,0 @@
/* XPM */
static char *mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 6 1",
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" "
};

View File

@ -101,7 +101,7 @@ COND_MONOLITHIC_0___WXLIB_CORE_p = \
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
@COND_PLATFORM_WIN32_1@__validate___win32rc = validate_validate_rc.o
@COND_PLATFORM_WIN32_1@__validate___win32rc = validate_sample_rc.o
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@ -181,7 +181,7 @@ validate.app/Contents/PkgInfo: validate$(EXEEXT) $(top_srcdir)/src/mac/carbon/In
validate_validate.o: $(srcdir)/validate.cpp
$(CXXC) -c -o $@ $(VALIDATE_CXXFLAGS) $(srcdir)/validate.cpp
validate_validate_rc.o: $(srcdir)/validate.rc
validate_sample_rc.o: $(srcdir)/../sample.rc
$(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_2) $(__EXCEPTIONS_DEFINE_p_2) $(__RTTI_DEFINE_p_2) $(__THREAD_DEFINE_p_2) --include-dir $(srcdir) $(__DLLFLAG_p_2) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_1) --include-dir $(top_srcdir)/include

View File

@ -212,14 +212,14 @@ clean:
-if exist $(OBJS)\validate.ilf del $(OBJS)\validate.ilf
-if exist $(OBJS)\validate.ils del $(OBJS)\validate.ils
$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res
$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_sample.res
ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&|
c0w32.obj $(VALIDATE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\validate_validate.res
c0w32.obj $(VALIDATE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\validate_sample.res
|
$(OBJS)\validate_validate.obj: .\validate.cpp
$(CXX) -q -c -P -o$@ $(VALIDATE_CXXFLAGS) $**
$(OBJS)\validate_validate.res: .\validate.rc
$(OBJS)\validate_sample.res: .\..\sample.rc
brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) -i$(SETUPHDIR) -i.\..\..\include -i. $(__DLLFLAG_p_1) -i.\..\..\samples -dNOPCH $**

View File

@ -1,10 +0,0 @@
# Purpose: makefile for validate example (VC++ 1.5x)
# Created: 2000-03-14
WXDIR = $(WXWIN)
TARGET=validate
OBJECTS=$(TARGET).obj
!include $(WXDIR)\src\makeprog.msc

View File

@ -28,7 +28,7 @@ VALIDATE_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
$(CPPFLAGS) $(CXXFLAGS)
VALIDATE_OBJECTS = \
$(OBJS)\validate_validate.o \
$(OBJS)\validate_validate_rc.o
$(OBJS)\validate_sample_rc.o
### Conditionally set variables: ###
@ -207,13 +207,13 @@ clean:
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\validate.exe del $(OBJS)\validate.exe
$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_validate_rc.o
$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_sample_rc.o
$(CXX) -o $@ $(VALIDATE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
$(OBJS)\validate_validate.o: ./validate.cpp
$(CXX) -c -o $@ $(VALIDATE_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\validate_validate_rc.o: ./validate.rc
$(OBJS)\validate_sample_rc.o: ./../sample.rc
windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../include --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples --define NOPCH
.PHONY: all clean

View File

@ -1,6 +0,0 @@
#Makefile from wxHatch for Symantec/Digital Mars compiler
WXDIR=..\..
TARGET=validate
OBJECTS = $(TARGET).obj
EXTRALIBS =
include $(WXDIR)\src\makeprog.sc

View File

@ -1,14 +0,0 @@
# Purpose: makefile for validate example (Salford C++)
# Created: 2000-03-14
PROGRAM = validate
OBJECTS = $(PROGRAM).obj
include ..\..\src\makeprog.sl
all: wx $(TARGET)
wx:
cd $(WXDIR)\src\msw ^ mk32 -f makefile.sl all
cd $(WXDIR)\samples\validate

View File

@ -1,23 +0,0 @@
# Purpose: makefile for validate example (Unix)
# Created: 2000-03-14
CXX = $(shell wx-config --cxx)
PROGRAM = validate
OBJECTS = $(PROGRAM).o
# implementation
.SUFFIXES: .o .cpp
.cpp.o :
$(CXX) -c `wx-config --cxxflags` -o $@ $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CXX) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

@ -28,7 +28,7 @@ VALIDATE_CXXFLAGS = /M$(__RUNTIME_LIBS_8)$(__DEBUGRUNTIME_3) /DWIN32 \
$(CXXFLAGS)
VALIDATE_OBJECTS = \
$(OBJS)\validate_validate.obj \
$(OBJS)\validate_validate.res
$(OBJS)\validate_sample.res
### Conditionally set variables: ###
@ -287,7 +287,7 @@ clean:
-if exist $(OBJS)\validate.ilk del $(OBJS)\validate.ilk
-if exist $(OBJS)\validate.pdb del $(OBJS)\validate.pdb
$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res
$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_sample.res
link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
$(VALIDATE_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib
<<
@ -295,6 +295,6 @@ $(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res
$(OBJS)\validate_validate.obj: .\validate.cpp
$(CXX) /c /nologo /TP /Fo$@ $(VALIDATE_CXXFLAGS) $**
$(OBJS)\validate_validate.res: .\validate.rc
$(OBJS)\validate_sample.res: .\..\sample.rc
rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) $(__NO_VC_CRTDBG_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\include /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\samples /d NOPCH $**

View File

@ -233,7 +233,7 @@ clean : .SYMBOLIC
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\validate.exe del $(OBJS)\validate.exe
$(OBJS)\validate.exe : $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res
$(OBJS)\validate.exe : $(VALIDATE_OBJECTS) $(OBJS)\validate_sample.res
@%create $(OBJS)\validate.lbc
@%append $(OBJS)\validate.lbc option quiet
@%append $(OBJS)\validate.lbc name $^@
@ -241,13 +241,13 @@ $(OBJS)\validate.exe : $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res
@%append $(OBJS)\validate.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
@for %i in ($(VALIDATE_OBJECTS)) do @%append $(OBJS)\validate.lbc file %i
@for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib) do @%append $(OBJS)\validate.lbc library %i
@%append $(OBJS)\validate.lbc option resource=$(OBJS)\validate_validate.res
@%append $(OBJS)\validate.lbc option resource=$(OBJS)\validate_sample.res
@for %i in () do @%append $(OBJS)\validate.lbc option stack=%i
wlink @$(OBJS)\validate.lbc
$(OBJS)\validate_validate.obj : .AUTODEPEND .\validate.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(VALIDATE_CXXFLAGS) $<
$(OBJS)\validate_validate.res : .AUTODEPEND .\validate.rc
$(OBJS)\validate_sample.res : .AUTODEPEND .\..\sample.rc
wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\..\include -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

View File

@ -1,44 +0,0 @@
/* XPM */
static char *mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 6 1",
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" "
};

View File

@ -7,7 +7,7 @@
<sources>validate.cpp</sources>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>validate.rc</win32-res>
<win32-res>../sample.rc</win32-res>
</exe>
</makefile>

View File

@ -19,11 +19,11 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
# pragma hdrstop
#pragma hdrstop
#endif // __BORLANDC__
#ifndef WX_PRECOMP
# include "wx/wx.h"
#include "wx/wx.h"
#endif // WX_PRECOMP
#include "validate.h"
@ -32,6 +32,10 @@
#include "wx/valgen.h"
#include "wx/valtext.h"
#ifndef __WXMSW__
#include "../sample.xpm"
#endif
// ----------------------------------------------------------------------------
// Global data
// ----------------------------------------------------------------------------
@ -89,15 +93,13 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
END_EVENT_TABLE()
MyFrame::MyFrame(wxFrame *frame, const wxString&title, int x, int y, int w, int h)
: wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)),
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)),
m_silent(true)
{
#ifdef __WXMSW__
SetIcon(wxIcon(_T("mondrian")));
#endif // __WXMSW__
SetIcon(wxICON(sample));
// Create a listbox to display the validated data.
m_listbox = new wxListBox(this, -1);
m_listbox = new wxListBox(this, wxID_ANY);
m_listbox->Append(wxString(_T("Try 'File|Test' to see how validators work.")));
wxMenu *file_menu = new wxMenu;
@ -182,8 +184,8 @@ MyDialog::MyDialog( wxWindow *parent, const wxString& title,
// Pointers to some of these controls are saved in member variables
// so that we can use them elsewhere, like this one.
text = new wxTextCtrl(this, VALIDATE_TEXT, wxT(""),
wxPoint(10, 10), wxSize(120, -1), 0,
text = new wxTextCtrl(this, VALIDATE_TEXT, wxEmptyString,
wxPoint(10, 10), wxSize(120, wxDefaultCoord), 0,
wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
flexgridsizer->Add(text);
@ -192,16 +194,16 @@ MyDialog::MyDialog( wxWindow *parent, const wxString& title,
// We don't need any such pointer to query its state, which
// can be gotten directly from g_data.
flexgridsizer->Add(new wxCheckBox(this, VALIDATE_CHECK, wxT("Sample checkbox"),
wxPoint(130, 10), wxSize(120, -1), 0,
wxPoint(130, 10), wxSize(120, wxDefaultCoord), 0,
wxGenericValidator(&g_data.m_checkbox_state)));
flexgridsizer->Add(new wxListBox((wxWindow*)this, VALIDATE_LIST,
wxPoint(10, 30), wxSize(120, -1),
wxPoint(10, 30), wxSize(120, wxDefaultCoord),
3, g_listbox_choices, wxLB_MULTIPLE,
wxGenericValidator(&g_data.m_listbox_choices)));
combobox = new wxComboBox((wxWindow*)this, VALIDATE_COMBO, wxT(""),
wxPoint(130, 30), wxSize(120, -1),
combobox = new wxComboBox((wxWindow*)this, VALIDATE_COMBO, wxEmptyString,
wxPoint(130, 30), wxSize(120, wxDefaultCoord),
3, g_combobox_choices, 0L,
wxGenericValidator(&g_data.m_combobox_choice));
flexgridsizer->Add(combobox);
@ -209,7 +211,7 @@ MyDialog::MyDialog( wxWindow *parent, const wxString& title,
mainsizer->Add(flexgridsizer, 1, wxGROW | wxALL, 10);
mainsizer->Add(new wxRadioBox((wxWindow*)this, VALIDATE_RADIO, wxT("Pick a color"),
wxPoint(10, 100), wxSize(-1, -1),
wxPoint(10, 100), wxDefaultSize,
3, g_radiobox_choices, 1, wxRA_SPECIFY_ROWS,
wxGenericValidator(&g_data.m_radiobox_choice)),
0, wxGROW | wxALL, 10);

View File

@ -468,11 +468,11 @@ LINK32=link.exe
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\validate.cpp
SOURCE=.\..\sample.rc
# End Source File
# Begin Source File
SOURCE=.\validate.rc
SOURCE=.\validate.cpp
# End Source File
# End Group
# End Target

View File

@ -71,14 +71,15 @@ public:
int m_radiobox_choice;
};
#define VALIDATE_DIALOG_ID 200
enum {
VALIDATE_DIALOG_ID = wxID_HIGHEST,
#define VALIDATE_TEST_DIALOG 2
#define VALIDATE_TOGGLE_BELL 3
#define VALIDATE_TEXT 101
#define VALIDATE_LIST 102
#define VALIDATE_CHECK 103
#define VALIDATE_COMBO 105
#define VALIDATE_RADIO 106
VALIDATE_TEST_DIALOG,
VALIDATE_TOGGLE_BELL,
VALIDATE_TEXT,
VALIDATE_LIST,
VALIDATE_CHECK,
VALIDATE_COMBO,
VALIDATE_RADIO
};

View File

@ -1,17 +0,0 @@
# this is the project file for the validate wxWindows sample
# we generate the VC++ IDE project file, comment this line
# to generate a makefile for (n)make
TEMPLATE = vc6app
# wx is mandatory for wxWindows projects
CONFIG = wx
# the configurations of wxWindows we want to use: the value below is the
# default one; possible other values are {Debug|Release}Unicode[Dll]
#WXCONFIGS = Debug Release DebugDll ReleaseDll
# project files
SOURCES = validate.cpp
RC_FILE = validate.rc
TARGET = validate

View File

@ -1,3 +0,0 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc"