now MSW stuff is complete

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1998-05-20 14:21:00 +00:00
parent 2bda0e1738
commit bbf1f0e5cf
118 changed files with 9265 additions and 0 deletions

BIN
samples/nativdlg/aiai.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

142
samples/nativdlg/dialog1.rc Normal file
View File

@@ -0,0 +1,142 @@
//Microsoft Developer Studio generated resource script.
//
#ifndef __WINDOWS__
#define __WINDOWS__
#endif
#ifndef __WIN32__
#define __WIN32__
#endif
#ifndef __WIN95__
#define __WIN95__
#endif
#ifdef __MINGW32__
#define wxID_OK 5100
#define wxID_CANCEL 5101
#define wxID_APPLY 5102
#define wxID_YES 5103
#define wxID_NO 5104
/* #include <wx/msw/gnuwin32/winresrc.h> */
#else
#include <wx/defs.h>
/* #include <windows.h> */
#endif
#include "resource.h"
#ifndef __MINGW32__
#include <commctrl.h>
#endif
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
// #include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.K.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
dialog1 DIALOG DISCARDABLE 0, 0, 271, 172
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",wxID_OK,214,7,50,14
PUSHBUTTON "Cancel",wxID_CANCEL,214,24,50,14
GROUPBOX "wxStaticBox",IDC_STATIC,7,7,198,158
EDITTEXT IDC_EDIT1,64,23,125,14,ES_AUTOHSCROLL
LTEXT "wxStaticText",IDC_STATIC,13,25,42,8
CONTROL "wxCheckBox",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,14,47,57,10
COMBOBOX IDC_COMBO1,83,46,48,30,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "wxRadioButton",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,
141,47,64,10
LISTBOX IDC_LIST1,14,69,86,40,LBS_SORT | LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP
SCROLLBAR IDC_SCROLLBAR1,111,71,76,11
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,10,116,100,15
CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,111,90,
10,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
dialog1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 264
TOPMARGIN, 7
BOTTOMMARGIN, 165
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.K.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,64 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds 32bit nativdlg example.
# WXWIN and BCCDIR are set by parent make
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env
WXLIBDIR = $(WXDIR)\lib
WXLIB = $(WXLIBDIR)\wx32.lib
LIBS=$(WXLIB) cw32 import32
TARGET=nativdlg
!if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS =
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = nativdlg.obj
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
tlink32 $(LINKFLAGS) @&&!
c0w32.obj $(OBJECTS)
$(TARGET)
nul
$(LIBS)
$(TARGET).def
!
brc32 -K $(TARGET).res
.$(SRCSUFF).obj:
bcc32 $(CPPFLAGS) -c {$< }
.c.obj:
bcc32 $(CPPFLAGS) -P- -c {$< }
nativdlg.obj: nativdlg.$(SRCSUFF) nativdlg.h # dialog1.wxr
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
brc32 -r /D__WINDOWS__ /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws

View File

@@ -0,0 +1,74 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds resource example (DOS).
!if "$(BCCDIR)" == ""
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
!endif
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
THISDIR = $(WXDIR)\samples\resource
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) mathwl cwl import
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
CFG=$(WXDIR)\src\wxwin.cfg
!ifndef FINAL
FINAL=0
!endif
!if "$(FINAL)" == "0"
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS =
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
HEADERS = resource.h
SOURCES = resource.cc
OBJECTS = resource.obj
resource: resource.exe
all: resource.exe
resource.exe: $(WXLIB) resource.obj resource.def resource.res
tlink $(LINKFLAGS) @&&!
c0wl.obj resource.obj
resource
nul
$(LIBS)
resource.def
!
rc -30 -K resource.res
.cc.obj:
bcc $(CPPFLAGS) -c {$< }
resource.obj: resource.cc
resource.res : resource.rc $(WXDIR)\include\msw\wx.rc
rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws

View File

@@ -0,0 +1,86 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds resource example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info.
# Set WXDIR for your system
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makemsc.env
THISDIR = $(WXDIR)\samples\resource
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
DUMMY=$(WXDIR)\src\msw\dummy.obj
# Set this to nothing if using MS C++ 7
ZOPTION=/Z7
!ifndef FINAL
FINAL=0
!endif
PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch
!if "$(FINAL)" == "0"
CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw
LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256
!else
CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw
LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256
!endif
HEADERS = resource.h
SOURCES = resource.$(SRCSUFF)
OBJECTS = resource.obj
resource: resource.exe
all: wx resource.exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.dos FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.dos clean
cd $(THISDIR)
resource.exe: $(DUMMY) $(WXLIB) resource.obj resource.def resource.res
link $(LINKFLAGS) @<<
$(DUMMY) resource.obj,
resource,
NUL,
$(LIBS),
resource.def
;
<<
rc -31 -K resource.res
resource.obj: resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
resource.res : resource.rc $(WXDIR)\include\msw\wx.rc
rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View File

