N
Nidhi
Hi,
I am trying to write code to retrieve the small icon for an
application in C#. I am using SendMessage with WM_GETICON for this
purpose but the return value I get is 0. I don't understand this. Is
that expected? What am I doing wrong?
Any help would be appreciated. Here is the snippet of code that I am
using -
[DllImport("user32")] public static extern int SendMessage(int
hwnd,int msg,int wparam,int lparam);
Process p = Process.GetProcessById(a.getPID()); //the requisite process and
//the value returned is valid
IntPtr hwnd = p.MainWindowHandle;
int icn = SendMessage((int)hwnd,127,0,0); //I realize WM_GETICON = 127
Thanks!
Nidhi
I am trying to write code to retrieve the small icon for an
application in C#. I am using SendMessage with WM_GETICON for this
purpose but the return value I get is 0. I don't understand this. Is
that expected? What am I doing wrong?
Any help would be appreciated. Here is the snippet of code that I am
using -
[DllImport("user32")] public static extern int SendMessage(int
hwnd,int msg,int wparam,int lparam);
Process p = Process.GetProcessById(a.getPID()); //the requisite process and
//the value returned is valid
IntPtr hwnd = p.MainWindowHandle;
int icn = SendMessage((int)hwnd,127,0,0); //I realize WM_GETICON = 127
Thanks!
Nidhi