(from Yitzhak)
win32gui: more splash screen integration The Makefile have rip.uu/splash.uu added to them. However, this won't work if you don't have splash.uu. Instead, just copy rip.uu or another .uu and name it splash.uu. Make expects to have splash.uu present (at least Borland's make). It doesn't add splash.uu decoding to the IDE framework. It does a bit in winhack.rc and Makefile.bcc to bring winhack.rc up to sync with Borland's compiler. If you don't like the splash screen, then I'll have to redo that part of the patch apart from the others.
This commit is contained in:
@@ -13,11 +13,45 @@ static struct font_table_entry {
|
||||
HFONT hFont;
|
||||
} font_table[MAXFONTS] ;
|
||||
static int font_table_size = 0;
|
||||
HFONT version_splash_font;
|
||||
HFONT extrainfo_splash_font;
|
||||
|
||||
#define NHFONT_CODE(win, attr) (((attr&0xFF)<<8)|(win_type&0xFF))
|
||||
|
||||
static void __cdecl font_table_cleanup(void);
|
||||
|
||||
void mswin_init_splashfonts(HWND hWnd)
|
||||
{
|
||||
HDC hdc = GetDC(hWnd);
|
||||
HFONT fnt = NULL;
|
||||
LOGFONT lgfnt;
|
||||
ZeroMemory( &lgfnt, sizeof(lgfnt) );
|
||||
lgfnt.lfHeight = -60*GetDeviceCaps(hdc, LOGPIXELSY)/72; // height of font
|
||||
lgfnt.lfWidth = 0; // average character width
|
||||
lgfnt.lfEscapement = 0; // angle of escapement
|
||||
lgfnt.lfOrientation = 0; // base-line orientation angle
|
||||
lgfnt.lfWeight = FW_BOLD; // font weight
|
||||
lgfnt.lfItalic = FALSE; // italic attribute option
|
||||
lgfnt.lfUnderline = FALSE; // underline attribute option
|
||||
lgfnt.lfStrikeOut = FALSE; // strikeout attribute option
|
||||
lgfnt.lfCharSet = OEM_CHARSET; // character set identifier
|
||||
lgfnt.lfOutPrecision = OUT_DEFAULT_PRECIS; // output precision
|
||||
lgfnt.lfClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision
|
||||
lgfnt.lfQuality = DEFAULT_QUALITY; // output quality
|
||||
lgfnt.lfPitchAndFamily = DEFAULT_PITCH; // pitch and family
|
||||
NH_A2W( "Times New Roman", lgfnt.lfFaceName, LF_FACESIZE);
|
||||
version_splash_font = CreateFontIndirect(&lgfnt);
|
||||
lgfnt.lfHeight = -12*GetDeviceCaps(hdc, LOGPIXELSY)/72; // height of font
|
||||
extrainfo_splash_font = CreateFontIndirect(&lgfnt);
|
||||
ReleaseDC(hWnd, hdc);
|
||||
}
|
||||
|
||||
void mswin_destroy_splashfonts()
|
||||
{
|
||||
DeleteObject (version_splash_font);
|
||||
DeleteObject (extrainfo_splash_font);
|
||||
}
|
||||
|
||||
/* create font based on window type, charater attributes and
|
||||
window device context */
|
||||
HGDIOBJ mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace)
|
||||
|
||||
Reference in New Issue
Block a user