-
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.
-
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.
-
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.
-
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.
>
>
-
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.
>
>
-
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.
> >
> >
>
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks