ylm / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Let setting dialog looks better #414

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Change setting dialog font
Modify these lines in res.rc:
IDD_MAINBOX DIALOG DISCARDABLE 32, 8, 256, 152
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
to:
IDD_MAINBOX DIALOGEX DISCARDABLE 32, 8, 256, 152
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
The setting dialog font would be Tahoma, it's better than default "Microsoft 
Sans Serif". After I download a new version, I always replace this dialog 
resource by ResHacker, so I hope this may be accepted at least.

2. Make treeview a explorer-looks style
Use "SetWindowTheme" function:
// windialog.c:145 HWND treeview = CreateWindowEx(...);
HMODULE hinstDLL = LoadLibrary(TEXT("uxtheme.dll"));
if (hinstDLL != NULL) {
  HRESULT (WINAPI *SetWindowTheme)(HWND, LPCWSTR, LPCWSTR) = (HRESULT (WINAPI *)(HWND, LPCWSTR, LPCWSTR))GetProcAddress(hinstDLL, "SetWindowTheme");
  if (SetWindowTheme != NULL) {
    SetWindowTheme(treeview, L"explorer", NULL);
    // SendMessage(treeview, TVM_SETEXTENDEDSTYLE, 0, TVS_EX_DOUBLEBUFFER);
    SendMessage(treeview, TV_FIRST + 44, 0x0004, 0);
  }
  FreeLibrary(hinstDLL);
}
It make listview or treeview looks better on Vista or above.

Original issue reported on code.google.com by shanxijiake on 27 Nov 2013 at 2:50

Attachments:

GoogleCodeExporter commented 9 years ago
SendMessage(treeview, TV_FIRST + 44, 0, 0x0004);

Original comment by shanxijiake on 27 Nov 2013 at 3:07