Modify method headers and also implement function to determine text length to width
Transfer to MS Visual Studio 2012