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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user