"Ivan Sinitsin" <[EMAIL PROTECTED]> 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.