Did you check what windows does it that case (with the .hlp file you're referring to)? - display whole string ? - truncate to filename only - truncate partial path & filename only? Anyway, the 51 size comes from the .hlp internal data structure, and IMO shouldn't be changed as such. Either Windows displays the whole path in that case and we'd better use a dynamic allocated buffer ; or the path is somehow truncated.