No changes, just minor wxMSW code cleanup: use WinStruct<>.

Use WinStruct instead of the usual ZeroMemory() + cbSize setting fragment to
initialize Win32 structs that need to be initialized in this way.

No real changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-01-18 10:05:27 +00:00
parent 89041b2513
commit be85a191e1
4 changed files with 8 additions and 24 deletions

View File

@@ -2397,9 +2397,7 @@ bool wxTextCtrl::SetForegroundColour(const wxColour& colour)
if ( IsRich() )
{
// change the colour of everything
CHARFORMAT cf;
wxZeroMemory(cf);
cf.cbSize = sizeof(cf);
WinStruct<CHARFORMAT> cf;
cf.dwMask = CFM_COLOR;
cf.crTextColor = wxColourToRGB(colour);
::SendMessage(GetHwnd(), EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);