+void MyApp::DoByteOrderDemo(wxCommandEvent& WXUNUSED(event))
+{
+ wxTextCtrl& textCtrl = * GetTextCtrl();
+
+ textCtrl.Clear();
+ textCtrl << "\nTest byte order macros:\n\n";
+
+ if (wxBYTE_ORDER == wxLITTLE_ENDIAN)
+ textCtrl << "This is a little endian system.\n\n";
+ else
+ textCtrl << "This is a big endian system.\n\n";
+
+ wxString text;
+
+ wxInt32 var = 0xF1F2F3F4;
+ text = "";
+ text.Printf( "Value of wxInt32 is now: %#x.\n\n", var );
+ textCtrl.WriteText( text );
+
+ text = "";
+ text.Printf( "Value of swapped wxInt32 is: %#x.\n\n", wxINT32_SWAP_ALWAYS( var ) );
+ textCtrl.WriteText( text );
+
+ text = "";
+ text.Printf( "Value of wxInt32 swapped on little endian is: %#x.\n\n", wxINT32_SWAP_ON_LE( var ) );
+ textCtrl.WriteText( text );
+
+ text = "";
+ text.Printf( "Value of wxInt32 swapped on big endian is: %#x.\n\n", wxINT32_SWAP_ON_BE( var ) );
+ textCtrl.WriteText( text );
+}
+