I need to subclass a openFileDialog control, get its hwnd(already did it), subclass it(will make it later) and then create buttons and the code.
Any help creating a button in a form(for now)?
I already managed to do this(C# Code):
It isn't giving any error but it also doesnt show anything in my form.. any idea in what i'm doing wrong?Code:[DllImport("User32.Dll", CharSet=CharSet.Auto)] public static extern void CreateWindowEx(int ExStyle, string className, string title, uint WSstyle, int x, int y, int width, int height, IntPtr parent, int menu, int instance, object extraParam); private void MyFunc() { IntPtr HINSTANCE = Microsoft.VisualBasic.Compatibility.VB6.Support.GetHInstance(); CreateWindowEx(0, "BUTTON", "LOLS", 0x40000000, 0, 0, 100, 100, this.Handle, 0, HINSTANCE.ToInt32(), 0); }




Reply With Quote