@@ -633,70 +633,6 @@ gui_mch_show_caption(int show)
633633 }
634634}
635635
636- /*
637- * Return TRUE when Visual Style is enabled.
638- */
639- static int
640- is_visual_style_enabled (void )
641- {
642- HANDLE hUxtheme ;
643- static BOOL (WINAPI * pIsThemeActive )(void ) = NULL ;
644- static BOOL loaded = FALSE;
645-
646- if (!loaded ) {
647- hUxtheme = GetModuleHandle ("uxtheme.dll" );
648- if (hUxtheme != NULL )
649- pIsThemeActive = (void * )GetProcAddress (hUxtheme , "IsThemeActive" );
650- loaded = TRUE;
651- }
652- if (pIsThemeActive )
653- return pIsThemeActive ();
654- return FALSE;
655- }
656-
657- static int
658- has_caption (void )
659- {
660- return GetWindowLong (s_hwnd , GWL_STYLE ) & WS_CAPTION ;
661- }
662-
663- static int
664- get_caption_height (void )
665- {
666- /*
667- * A window's caption includes extra 1 dot margin. When caption is
668- * removed the margin also be removed. So we must return -1 when
669- * caption is diabled.
670- */
671- return has_caption () ? GetSystemMetrics (SM_CYCAPTION ) : -1 ;
672- }
673-
674- static int
675- get_caption_width_adjustment (void )
676- {
677- return has_caption () ? 0 : -2 ;
678- }
679-
680- void
681- gui_mch_show_caption (int show )
682- {
683- LONG style , newstyle ;
684-
685- /* Remove caption when title is null. */
686- style = newstyle = GetWindowLong (s_hwnd , GWL_STYLE );
687- if (show && !(style & WS_CAPTION ))
688- newstyle = style | WS_CAPTION ;
689- else if (!show && (style & WS_CAPTION ))
690- newstyle = style & ~WS_CAPTION ;
691- if (newstyle != style )
692- {
693- SetWindowLong (s_hwnd , GWL_STYLE , newstyle );
694- SetWindowPos (s_hwnd , NULL , 0 , 0 , 0 , 0 ,
695- SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER );
696- gui_set_shellsize (FALSE, FALSE, RESIZE_BOTH );
697- }
698- }
699-
700636/*
701637 * Return TRUE when Visual Style is enabled.
702638 */
0 commit comments