probleme de l'api CheckDlgButton sous C#
Code:
1 2 3 4 5 6 7 8 9 10 11
|
[DllImport("user32", CharSet = CharSet.Auto)]
public static extern int CheckDlgButton(IntPtr hwnd, int nIDButton, int wCheck);
[DllImport("user32", CharSet = CharSet.Auto)]
public static extern int GetDlgCtrlID(IntPtr hwnd);
const int BST_CHECKED = 0x001;
private void button1_Click(object sender, EventArgs e)
{
CheckDlgButton(this.Handle, Win32.GetDlgCtrlID(radioButton1.Handle), BST_CHECKED);
} |
se code ne marche pas sous C# mais le meme en vb marche tres bien y'a une idee
NB : this = form