Using FLTK in Visual Studio

Note: for configuring FLTK in Linux environments, please refer to this post. 1. Download and extract FLTK For this particular install I used an old Visual Studio 2003 .NET version. Get the zipped file from the download section of Bill Spitzak’s FLTK site. Unzip the file and place it somewhere suitable such as C:\fltk-1.1.10-source.

Getting Started with OpenGL for Windows

For setting up OpenGL in Ubuntu Linux, please see this post, otherwise for Windows / Visual Studio environments, please use these following instructions: 1. Download the latest Windows drivers As stated on the OpenGLs wiki page, OpenGL more or less comes with the Windows operating system. You will need to ensure your PC has the …

Continue reading ‘Getting Started with OpenGL for Windows’ »

The Big Three in C++

Constructor, destructors and assignment operators There is a rule of thumb in C++ that if a class defines a destructor, constructor and copy assignment operator – then it should explicitly define these and not rely on their default implementation. Why do we need them? In the example below, the absence of an explicit copy constructor …

Continue reading ‘The Big Three in C++’ »

Converting IEEE 754 Floating Point into Binary

This post explains how to convert floating point numbers to binary numbers in the IEEE 754 format.  A good link on the subject of IEEE 754 conversion exists at Thomas Finleys website. For this post I will stick with the IEEE 754 single precision binary floating-point format: binary32. See this other posting for C++, Java …

Continue reading ‘Converting IEEE 754 Floating Point into Binary’ »

Avoiding Memory Leaks using Boost Libraries

Using boost::scoped_array When we want to dynamically allocate an array of objects for some purpose, the C++ programming language offers us the new and delete operators that are intended to replace the traditional malloc() and free() subroutines that are part of the standard library :

Dynamically Created MFC Controls and their Notifications

I was required to create a dialog application with dynamically created checkboxes (CButtons).  Given that selection of a certain hardware types in the software would result in completely different checkbox layouts.  In these situations, it is the software that has to automatically do the work normally done by using the Dialog Editor toolbox to insert …

Continue reading ‘Dynamically Created MFC Controls and their Notifications’ »