Download wxWidgets classes, samples and tools.

Printer-friendly versionPDF version

wxDownloadFile

Class for downloading a file from a given URL and send back event notification to the owner, when the download fails or complete. If you are planning to write the world best download manager using wxDownloadFile, then I would have written it long back, if its possible. wxDownloadFile can be used to download small files, without much hassle, like downloading the latest version information, any message, etc.

BEGIN_EVENT_TABLE(CMyFrame, wxFrame)
  EVT_DOWNLOAD(CMyFrame::OnDownloadEvent)
END_EVENT_TABLE()

void CMyFrame::OnDownloadMenu(wxCommandEvent &event)
{
  wxDownloadFile *pDownloadFile = new wxDownloadFile(this,
      wxT("http://www.codeproject.com/webservices/articlerss.aspx?cat=2"),
      wxT("CodeProjectMFC.xml"), true, 1000);
}

void CMyFrame::OnDownloadEvent(wxDownloadEvent &event)
{
  if(event.GetDownLoadStatus() == wxDownloadEvent::DOWNLOAD_COMPLETE ||
     event.GetDownLoadStatus() == wxDownloadEvent::DOWNLOAD_FAIL)
  {
  }
  else if(event.GetDownLoadStatus() == wxDownloadEvent::DOWNLOAD_INPROGRESS)
  {
    wxInt64 nFileSize = event.GetFileSize();
    wxInt64 nDownloaded = event.GetDownLoadedBytesCount();
  }
}



wxAutoTextctrl

A text control which automatically predicts the list of possible values based on the user input, and completes the text. Use up & down arrow keys to see different list of possible values. You should also see other auto complete controls in wxWidgets.



wxTripleDES

Modified the wxDES class to support wxTripleDES.



wxRegexValidator

A regular expression based validator for wxWidgets control values.



wxBoostPointer

Automatically call Destroy instead of delete for objects derived with wxWindow.

#include <boost/shared_ptr.hpp>
typedef boost::shared_ptr wx_ptr;
wx_ptr<wxMessageDialog> ptr(new wxMessageDialog(...));



Eye Care

EyeCare

Eye Care is basically inspired from Alok Gupta's application. It's a small utility program that reminds you, after a preset time interval, to give rest to your eyes and wash them, when you are lost in the matrix of programming. It sits in the taskbar, and monitors your eyes. Completely written in wxWidgets, it's another example of how easy it is to program in wxWidgets. It also shows how to put an application icon in the taskbar, save application configuration, work with images, process window specific messages, use the wxCode components like wxHyperlinkCtrl, and other concepts.



Game Ball

GameBall

This is not a game, just another sample application written in wxWidgets while I was learning wxWidgets long ago.



Directory Copier

DirectoryCopier

Directory Copier copies one folder and files within it to another location. You can configure which all files to copy and which all to be left. The include file name mask has to be more generic and exclude file name mask narrows the search criteria. You can also create a single zip achieve from the folder, and can specify whether to copy empty files or not. If file is already present in destination directory, you can specify, whether to overwrite it or not, or overwrite if newer version. Can be run from command prompt automatically using the "-a source destination" command line arguments. The thread priority can be set to copy in background or copy using the maximum priority. One of the feature is that you can copy only the directory structure, without copying any files.



Binary to C Array

Binary2CArray

Convert images or other binary files to C style arrays to be included with the code.



String Viewer

StringViewer

String Viewer can display string from memory of other applications, provided its address. It can be used as debugging tool for legacy code with custom strings.



AttachmentSize
wxdownloadfile.zip5.48 KB
wxautotextctrl.zip3.15 KB
wxtripledes.zip9.82 KB
regexvalidator.zip2.78 KB
eyecare.zip383.71 KB
game_ball.7z483.34 KB
directorycopier.7z533.88 KB
bin2c.7z515.41 KB
stringviewer.7z428.34 KB
boostpointer.zip4.35 KB