try2:winefile:Save font settings for registry

Ivan Sinitsin ivan at etersoft.ru
Thu Dec 20 06:57:15 CST 2007


В сообщении от Thursday 20 December 2007 15:28:32 вы написали:
> "Ivan Sinitsin" <ivan at etersoft.ru> wrote:
> > + if( RegQueryValueExW( hKey, reg_logfont, NULL, &type,
> > +                              (LPBYTE) &logfont, &size ) !=
> > ERROR_SUCCESS ) { +  hFont=GetStockObject(DEFAULT_GUI_FONT);
> > +  GetObject(hFont,sizeof(logfont),&logfont);
> > +        }
>
> There is no need to introduce the hFont variable.
>
> > + GetObject(Globals.hfont, sizeof(logfont), &logfont);
>
> To make the code more readable this call should be moved where logfont
> is actually used.
>
> > +        RegSetValueExW( hKey, reg_logfont, 0, REG_DWORD,
> > +                        (LPBYTE) &logfont, sizeof(LOGFONT) );
>
> The type should be set to REG_BINARY.

I have corrected the mistakes.
Do I understand you right?

----------------------
Sinitsin Ivan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: programs-winefile.c.patch
Type: text/x-diff
Size: 2245 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20071220/617e624d/attachment-0001.patch 


More information about the wine-devel mailing list