Showcase 1 – Listview contents edit & output

Download Showcase 1 Program clicking here.

This software is a DEMO, intended to demonstrates MY SKILLS in this subjects:

Programming LanguajeC++, PHP
IDEVisual Studio 2012
OSWindows
Windows Technologies Involvedkernel API, Print & Clipboard, Listviews, Ballon tool tips
Web TechnologiesJSON Requests, PHP request Handling, Windows WinInet
Dialog LibraryWindows GUI

Abstract

Showcase1 is a Windows program developed using native libraries, in C++ and Visual Studio 2012, demonstrating usage of: Listview, menus, editbox, balloon tool tips, winspool (printing), clipboard (copy & paste), Wininet (http request), and PHP /JSON server communication.

Instructions

  1. first download software using this link
  2. unpack contents in a empty folder
  3. Double click and run showcase1.exe
  4. You must see first about dialog, just click OK and continue next screen.

Then you must see program screen:

Just try to follow Balloon tool tip instructions

In this program you can do:

  1. Create a new Listview line: just double click in listview white area (where balloon tool tip is pointing)
  2. Edit field text in text box
  3. Navigate through other fields pressing TAB button in keyboard
  4. In second column edit float number: a negative number turns line red
  5. Delete a register (line) clicking over red X
  6. Copy listview data to Windows clipboard clicking in first menu option (paste in Excel or any other text program)
  7. Print listview contents in your printer
  8. Send listview data to ambar.com.ve server and see this data in a web page (demonstrating PHP / JSON / Wininet handling)

Code Snippet

    bool Send()
    {
        SuccessBox("Please, allow this program to connect to internet (to ambar.com.ve:80) in order to send list data");

        JSONArray a;
        JSONObject *obj;
        String str;

        int c = list.GetItemCount();
        for(int i = 0; i < c; i++)
        {
            obj = new JSONObject;
            list.a.GetItemString(i, str);
            obj->AddValue("a", new JSONString(str));
            obj->AddValue("b", new JSONNumber(list.b.value.Get(i)));
            obj->AddValue("c", new JSONNumber(list.c.value.Get(i)));
            a.values.Append(obj);
        }
        str.Clear();
        a.ToStringFormated(str);
        HttpAccess h;
        HttpAccess::MultipartParams p;
        StringHandler recv;
        if(!h.Open("Gerardo Sanchez Showcase 1", "ambar.com.ve")) return false;
        p.Append("list", str);
        if(!h.SendRequest("portfolio/showcase1/showcase1.php", p, recv, this, 10000)) return false;
        recv.Copy(str);
        if(str == "ERROR") return false;
        String url;
        url = "http://ambar.com.ve/portfolio/showcase1/showcase1.php?showlist=";
        url += str;
        ShellExecute(*this, "open", url, nullptr, nullptr, SW_SHOWNORMAL);
        ShowToolTip();
        return true;
    }

Leave a Reply

Your email address will not be published. Required fields are marked *