Change Other Apps Icon


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Change Other Apps Icon

  1. #1
    Guerrier O. Guest

    Change Other Apps Icon


    Hi,
    I want to change the windows icon of another process
    f.e. notepad
    from my vb project.
    Any Idea ?
    I think I must use Setwindowlong, but i have no idea of params.
    Code or links Wellcome.
    Thanks to reply via newsgroup AND email.

  2. #2
    René Whitworth Guest

    Re: Change Other Apps Icon

    Use SendMessage() with WM_SETICON.

    From MSDN:
    WM_SETICON
    An application sends the WM_SETICON message to associate a new large or
    small icon with a window. The system displays the large icon in the ALT+TAB
    dialog, and the small icon in the window caption.

    WM_SETICON
    wParam = (WPARAM) fType; // icon type
    lParam = (LPARAM) (HICON) hicon; // handle to icon

    Parameters
    fType
    Value of wParam. Specifies the type of icon being set. This parameter can be
    one of the following values: Value Meaning
    ICON_BIG Set the large icon for the window.
    ICON_SMALL Set the small icon for the window.

    hicon
    Value of lParam. Handle to the new large or small icon. If this parameter is
    NULL, the icon indicated by fType is removed.
    Return Values
    The return value is a handle to the previous large or small icon, depending
    on the value of fType. It is NULL if the window previously had no icon of
    the type indicated by fType.

    Default Action
    The DefWindowProc function returns a handle to the previous large or small
    icon associated with the window, depending on the value of fType.

    QuickInfo
    Windows NT: Requires version 4.0 or later.
    Windows: Requires Windows 95 or later.
    Windows CE: Requires version 1.0 or later.
    Header: Declared in winuser.h.


    --
    Hope this helps ...

    Rene Whitworth
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de
    Please reply to the newsgroup :-)


    "Guerrier O." <oliviert1@guerrier.com> schrieb im Newsbeitrag
    news:3950ad7d$1@news.devx.com...
    >
    > Hi,
    > I want to change the windows icon of another process
    > f.e. notepad
    > from my vb project.
    > Any Idea ?
    > I think I must use Setwindowlong, but i have no idea of params.
    > Code or links Wellcome.
    > Thanks to reply via newsgroup AND email.




  3. #3
    René Whitworth Guest

    Re: Change Other Apps Icon

    Use SendMessage() with WM_SETICON.

    From MSDN:
    WM_SETICON
    An application sends the WM_SETICON message to associate a new large or
    small icon with a window. The system displays the large icon in the ALT+TAB
    dialog, and the small icon in the window caption.

    WM_SETICON
    wParam = (WPARAM) fType; // icon type
    lParam = (LPARAM) (HICON) hicon; // handle to icon

    Parameters
    fType
    Value of wParam. Specifies the type of icon being set. This parameter can be
    one of the following values: Value Meaning
    ICON_BIG Set the large icon for the window.
    ICON_SMALL Set the small icon for the window.

    hicon
    Value of lParam. Handle to the new large or small icon. If this parameter is
    NULL, the icon indicated by fType is removed.
    Return Values
    The return value is a handle to the previous large or small icon, depending
    on the value of fType. It is NULL if the window previously had no icon of
    the type indicated by fType.

    Default Action
    The DefWindowProc function returns a handle to the previous large or small
    icon associated with the window, depending on the value of fType.

    QuickInfo
    Windows NT: Requires version 4.0 or later.
    Windows: Requires Windows 95 or later.
    Windows CE: Requires version 1.0 or later.
    Header: Declared in winuser.h.


    --
    Hope this helps ...

    Rene Whitworth
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de
    Please reply to the newsgroup :-)


    "Guerrier O." <oliviert1@guerrier.com> schrieb im Newsbeitrag
    news:3950ad7d$1@news.devx.com...
    >
    > Hi,
    > I want to change the windows icon of another process
    > f.e. notepad
    > from my vb project.
    > Any Idea ?
    > I think I must use Setwindowlong, but i have no idea of params.
    > Code or links Wellcome.
    > Thanks to reply via newsgroup AND email.




  4. #4
    Guerrier O. Guest

    Re: Change Other Apps Icon


    Yes it helps a lot.
    But i cannot find the value of ICON_BIG & ICON_SMALL in win32api.txt
    Could you give them ?
    Many thanks.

    "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >Use SendMessage() with WM_SETICON.
    >
    >From MSDN:
    >WM_SETICON
    >An application sends the WM_SETICON message to associate a new large or
    >small icon with a window. The system displays the large icon in the ALT+TAB
    >dialog, and the small icon in the window caption.
    >
    >WM_SETICON
    >wParam = (WPARAM) fType; // icon type
    >lParam = (LPARAM) (HICON) hicon; // handle to icon
    >
    >Parameters
    >fType
    >Value of wParam. Specifies the type of icon being set. This parameter can

    be
    >one of the following values: Value Meaning
    >ICON_BIG Set the large icon for the window.
    >ICON_SMALL Set the small icon for the window.
    >
    >hicon
    >Value of lParam. Handle to the new large or small icon. If this parameter

    is
    >NULL, the icon indicated by fType is removed.
    >Return Values
    >The return value is a handle to the previous large or small icon, depending
    >on the value of fType. It is NULL if the window previously had no icon of
    >the type indicated by fType.
    >
    >Default Action
    >The DefWindowProc function returns a handle to the previous large or small
    >icon associated with the window, depending on the value of fType.
    >
    >QuickInfo
    > Windows NT: Requires version 4.0 or later.
    > Windows: Requires Windows 95 or later.
    > Windows CE: Requires version 1.0 or later.
    > Header: Declared in winuser.h.
    >
    >
    >--
    >Hope this helps ...
    >
    >Rene Whitworth
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >Please reply to the newsgroup :-)
    >
    >
    >"Guerrier O." <oliviert1@guerrier.com> schrieb im Newsbeitrag
    >news:3950ad7d$1@news.devx.com...
    >>
    >> Hi,
    >> I want to change the windows icon of another process
    >> f.e. notepad
    >> from my vb project.
    >> Any Idea ?
    >> I think I must use Setwindowlong, but i have no idea of params.
    >> Code or links Wellcome.
    >> Thanks to reply via newsgroup AND email.

    >
    >



  5. #5
    Guerrier O. Guest

    Re: Change Other Apps Icon


    Yes it helps a lot.
    But i cannot find the value of ICON_BIG & ICON_SMALL in win32api.txt
    Could you give them ?
    Many thanks.

    "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >Use SendMessage() with WM_SETICON.
    >
    >From MSDN:
    >WM_SETICON
    >An application sends the WM_SETICON message to associate a new large or
    >small icon with a window. The system displays the large icon in the ALT+TAB
    >dialog, and the small icon in the window caption.
    >
    >WM_SETICON
    >wParam = (WPARAM) fType; // icon type
    >lParam = (LPARAM) (HICON) hicon; // handle to icon
    >
    >Parameters
    >fType
    >Value of wParam. Specifies the type of icon being set. This parameter can

    be
    >one of the following values: Value Meaning
    >ICON_BIG Set the large icon for the window.
    >ICON_SMALL Set the small icon for the window.
    >
    >hicon
    >Value of lParam. Handle to the new large or small icon. If this parameter

    is
    >NULL, the icon indicated by fType is removed.
    >Return Values
    >The return value is a handle to the previous large or small icon, depending
    >on the value of fType. It is NULL if the window previously had no icon of
    >the type indicated by fType.
    >
    >Default Action
    >The DefWindowProc function returns a handle to the previous large or small
    >icon associated with the window, depending on the value of fType.
    >
    >QuickInfo
    > Windows NT: Requires version 4.0 or later.
    > Windows: Requires Windows 95 or later.
    > Windows CE: Requires version 1.0 or later.
    > Header: Declared in winuser.h.
    >
    >
    >--
    >Hope this helps ...
    >
    >Rene Whitworth
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >Please reply to the newsgroup :-)
    >
    >
    >"Guerrier O." <oliviert1@guerrier.com> schrieb im Newsbeitrag
    >news:3950ad7d$1@news.devx.com...
    >>
    >> Hi,
    >> I want to change the windows icon of another process
    >> f.e. notepad
    >> from my vb project.
    >> Any Idea ?
    >> I think I must use Setwindowlong, but i have no idea of params.
    >> Code or links Wellcome.
    >> Thanks to reply via newsgroup AND email.

    >
    >



  6. #6
    Scott Stanaland Guest

    Re: Change Other Apps Icon

    Guerrier

    #define ICON_SMALL 0
    #define ICON_BIG 1

    Hope This Helps

    Scott

    Guerrier O. <oliviert1@guerrier.com> wrote in message
    news:3950cd3e$1@news.devx.com...
    >
    > Yes it helps a lot.
    > But i cannot find the value of ICON_BIG & ICON_SMALL in win32api.txt
    > Could you give them ?
    > Many thanks.
    >
    > "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >Use SendMessage() with WM_SETICON.
    > >
    > >From MSDN:
    > >WM_SETICON
    > >An application sends the WM_SETICON message to associate a new large or
    > >small icon with a window. The system displays the large icon in the

    ALT+TAB
    > >dialog, and the small icon in the window caption.
    > >
    > >WM_SETICON
    > >wParam = (WPARAM) fType; // icon type
    > >lParam = (LPARAM) (HICON) hicon; // handle to icon
    > >
    > >Parameters
    > >fType
    > >Value of wParam. Specifies the type of icon being set. This parameter can

    > be
    > >one of the following values: Value Meaning
    > >ICON_BIG Set the large icon for the window.
    > >ICON_SMALL Set the small icon for the window.
    > >
    > >hicon
    > >Value of lParam. Handle to the new large or small icon. If this parameter

    > is
    > >NULL, the icon indicated by fType is removed.
    > >Return Values
    > >The return value is a handle to the previous large or small icon,

    depending
    > >on the value of fType. It is NULL if the window previously had no icon of
    > >the type indicated by fType.
    > >
    > >Default Action
    > >The DefWindowProc function returns a handle to the previous large or

    small
    > >icon associated with the window, depending on the value of fType.
    > >
    > >QuickInfo
    > > Windows NT: Requires version 4.0 or later.
    > > Windows: Requires Windows 95 or later.
    > > Windows CE: Requires version 1.0 or later.
    > > Header: Declared in winuser.h.
    > >
    > >
    > >--
    > >Hope this helps ...
    > >
    > >Rene Whitworth
    > >Whitworth Software Solutions - Germany
    > >http://www.w-s-s.de
    > >Please reply to the newsgroup :-)
    > >
    > >
    > >"Guerrier O." <oliviert1@guerrier.com> schrieb im Newsbeitrag
    > >news:3950ad7d$1@news.devx.com...
    > >>
    > >> Hi,
    > >> I want to change the windows icon of another process
    > >> f.e. notepad
    > >> from my vb project.
    > >> Any Idea ?
    > >> I think I must use Setwindowlong, but i have no idea of params.
    > >> Code or links Wellcome.
    > >> Thanks to reply via newsgroup AND email.

    > >
    > >

    >




  7. #7
    Scott Stanaland Guest

    Re: Change Other Apps Icon

    Guerrier

    #define ICON_SMALL 0
    #define ICON_BIG 1

    Hope This Helps

    Scott

    Guerrier O. <oliviert1@guerrier.com> wrote in message
    news:3950cd3e$1@news.devx.com...
    >
    > Yes it helps a lot.
    > But i cannot find the value of ICON_BIG & ICON_SMALL in win32api.txt
    > Could you give them ?
    > Many thanks.
    >
    > "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >Use SendMessage() with WM_SETICON.
    > >
    > >From MSDN:
    > >WM_SETICON
    > >An application sends the WM_SETICON message to associate a new large or
    > >small icon with a window. The system displays the large icon in the

    ALT+TAB
    > >dialog, and the small icon in the window caption.
    > >
    > >WM_SETICON
    > >wParam = (WPARAM) fType; // icon type
    > >lParam = (LPARAM) (HICON) hicon; // handle to icon
    > >
    > >Parameters
    > >fType
    > >Value of wParam. Specifies the type of icon being set. This parameter can

    > be
    > >one of the following values: Value Meaning
    > >ICON_BIG Set the large icon for the window.
    > >ICON_SMALL Set the small icon for the window.
    > >
    > >hicon
    > >Value of lParam. Handle to the new large or small icon. If this parameter

    > is
    > >NULL, the icon indicated by fType is removed.
    > >Return Values
    > >The return value is a handle to the previous large or small icon,

    depending
    > >on the value of fType. It is NULL if the window previously had no icon of
    > >the type indicated by fType.
    > >
    > >Default Action
    > >The DefWindowProc function returns a handle to the previous large or

    small
    > >icon associated with the window, depending on the value of fType.
    > >
    > >QuickInfo
    > > Windows NT: Requires version 4.0 or later.
    > > Windows: Requires Windows 95 or later.
    > > Windows CE: Requires version 1.0 or later.
    > > Header: Declared in winuser.h.
    > >
    > >
    > >--
    > >Hope this helps ...
    > >
    > >Rene Whitworth
    > >Whitworth Software Solutions - Germany
    > >http://www.w-s-s.de
    > >Please reply to the newsgroup :-)
    > >
    > >
    > >"Guerrier O." <oliviert1@guerrier.com> schrieb im Newsbeitrag
    > >news:3950ad7d$1@news.devx.com...
    > >>
    > >> Hi,
    > >> I want to change the windows icon of another process
    > >> f.e. notepad
    > >> from my vb project.
    > >> Any Idea ?
    > >> I think I must use Setwindowlong, but i have no idea of params.
    > >> Code or links Wellcome.
    > >> Thanks to reply via newsgroup AND email.

    > >
    > >

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center