@@ -0,0 +1,36 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile for nativdlg example (UNIX).
WXDIR = ../..
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/makeg95.env
OBJECTS=$(OBJDIR)/nativdlg.$(OBJSUFF) $(OBJDIR)/nativdlg_resources.$(OBJSUFF)
all: $(OBJDIR) nativdlg$(GUISUFFIX)
$(OBJDIR):
mkdir $(OBJDIR)
$(OBJDIR)/nativdlg.$(OBJSUFF): nativdlg.$(SRCSUFF) nativdlg.h
$(CC) -c $(CPPFLAGS) -o $@ nativdlg.$(SRCSUFF)
nativdlg$(GUISUFFIX): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o nativdlg$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
$(OBJDIR)/nativdlg_resources.o: nativdlg.rc
$(RESCOMP) -i nativdlg.rc -o $(OBJDIR)/nativdlg_resources.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) nativdlg$(GUISUFFIX).exe core *.rsc *.res

View File

@@ -0,0 +1,63 @@
#
# File: makefile.nt
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds nativdlg example (MS VC++).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
# Set WXDIR for your system
WXDIR = $(WXWIN)
!include $(WXDIR)\src\ntwxwin.mak
THISDIR = $(WXDIR)\samples\nativdlg
PROGRAM=nativdlg
OBJECTS = $(PROGRAM).obj
$(PROGRAM): $(PROGRAM).exe
all: wx $(PROGRAM).exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.nt FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.nt clean
cd $(THISDIR)
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
$(link) @<<
-out:$(PROGRAM).exe
$(LINKFLAGS)
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
$(LIBS)
<<
$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
$(cc) @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc dialog1.rc
$(rc) -r /i$(WXDIR)\include /D__WINDOWS__ -fo$@ $(PROGRAM).rc
clean:
-erase *.obj
-erase *.sbr
-erase *.exe
-erase *.res
-erase *.map
-erase *.pdb

View File

@@ -0,0 +1,35 @@
# Symantec C++ makefile for hello example
# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
WXDIR = $(WXWIN)
WXLIB = $(WXDIR)\lib\wx.lib
INCDIR = $(WXDIR)\include
MSWINC = $(INCDIR)\msw
BASEINC = $(INCDIR)\base
CC=sc
RC=rc
CFLAGS = -o -ml -W -Dwx_msw
LDFLAGS = -ml -W
INCLUDE=$(BASEINC);$(MSWINC)
LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
.cc.obj:
*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
.rc.res:
*$(RC) -r -I$(INCLUDE) $<
hello.exe: hello.obj hello.def hello.res
*$(CC) $(LDFLAGS) -o$@ hello.obj hello.def $(LIBS)
*$(RC) -k hello.res
clean:
-del *.obj
-del *.exe
-del *.res
-del *.map
-del *.rws

View File

@@ -0,0 +1,76 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile for resource example (UNIX).
WXDIR = ../..
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/make.env
OBJECTS=$(OBJDIR)/resource.$(OBJSUFF)
.SUFFIXES:
all: $(OBJDIR) resource$(GUISUFFIX)
wxmotif:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif
wxxview:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
wxhp:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp
# For SGI, include -lPW on your LDLIBS
motif: wxmotif
$(MAKE) -f makefile.unx all GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
xview: wxxview
$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' LDLIBS='$(XVIEWLDLIBS)'
hp: wxhp
$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC OPT='' DEBUG='$(DEBUG)' WARN='-w' \
XINCLUDE='$(HPXINCLUDE)' \
XLIB='$(HPXLIB)' \
XVIEW_LINK='' \
LDLIBS='$(HPLDLIBS)'
$(OBJDIR):
mkdir $(OBJDIR)
resource$(GUISUFFIX): $(OBJDIR)/resource.$(OBJSUFF) $(WXLIB)
$(CC) $(LDFLAGS) -o resource$(GUISUFFIX) $(OBJDIR)/resource.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
$(OBJDIR)/resource.$(OBJSUFF): resource.$(SRCSUFF) resource.h
$(CC) -c $(CPPFLAGS) -o $@ resource.$(SRCSUFF)
clean_motif:
$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
clean_ol:
$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
clean_hp:
$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
cleanany:
rm -f $(OBJECTS) resource$(GUISUFFIX) core
wxclean_ol:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol
wxclean_motif:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif
wxclean_hp:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp

View File

