Category: Articles & Tutorials

  • Finally, I got Windows 10

    This is a story of how I got over a blocking situation within some Windows 10 OS installs on my Samsung laptop.

  • Experiences with Adobe Acrobat/Reader Plug-ins

    I wrote this document after a challenging experience I had recently within an Adobe Acrobat/Reader plugin creation. Even if the Adobe’s SDK it’s nicely documented within PDF files, one of the major reason that determined me to write this article was the frustration I got sometimes when, for instance, trying to see “why the plugin […]

  • Some experiences with the last world-wide WordPress brute force attack

    As you most probably know, this website uses WordPress. Last Saturday, trying to access the site admin area I was faced with an error generated by too many redirects. Having other things to do, I ignored it for that moment. Later a friend of mine published on his website some information about an existing world-wide […]

  • SubclassWindow() method issues in projects base on MFC Feature Pack

    The Problem Trying to paint a background image into client area of a MDI application build in VC++ 6.0 to VC++ 2005 IDE it’s not a difficult task. In case you need, you can find easily good references. For instance, there are two references from Microsoft (KB129471 and KB103786) and one I prefer: a FAQ […]

  • Several C++ singleton implementations

    This article offers some insight into singleton design-pattern. The singleton pattern is a design pattern used to implement the mathematical concept of a singleton, by restricting the instantiation of a class to one object. The GoF book describes the singleton as: “Ensure a class only has one instance, and provide a global point of access […]

  • Flexible changes for product version properties – Visual C++ binaries

    Manually editing of binaries version in the resource editor of Visual Studio IDE is not a viable solution. If we have dozens of projects in our solution, then for each kit building we should need manual resources file edit. Otherwise, we can use a special tool that does this thing for us. Unfortunately this approach is not the most flexible and could fail. For our flexible binaries properties changes and in order to avoid manual edit for each rebuild we can create and include a header file (version.h) that contains some constants of product version and file version of our project (.rc files). We have to include only these constants into this file (version.h): #define PRODUCT_VERSION #define PRODUCT_VERSION_STR “” Then, for each .rc file wherever we have FileVersion and ProductVersion we have to use this constants. When we will build a new kit, we have to change only these constants and then to start the kit building process. Everything is fine until we add new controls in our projects resource files. Then, because of Visual Studio IDE automation we can get an unlikely surprise: the FileVersion and the ProductVersion properties could be reset to In order to avoid this issue and edit the version only in a single place I propose the following workaround.

  • Dynamic popup and drop down menus for custom representations

    Many applications allow dynamic customization for visual objects or data views. For instance, well known Internet Explorer application provides toolbars customization using a popup menu that appears when the user execute right click mouse action in toolbar zone area. Internet Explorer sample menu Other sample where this kind of menu is very useful is when it’s used in order to customize database data representation in Windows controls like List control or grid control. These kind of applications allow data filtering and show/hide columns using this kind of menu. The user just right click on control header and gets what he need. []

  • Versionable Object’s Serialization in MDI applications

    This article represents a follow-up of the last article, “Versionable Object’s Serialization using MFC in non Document View applications”. In that article I presented to you a way to solve incompatibility issues between different file versions of the same application, based on MFC serialization into a dialog base application. But, the dialog base applications are not the best way to use and apply MFC serialization. Applications base on document view architecture (MDI or SDI) are the best solution when we want to develop MFC application with serialization support. Document View MFC architecture offers support for automatic save and load document to/from a file on a storage area, using a serialization mechanism. MDI (Multiple Document Interface) and SDI (Single Document Interface) application offers default serialization basic mechanism. SerAddressBookMDI Main Window - continue to article []

  • Versionable Object’s Serialization using MFC in non Document View applications

    Most existing applications operate with data that must be stored and loaded in different times and different locations. The data is stored in text or binary files with a well defined format. The Problem Initially, in the first version 1.0, an application operates with data structures that can be stored and loaded. But, next version (2.0) these data structures suffers changes. Some structure’s attributes are added and other could be removed. These things change files format and structure when a new file version is saved. Question: What happens when you are using an application version 2.0 and you are trying to load old files format (version 1.0)? Answer: Most cases should cause incompatibility troubles between the current new application and files in old format. This could throw exceptions and the application could have undefined behavior. That’s why the application must be written in order to be able to open both file versions. Solution In order to solve the compatibility issue exist many solutions, more or less professional. The recommended solution is the serialization. Application window []

  • Progress database operations

    Preliminary remarks Application path (Sun Solaris Unix OS): /myApp/myapp111a/ Database location: /myApp/db/test_db Usually, our workstations have Windows OS and we need to connect to Solaris Unix OS on SSH. That’s why we are using Putty application. User: root Password: xxxxxxxxxx []