https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a32212d96ac61be5f2132a806d8591f8b390c9b3

commit a32212d96ac61be5f2132a806d8591f8b390c9b3
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Tue Dec 24 04:18:40 2019 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Tue Dec 24 04:18:40 2019 +0900

    [MSPAINT] Simplify choosecolor initialization
---
 base/applications/mspaint/main.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/base/applications/mspaint/main.cpp 
b/base/applications/mspaint/main.cpp
index 57857b37954..2b89afe9417 100644
--- a/base/applications/mspaint/main.cpp
+++ b/base/applications/mspaint/main.cpp
@@ -162,6 +162,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE 
hPrevInstance, LPTSTR lpszArgument
 
     /* init font for text tool */
     ZeroMemory(&lfTextFont, sizeof(lfTextFont));
+    lfTextFont.lfHeight = 0;
     lfTextFont.lfWeight = FW_NORMAL;
     lfTextFont.lfCharSet = DEFAULT_CHARSET;
     hfontTextFont = CreateFontIndirect(&lfTextFont);
@@ -315,15 +316,11 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE 
hPrevInstance, LPTSTR lpszArgument
     }
 
     /* initializing the CHOOSECOLOR structure for use with ChooseColor */
+    ZeroMemory(&choosecolor, sizeof(choosecolor));
     choosecolor.lStructSize    = sizeof(CHOOSECOLOR);
     choosecolor.hwndOwner      = hwnd;
-    choosecolor.hInstance      = NULL;
     choosecolor.rgbResult      = 0x00ffffff;
     choosecolor.lpCustColors   = custColors;
-    choosecolor.Flags          = 0;
-    choosecolor.lCustData      = 0;
-    choosecolor.lpfnHook       = NULL;
-    choosecolor.lpTemplateName = NULL;
 
     /* initializing the OPENFILENAME structure for use with GetOpenFileName 
and GetSaveFileName */
     CopyMemory(ofnFilename, filepathname, sizeof(filepathname));

Reply via email to