В сообщении от Thursday 20 December 2007 15:28:32 вы написали:
"Ivan Sinitsin" ivan@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