Getting HICON for foreign window? 
Author Message
 Getting HICON for foreign window?

Okay, silly question...

...how do you get the HICON for a window of another process?

I tried sending a WM_GETICON message to the window bit this always returns 0
for foreign processes.

Any thoughts?

Thanks.



Tue, 07 Oct 2003 20:01:27 GMT  
 Getting HICON for foreign window?

Quote:
> ...how do you get the HICON for a window of another process?

ExtractIcon[Ex]()

Regards,
Will



Tue, 07 Oct 2003 23:50:00 GMT  
 Getting HICON for foreign window?
Alas that's not always the same thing as the icon displayed on the window.
I wanted to display an icon + window title, just like the taskbar / task
manager does.

Thanks anyway,

Bill



Quote:


> > ...how do you get the HICON for a window of another process?

> ExtractIcon[Ex]()

> Regards,
> Will



Wed, 08 Oct 2003 00:28:40 GMT  
 Getting HICON for foreign window?

Quote:
> Alas that's not always the same thing as the icon displayed on the window.
> I wanted to display an icon + window title, just like the taskbar / task
> manager does.

Well, the icon displayed on the window is among the array of icons returned
by the Ex variant, no? <BWG>

The task manager enumerates top-level, unowned windows. It may me that it
uses GetClassLong()/GCL_HICON.

Regards,
Will



Wed, 08 Oct 2003 06:39:13 GMT  
 Getting HICON for foreign window?

Quote:

> Okay, silly question...

> ...how do you get the HICON for a window of another process?

> I tried sending a WM_GETICON message to the window bit this always returns 0
> for foreign processes.

> Any thoughts?

> Thanks.

What about GetClassLong with GCL_HICON?

Tom Brennan



Wed, 08 Oct 2003 11:54:08 GMT  
 Getting HICON for foreign window?
I would imagine that, on NT and 2000, HICONs are process-specific - so you
won't be able to get a valid HICON for the window in another process.

(Did I just say the same thing twice? Two times?)

- rick


Quote:

> > Okay, silly question...

> > ...how do you get the HICON for a window of another process?

> > I tried sending a WM_GETICON message to the window bit this always
returns 0
> > for foreign processes.

> > Any thoughts?

> > Thanks.

> What about GetClassLong with GCL_HICON?

> Tom Brennan



Wed, 08 Oct 2003 15:19:38 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Subclassing foreign window and changing memory in it

2. Writing to foreign windows...

3. OnClose of foreign window

4. Getting window handle without matching window caption text

5. Getting a handle to a child window / Resizing a child window

6. Getting a handle to a window from the window instance

7. Getting a pointer to a window from the window handle

8. Getting a handle to a child window / Resizing a child window

9. Getting messages that Windows sends to other windows

10. Newbee question - Passing an HICON between processes on the same machine

11. Passing an HICON from component

12. hIcon

 

 
Powered by phpBB® Forum Software