try2:winefile:Save font settings for registry
Dmitry Timoshkov
dmitry at codeweavers.com
Thu Dec 20 06:28:32 CST 2007
"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.
--
Dmitry.
More information about the wine-devel
mailing list