/[emacs]/emacs/src/w32term.c
ViewVC logotype

Diff of /emacs/src/w32term.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.230 by ttn, Sun Aug 7 12:33:18 2005 UTC revision 1.231 by jasonr, Sun Sep 11 20:32:10 2005 UTC
# Line 5267  x_bitmap_icon (f, icon) Line 5267  x_bitmap_icon (f, icon)
5267       struct frame *f;       struct frame *f;
5268       Lisp_Object icon;       Lisp_Object icon;
5269  {  {
5270    HANDLE hicon;    HANDLE main_icon;
5271      HANDLE small_icon = NULL;
5272    
5273    if (FRAME_W32_WINDOW (f) == 0)    if (FRAME_W32_WINDOW (f) == 0)
5274      return 1;      return 1;
5275    
5276    if (NILP (icon))    if (NILP (icon))
5277      hicon = LoadIcon (hinst, EMACS_CLASS);      main_icon = LoadIcon (hinst, EMACS_CLASS);
5278    else if (STRINGP (icon))    else if (STRINGP (icon))
5279      hicon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0,      {
5280                         LR_DEFAULTSIZE | LR_LOADFROMFILE);        /* Load the main icon from the named file.  */
5281          main_icon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0,
5282                                 LR_DEFAULTSIZE | LR_LOADFROMFILE);
5283          /* Try to load a small icon to go with it.  */
5284          small_icon = LoadImage (NULL, (LPCSTR) SDATA (icon), IMAGE_ICON,
5285                                  GetSystemMetrics (SM_CXSMICON),
5286                                  GetSystemMetrics (SM_CYSMICON),
5287                                  LR_LOADFROMFILE);
5288        }
5289    else if (SYMBOLP (icon))    else if (SYMBOLP (icon))
5290      {      {
5291        LPCTSTR name;        LPCTSTR name;
# Line 5296  x_bitmap_icon (f, icon) Line 5305  x_bitmap_icon (f, icon)
5305        else        else
5306          return 1;          return 1;
5307    
5308        hicon = LoadIcon (NULL, name);        main_icon = LoadIcon (NULL, name);
5309      }      }
5310    else    else
5311      return 1;      return 1;
5312    
5313    if (hicon == NULL)    if (main_icon == NULL)
5314      return 1;      return 1;
5315    
5316    PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG,    PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG,
5317                 (LPARAM) hicon);                 (LPARAM) main_icon);
5318    
5319      /* If there is a small icon that goes with it, set that too.  */
5320      if (small_icon)
5321        PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_SMALL,
5322                     (LPARAM) small_icon);
5323    
5324    return 0;    return 0;
5325  }  }

Legend:
Removed from v.1.230  
changed lines
  Added in v.1.231

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26