Index: elec/CrO2/software/Makefile
===================================================================
--- elec/CrO2/software/Makefile	(revision 197a1cce3aa5f55bbb75d8bd2db4a290b6522b10)
+++ elec/CrO2/software/Makefile	(revision 5e633b615797ccab3a3efebc5eddf69bad93c56d)
@@ -13,7 +13,7 @@
 endif
 
-CC		= gcc
-CFLAGS	= $(USBFLAGS) -O -Wall -std=c99
-LIBS	= $(USBLIBS)
+CC		= g++
+CPPFLAGS	= $(USBFLAGS) -O -Wall -I/usr/include/IUP/
+LIBS	= $(USBLIBS) -L/usr/lib/ -mwindows -liup -lcomctl32 -lole32
 
 PROJECT = CrO2
@@ -22,7 +22,4 @@
 
 all: $(PROGRAM)
-
-.c.o:
-	$(CC) $(CFLAGS) -c $<
 
 $(PROGRAM): $(PROJECT).o
Index: elec/CrO2/software/cro2.cpp
===================================================================
--- elec/CrO2/software/cro2.cpp	(revision 197a1cce3aa5f55bbb75d8bd2db4a290b6522b10)
+++ elec/CrO2/software/cro2.cpp	(revision 5e633b615797ccab3a3efebc5eddf69bad93c56d)
@@ -23,4 +23,7 @@
 #include <unistd.h>
 
+#include <iup.h>
+#include <iupcontrols.h>
+
 #include <lusb0_usb.h>    /* this is libusb, see http://libusb.sourceforge.net/ */
 
@@ -31,5 +34,5 @@
  */
 
-#define VENDORSTRING "pulkomandy.ath.cx"
+#define VENDORSTRING (char*)"pulkomandy.ath.cx"
 #define PRODUCTSTRING "CrO2"
 
@@ -39,16 +42,4 @@
 #define PSCMD_PUT   2
 #define PSCMD_STATUS   3
-
-static void usage(char *name)
-{
-    fprintf(stderr, "usage:\n");
-    fprintf(stderr, "  %s status\n", name);
-    fprintf(stderr, "  %s on <port> [<duration>]\n", name);
-    fprintf(stderr, "  %s off <port> [<duration>]\n", name);
-    fprintf(stderr, "  %s test\n\n", name);
-    fprintf(stderr, "Ports are single digits in the range 0...7\n");
-    fprintf(stderr, "The pulse duration for switching temporarily is given in seconds.\n");
-}
-
 
 static int  usbGetStringAscii(usb_dev_handle *dev, int index, int langid, char *buf, int buflen)
@@ -156,16 +147,89 @@
 }
 
+
+int menu_open(Ihandle* that)
+{
+	IupPopup(IupFileDlg(), IUP_CENTER, IUP_CENTER);
+	return IUP_DEFAULT;
+}
+
+
+void GUI_open(int* argc, char*** argv)
+{
+	IupOpen(argc, argv);
+//	IupControlsOpen();
+
+	IupSetFunction("OPEN", menu_open);
+
+	Ihandle* menu = IupMenu(
+		IupSubmenu("File",
+			IupMenu(
+				IupItem("Open", "OPEN"),		
+				IupItem("Exit", "IUP_CLOSE"),
+				NULL
+			)
+		),
+		NULL
+	);
+
+	Ihandle* platformlist = IupList(NULL);
+	IupSetAttribute(platformlist, "EXPAND", "HORIZONTAL");
+	IupSetAttribute(platformlist, "DROPDOWN", "YES");
+	IupSetAttribute(platformlist, "1", "MO5");
+	IupSetAttribute(platformlist, "VALUE", "1");
+
+	Ihandle* blocklist = IupTree();
+	IupSetAttribute(blocklist, "EXPAND", "VERTICAL");
+
+	Ihandle* tabs = IupTabs(
+		IupVbox(
+			IupLabel("Hello World"),
+			NULL
+		),
+		IupVbox(
+			IupHbox(
+				IupLabel("Format:"),
+				platformlist,
+				NULL
+			),
+			IupHbox(
+				blocklist,
+				IupVbox(
+//					IupMatrix(NULL),
+					IupLabel("Checksum:"),
+					NULL
+				),
+				NULL
+			)
+		),
+		NULL
+	);
+
+	IupSetAttribute(tabs,"TABTITLE0", "Control");
+	IupSetAttribute(tabs,"TABTITLE1", "Explore");
+
+	Ihandle* dialog = IupDialog(tabs);
+	IupSetAttribute(dialog, "TITLE", "CrO2 tape emulator");
+	IupSetAttributeHandle(dialog, "MENU", menu);
+	IupShow(dialog);
+
+	IupMainLoop();
+
+	IupClose();
+}
+
+
 int main(int argc, char **argv)
 {
-usb_dev_handle      *handle = NULL;
-unsigned char       buffer[275];
-int                 nBytes;
+	usb_dev_handle      *handle = NULL;
+	unsigned char       buffer[275];
+	int                 nBytes = 0;
 
     if(argc < 2){
-        usage(argv[0]);
-        exit(1);
+		GUI_open(&argc, &argv);
+		exit(0);
     }
     usb_init();
-    if(usbOpenDevice(&handle, USBDEV_SHARED_VENDOR, VENDORSTRING, USBDEV_SHARED_PRODUCT, PRODUCTSTRING) != 0){
+    if(usbOpenDevice(&handle, USBDEV_SHARED_VENDOR, VENDORSTRING, USBDEV_SHARED_PRODUCT, (char*)PRODUCTSTRING) != 0){
         fprintf(stderr, "Could not find USB device \""PRODUCTSTRING"\" with vid=0x%x pid=0x%x\n", USBDEV_SHARED_VENDOR, USBDEV_SHARED_PRODUCT);
         exit(1);
@@ -227,8 +291,5 @@
 		nBytes = usb_control_msg(handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | rqtype, PSCMD_PUT, blktype,0 /*checksum*/, (char*)buffer, blksize, 5000);
     }else{
-		fprintf(stderr,"Unknown command: %s.\n", argv[1]);
-		usage(argv[0]);
-		nBytes = 0;
-		// TODO manage return code
+		GUI_open(&argc, &argv);
     }
 
