The cbSize field for the REBARBANDINFOW structure was previously set to
the sizeof(REBARBANDINFOW), however, new fields were added to this
structure for newer version of windows. Testing in Windows XP (or with
comctl32.dll from Windows XP) I found this larger size was rejected
causing the rebar to not be displayed in wordpad.
The bug could be seen by inserting tabs stops 1cm, 2cm, & 10cm. The
10cm tab stop would be inserted before 2cm since the comparison isn't
based on the numeric value.
This also reverts commit 2b52dd845097f16076c0185b02a003f63898dcab:
wordpad: Empty the richedit undo buffer on creation.
The reverted commit I created to fix an issue that only applied to Wine,
but it just masked the issue which was in richedit controls. The
default character format was set in two places while wordpad was
starting up, and caused wordpad to have two undo items at startup.
Previously the window size and position was obtained in such a way that
when the window is closed while minimized, it would be hidden when the
program is started again. Closing a maximized window would save the
size of the maximized window and use it as the normal/restored size when
the program is started again.
The combobox to select the alignment in the paragraph format dialog
did not have enough height to display the dropdown list. Also, code was
missing to set the alignment when OK button is pressed. This patch fixes
these issues.
The changes were previously being applied only when the combobox's edit
control lost focus notifying an end edit event. In addition, the
selection of an item from the dropdown list should also cause the
changes to be applied. New functions were created to handle the
duplication in expected behaviour for these two events.
When run with the native richedit control the selection will be hidden
when focus is lost without the ES_NOHIDESEL style applied to the
richedit control. This can be annoying in native windows when focus is
on a combobox in the toolbar, because it won't show what text will be
changed. This patch adds the ES_NOHIDESEL style to be consistent with
native wordpad.