Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As
Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const WM_GETICON As Long = &H7F
Dim hIcon as Long
hIcon = SendMessage(hWnd, WM_GETICON, 1, ByVal 0&)
This will retreive the big icon (usually 32x32) for the window identified by hWnd... pass
0 instead of 1 in wParam to get the small icon.
Please post/reply to the newsgroup(s) so
that everyone can benefit from the discussion.
Klaus H. Probst, MCP
> If i know the hWnd of a window, how can i go about getting the hIcon for
> that window?
> I think the way is through GetClassInfoEx, is this right?? The only problem
> then becomes, GetClassInfoEx needs the hInstance of the window. So how do i
> go about getting that?
> Any help on this would be greatly appreciated. TIA -