Monthly Archives: February 2012

The power of native development

Today, My “modeler tool” as a rich set of features, required for a basic shape-drawing modeling tool. Different features are provided like:

– Create drawing shapes and text areas
– Create Infrastructure diagram and development shapes (UML like)
– Display pictures
– Select, move and resize an element
– Inspect and modify elements properties in a property grid and propagate the changes to Ribbon UI
– Modify properties in the Ribbon UI and propagate the changes to the property grid
– Handle an elegant Ribbon UI with button gallery, color palette, line color, line width
– Zoom in and zoom out features with a scrolling area to provide wide and large documents
– Multiple view features

All the source is native – it means it is done using C/C++ using latest C++11 features like STL heavy usage, STL containers, and modern C++ code.

Note: The testing and the user feedback phases are provided by my daughter Lisa, 6 years. :)

ZoomIn and ZoomOut features using GdiPlus

I was very surprised of the power feature of Gdiplus scaling facilities.

Just look at this source code and next, the screen shots:


void CElement::Draw(CModeler1View * pView, CDC* pDC)
 {
 Graphics graphics(pDC->m_hDC);
 // I have just added this next line.

// On the Ribbon, ZoomIn/ZoomOut just +/- 0.10 to the m_fZoomFactor member

// I should talk the C# marketing guys to explain that C++ is very productive !!!
 graphics.ScaleTransform(GetManager()->m_fZoomFactor, GetManager()->m_fZoomFactor);
 . . .

Modeler Tool with Development shapes

Now, my modeler tool can handle application and development shapes.

It also have been fully migrated to standard C++ 11 with shared_ptr and others…