aboutsummaryrefslogtreecommitdiff
path: root/examples/hello-world.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello-world.rs')
-rw-r--r--examples/hello-world.rs20
1 files changed, 2 insertions, 18 deletions
diff --git a/examples/hello-world.rs b/examples/hello-world.rs
index 9fe521c..9928016 100644
--- a/examples/hello-world.rs
+++ b/examples/hello-world.rs
@@ -1,21 +1,5 @@
-use std::ffi::CString;
-use std::ptr::null_mut;
-
-use shit_wx_sys::*;
+use shit_wx_sys as wx;
fn main() {
- unsafe {
- let message = "It's alive!!";
- let c_string_message = CString::new(message).unwrap();
- let message =
- wxString::FromAscii(c_string_message.as_ptr(), message.len().try_into().unwrap());
- wxMessageBox(
- (&message) as *const wxString,
- (&message) as *const wxString,
- (wxOK as i32) | wxGeometryCentre_wxCENTER,
- null_mut(),
- wxDefaultCoord,
- wxDefaultCoord,
- );
- }
+ wx::message_box();
}