@@ -0,0 +1,38 @@
#************************************************************************
# Makefile for HELLO under VMS
# by Stefan Hammes
# (incomplete) update history:
# 11.04.95
#************************************************************************
#************************************************************************
# Definition section
# (cave: definitions and includes must begin with ',')
#************************************************************************
APPOPTS =
APPDEFS =
APPINCS =
#************************************************************************
# Module section
#************************************************************************
# Name of main module
MAIN = hello
# Object modules of the application.
OBJS = hello.obj
.include [--.src]makevms.env
# main dependency
$(MAIN).exe : $(MAIN).$(OBJ)
$(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(MAIN).$(OBJ),$(WXLIB)/lib,$(OPTSFILE)/option
- purge *.exe
#************************************************************************
# Header file depedencies following
#************************************************************************
hello.obj : hello.cc hello.h

View File

@@ -0,0 +1,42 @@
#
# Makefile for WATCOM
#
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
# 8 Nov 1994
#
WXDIR = ..\..
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
NAME = hello
LNK = $(name).lnk
OBJS = $(name).obj
PRECOMP=
all: $(name).exe
$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
wlink @$(LNK)
$(BINDCOMMAND) $(name).res
$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc
$(RC) $(RESFLAGS1) $(name).rc
$(LNK) : makefile.wat
%create $(LNK)
@%append $(LNK) debug all
@%append $(LNK) system $(LINKOPTION)
@%append $(LNK) $(MINDATA)
@%append $(LNK) $(MAXDATA)
@%append $(LNK) $(STACK)
@%append $(LNK) name $(name)
@%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
@for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
@for %i in ($(OBJS)) do @%append $(LNK) file %i
clean: .SYMBOLIC
-erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex

View File

@@ -0,0 +1,130 @@
/////////////////////////////////////////////////////////////////////////////
// Name: nativdlg.cpp
// Purpose: Native Windows dialog sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/resource.h"
#include <ctype.h>
#include "nativdlg.h"
#include "resource.h"
// Declare two frames
MyFrame *frame = NULL;
IMPLEMENT_APP(MyApp)
// Testing of ressources
MyApp::MyApp()
{
}
bool MyApp::OnInit(void)
{
// Create the main frame window
frame = new MyFrame(NULL, -1, "wxWindows Native Dialog Sample", wxPoint(0, 0), wxSize(300, 250));
// Give it a status line
frame->CreateStatusBar(2);
// Make a menubar
wxMenu *file_menu = new wxMenu;
file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource");
file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "&File");
// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
// Make a panel
frame->panel = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame");
frame->Show(TRUE);
// Return the main frame window
SetTopWindow(frame);
return TRUE;
}
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
END_EVENT_TABLE()
// Define my frame constructor
MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size):
wxFrame(parent, id, title, pos, size)
{
panel = NULL;
}
void MyFrame::OnQuit(wxCommandEvent& event)
{
Close(TRUE);
}
void MyFrame::OnTest1(wxCommandEvent& event)
{
MyDialog *dialog = new MyDialog;
if (dialog->LoadNativeDialog(this, dialog1))
{
/*
wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog);
if (text)
text->SetValue("wxWindows resource demo");
*/
dialog->SetModal(TRUE);
dialog->ShowModal();
}
dialog->Close(TRUE);
}
bool MyFrame::OnClose(void)
{
Show(FALSE);
return TRUE;
}
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
EVT_BUTTON(wxID_OK, MyDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
END_EVENT_TABLE()
void MyDialog::OnOk(wxCommandEvent& event)
{
EndModal(wxID_OK);
}
void MyDialog::OnCancel(wxCommandEvent& event)
{
EndModal(wxID_CANCEL);
}

View File

@@ -0,0 +1,9 @@
NAME Resource
DESCRIPTION 'Resource'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 1024
STACKSIZE 16192

View File

@@ -0,0 +1,47 @@
/////////////////////////////////////////////////////////////////////////////
// Name: nativdlg.h
// Purpose: Native Windows dialog sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma interface
#endif
// Define a new application
class MyApp: public wxApp
{
public:
MyApp(void) ;
bool OnInit(void);
};
class MyFrame: public wxFrame
{
public:
wxWindow *panel;
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
bool OnClose(void);
void OnQuit(wxCommandEvent& event);
void OnTest1(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
class MyDialog : public wxDialog
{
public:
void OnOk(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
#define RESOURCE_QUIT 4
#define RESOURCE_TEST1 2

View File

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

View File

@@ -0,0 +1,25 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by dialog1.rc
//
#define dialog1 101
#define IDC_EDIT1 1000
#define IDC_CHECK1 1001
#define IDC_COMBO1 1003
#define IDC_RADIO1 1005
#define IDC_LIST1 1006
#define IDC_SCROLLBAR1 1007
#define IDC_SLIDER1 1008
#define IDC_SPIN1 1009
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1010
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif