mirror of
https://github.com/reactos/reactos.git
synced 2024-11-25 12:33:34 +08:00
[MSPAINT] Simplify choosecolor initialization
This commit is contained in:
parent
3a8c25d7f3
commit
a32212d96a
@ -162,6 +162,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||||||
|
|
||||||
/* init font for text tool */
|
/* init font for text tool */
|
||||||
ZeroMemory(&lfTextFont, sizeof(lfTextFont));
|
ZeroMemory(&lfTextFont, sizeof(lfTextFont));
|
||||||
|
lfTextFont.lfHeight = 0;
|
||||||
lfTextFont.lfWeight = FW_NORMAL;
|
lfTextFont.lfWeight = FW_NORMAL;
|
||||||
lfTextFont.lfCharSet = DEFAULT_CHARSET;
|
lfTextFont.lfCharSet = DEFAULT_CHARSET;
|
||||||
hfontTextFont = CreateFontIndirect(&lfTextFont);
|
hfontTextFont = CreateFontIndirect(&lfTextFont);
|
||||||
@ -315,15 +316,11 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* initializing the CHOOSECOLOR structure for use with ChooseColor */
|
/* initializing the CHOOSECOLOR structure for use with ChooseColor */
|
||||||
|
ZeroMemory(&choosecolor, sizeof(choosecolor));
|
||||||
choosecolor.lStructSize = sizeof(CHOOSECOLOR);
|
choosecolor.lStructSize = sizeof(CHOOSECOLOR);
|
||||||
choosecolor.hwndOwner = hwnd;
|
choosecolor.hwndOwner = hwnd;
|
||||||
choosecolor.hInstance = NULL;
|
|
||||||
choosecolor.rgbResult = 0x00ffffff;
|
choosecolor.rgbResult = 0x00ffffff;
|
||||||
choosecolor.lpCustColors = custColors;
|
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 */
|
/* initializing the OPENFILENAME structure for use with GetOpenFileName and GetSaveFileName */
|
||||||
CopyMemory(ofnFilename, filepathname, sizeof(filepathname));
|
CopyMemory(ofnFilename, filepathname, sizeof(filepathname));
|
||||||
|
Loading…
Reference in New Issue
Block a user