]> git.saurik.com Git - wxWidgets.git/commitdiff
Updated resource sample
authorRobert Roebling <robert@roebling.de>
Sun, 13 Dec 1998 10:41:26 +0000 (10:41 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 13 Dec 1998 10:41:26 +0000 (10:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/resource/dialog1.h [new file with mode: 0644]
samples/resource/dialog1.wxr
samples/resource/resource.cpp

diff --git a/samples/resource/dialog1.h b/samples/resource/dialog1.h
new file mode 100644 (file)
index 0000000..99f31f9
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * dialog1.h
+ * Window identifiers file written by Dialog Editor
+ */
+
+#define ID_TEXTCTRL104 104
+#define ID_STATICBOX101 101
+#define ID_DIALOG100 100
+#define ID_STATIC107 107
+#define ID_BUTTON108 108
+#define ID_BUTTON109 109
+#define ID_LISTBOX105 105
+#define ID_CHECKBOX106 106
+#define ID_RADIOBOX102 102
index afc4a46524b243504e5a660d0216b85d08046426..1b3813e7786afc23000909e89be453b564470b3b 100644 (file)
@@ -1,27 +1,26 @@
 static char *dialog1 = "dialog(name = 'dialog1',\
-  style = 'wxCAPTION | wxDEFAULT_DIALOG_STYLE',\
+  style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\
   title = 'Test dialog box',\
-  x = 312, y = 234, width = 400, height = 300,\
-  modal = 0,\
-  label_font = [10, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
-  button_font = [10, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
-  control = [wxGroupBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262,\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
-  control = [wxRadioBox, 'Radiobox', 'wxHSCROLL | wxVERTICAL | wxVERTICAL_LABEL', 'radiobox2', 24, 23, 111, 63, ['One', 'Two', 'Three', 'Four'], 2,\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
-  control = [wxMultiText, 'Multitext', 'wxTE_MULTILINE', 'multitext3', 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.',\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
-  control = [wxListBox, 'Listbox', 'wxVERTICAL_LABEL', 'listbox4', 156, 26, 200, 80, ['Apples', 'Pears', 'Bananas'], 'wxSINGLE',\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
-  control = [1, wxButton, 'Press me', '0', 'button7', 33, 130, 84, 34,\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
-  control = [2, wxButton, 'Cancel', '0', 'button8', 34, 181, 84, 34,\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
-  control = [wxCheckBox, 'Checkbox', '0', 'checkbox9', 154, 220, 68, 14, 0,\
-      [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
-  control = [wxMessage, 'My message', '0', 'message10', 257, 218, 76, 13,\
-      [11, 'wxSWISS', 'wxITALIC', 'wxBOLD', 0]]).";
+  id = 100,\
+  x = 10, y = 10, width = 198, height = 147,\
+  background_colour = 'D6D6D6',\
+  use_dialog_units = 1,\
+  use_system_defaults = 0,\
+  font = [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss'],\
+  control = [101, wxStaticBox, 'wxStaticBox', '0', 'group6', 5, 7, 184, 103,\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']],\
+  control = [102, wxRadioBox, 'Radiobox', 'wxRA_HORIZONTAL', 'radiobox2', 15, 24, 36, 58, ['One', 'Two', 'Three', 'Four'], 1,\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']],\
+  control = [104, wxTextCtrl, '', 'wxTE_MULTILINE', 'multitext3', 62, 24, 67, 33, 'wxWindows rules!',\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']],\
+  control = [105, wxListBox, '', '0', 'listbox4', 62, 66, 67, 33, ['Apples', 'Bananas', 'Pears', 'Kiwis'],\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']],\
+  control = [106, wxCheckBox, 'Checkbox', '0', 'checkbox9', 141, 26, 36, 14, 0,\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']],\
+  control = [107, wxStaticText, 'My Message', '0', 'message10', 143, 57, 39, 12, '',\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']],\
+  control = [108, wxButton, 'Press me', '0', 'button7', 141, 81, 36, 13, '',\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']],\
+  control = [109, wxButton, 'Cancel', '0', 'button8', 62, 119, 55, 17, '',\
+      [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'Swiss']]).";
 
index 2a88d0518f1f1a4b3c6c61d600b1a6ef3c8b7b51..9b4db2b651dbf092cdcd63724036104ba521152f 100644 (file)
 // in the program code/executable for UNIX and Windows
 // platforms.
 
+// In order to get the ID of the controls defined in the
+// dialog, we include the header automatically generated
+// by DialogEd
+
+#include "dialog1.h"
+
 // If you have a Windows compiler that can cope with long strings,
 // then you can always use the #include form for simplicity.
 
@@ -86,7 +92,7 @@ bool MyApp::OnInit(void)
 #endif
 
   // Create the main frame window
-  frame = new MyFrame((wxFrame *) NULL, -1, (char *) "wxWindows Resource Sample", wxPoint(0, 0), wxSize(300, 250));
+  frame = new MyFrame((wxFrame *) NULL, -1, (char *) "wxWindows Resource Sample", wxPoint(-1, -1), wxSize(300, 250));
 
   // Give it a status line
   frame->CreateStatusBar(2);
@@ -160,7 +166,6 @@ void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event) )
         wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog);
         if (text)
           text->SetValue("wxWindows resource demo");
-        dialog->SetModal(TRUE);
         dialog->ShowModal();
       }
       dialog->Close(TRUE);