diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-09-23 21:53:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-09-23 21:53:41 +0200 |
commit | cddc91ccb4cc0989fa0169a343289873a6d2d651 (patch) | |
tree | 8e9efe82b872ff18875e2c2e765f4b7e501fe571 /src/os_mswin.c | |
parent | cfc216e7b00690805aef8683fab000654937191d (diff) | |
download | vim-git-cddc91ccb4cc0989fa0169a343289873a6d2d651.tar.gz |
updated for version 7.4.459v7.4.459
Problem: Can't change the icon after building Vim.
Solution: Load the icon from a file on startup. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r-- | src/os_mswin.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c index b5786800e..8ad3695bd 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -928,6 +928,33 @@ check_str_len(char_u *str) } # endif +/* + * Passed to do_in_runtimepath() to load a vim.ico file. + */ + static void +mch_icon_load_cb(char_u *fname, void *cookie) +{ + HANDLE *h = (HANDLE *)cookie; + + *h = LoadImage(NULL, + fname, + IMAGE_ICON, + 64, + 64, + LR_LOADFROMFILE | LR_LOADMAP3DCOLORS); +} + +/* + * Try loading an icon file from 'runtimepath'. + */ + int +mch_icon_load(iconp) + HANDLE *iconp; +{ + return do_in_runtimepath((char_u *)"bitmaps/vim.ico", + FALSE, mch_icon_load_cb, iconp); +} + int mch_libcall( char_u *libname, |