Exemplo n.º 1
0
        private void button50_Click(object sender, EventArgs e)
        {
            StringBuilder          sb        = new StringBuilder(100);
            int                    count     = Win32API.GetClassName(this.Handle, sb, 100);
            WndClassExFromUnmanged wc        = new WndClassExFromUnmanged();
            bool                   result    = Win32API.GetClassInfoEx(Program.hInstance, sb.ToString(), ref wc);
            Delegate               d         = Marshal.GetDelegateForFunctionPointer(wc.lpfnWndProc, typeof(WndProc));
            string                 className = Marshal.PtrToStringAuto(wc.lpszClassName);
            string                 menuName  = Marshal.PtrToStringAuto(wc.lpszMenuName);

            Console.WriteLine(result);
        }
Exemplo n.º 2
0
 public static extern bool GetClassInfoEx(IntPtr hlnst, string lpszClass, ref WndClassExFromUnmanged lpWndClass);