Inside baseball... well... inside MessageBox formatting, a story about a feature many/most/all WinDev's use...
A customer reported that the
MessageBoxfunction was wrapping text "at the wrong location."Our program displays a message with the
MessageBoxfunction, and we use the '\n' character to force line breaks at positions we choose. But we've found that starting in Windows Vista, the line breaks we placed are not working. The
MessageBoxfunction is inserting its own line breaks, which interferes with our custom text layout. It used to be that the width of the message box would expand to fit the longest line in the message.
MessageBoxfunction is one of those "leave the driving to us" type of functions. You give it a string to display, select which buttons you want, and sit back and relax while the
MessageBoxfunction does the work. The trade-off for the simplicity is that you also lose control over the experience. The
MessageBoxfunction decides where to place the dialog and how big to make it, which in turn determines where the line breaks go.
The algorithm used by
MessageBoxto determine the size of the message box has changed many times over the lifetime of Windows. ..."
I dig these kinds of "inside baseball" stories about Windows API/features we've all likely used, and been abused by, over the years.